Commit Graph

425 Commits

Author SHA1 Message Date
Dan Prince
5da1f1324b Rename generate-interfaces-file.sh...
Rename generate-interfaces-file.sh to dhcp-all-interfaces.sh
so that it is easier to find/remember in the $PATH on a deployed
image.

Also, on some distros the script actually generates many files
so the previous name was a bit confusing.

Change-Id: I7152fa7c28e8ade251311da2cd5f75972423b66c
2014-01-23 16:38:41 -05:00
Dan Prince
f58f859303 Only configure DHCP for real interfaces
Updates the generate-interfaces-file.sh script in
the dhcp-all-interfaces element so that we only
add interfaces that have real MAC addresses.

The generate-interfaces-file.sh script is run early enough
in the boot process (before OVS is initialized) that this
isn't usually a problem unless you execute it manually by hand
after booting. Then you'll end up with network/DHCP
configs for all of your OVS bridges, etc. This
patch avoids configuring all of the virtual interfaces
which have generated MAC addresses.

Change-Id: I7a705084aa5b11305ac0ec5ca37fd2e87a2ae8b7
Closes-bug: 1239479
2014-01-23 16:37:44 -05:00
Jenkins
1e04079d4f Merge "Fix kernel/initrd extraction for SUSE based distros" 2014-01-23 17:26:01 +00:00
Ralf Haferkamp
de2becc9ff Fix kernel/initrd extraction for SUSE based distros
Change-Id: Ib4c8ddfe3592242ce684676e9dcb6428466ca66e
2014-01-23 15:30:52 +01:00
Dirk Mueller
b12c28dde8 Workaround broken udev update on openSUSE
Delete stale symlinks created by current openSUSE 13.1
for kpartx loopback partitions. Those break bootloader
installation otherwise.

Change-Id: I13a7387e341b4426b459610fd1d3c49ce5730f46
2014-01-23 08:34:22 +01:00
Jenkins
e882bb5836 Merge "Setup ccache symlinks on openSUSE" 2014-01-22 21:03:15 +00:00
Jenkins
35aa61617a Merge "Add support for Red Hat Satellite" 2014-01-22 14:02:32 +00:00
Jenkins
f67a3805e2 Merge "Support list of Red Hat channels and repos" 2014-01-22 14:02:31 +00:00
Jenkins
0a5b5159ad Merge "Add support Red Hat Network (RHN)" 2014-01-22 14:02:30 +00:00
Jenkins
f1704ed421 Merge "Update default RHEL guest image" 2014-01-22 11:37:19 +00:00
Clint Byrum
0c6b346c15 Add Copyright and License header to debian element
These were forgotten in the initial commit.

Change-Id: I42ef745cc56d0a6983b1cc9c870d5a81d1f61940
2014-01-21 15:57:43 -08:00
Ralf Haferkamp
831cd69790 Setup ccache symlinks on openSUSE
openSUSE's ccache package doesn't include symlinks to enable ccache
for gcc by default, so we set them up manually.

Change-Id: I79dbe814ff2dfad8158fb1f06d68cc07eae19a41
2014-01-21 22:01:17 +01:00
aweiteka
bb04ff1ef2 Add support for Red Hat Satellite
A Red Hat Satellite URL may be provided as the source for
Red Hat packages. A Satellite key may be provided for a pre-
defined set of RHN channels to be automatically applied. Support
for installation of a Satellite certificate also provided.

Change-Id: Iae5b97d6f4732a28efa08ab778a56c2f9b6b6bd9
2014-01-21 14:26:35 -05:00
aweiteka
ce14214a7a Support list of Red Hat channels and repos
When registering to RHN or RHSM a list of space-separated
channels or repositories may be provided. This allows control
over which packages are available to the system during build.
Note, the optional channel or repository is added by default
since diskimage-builder requires access to its packages. This
list is for additional channels or repos.

Change-Id: I9cf90d47ab1d09f5491f574132410438f9e294e3
2014-01-21 14:26:35 -05:00
aweiteka
78dbbe68fe Add support Red Hat Network (RHN)
This provides basic support to register to the Red Hat Network
(RHN Classic) for packages. The image is unregistered from RHN
before completing image build. The rhnsd service is prevented
from starting since it is not needed for packagage install.

Change-Id: I2dc124cdc6ae59a63fd94d82d77108acccc3f668
2014-01-21 14:26:35 -05:00
aweiteka
3dc40c925d Update default RHEL guest image
Red Hat periodically updates the qcow2 guest image available
for download. This sets the default image name to the latest.

Change-Id: Iba3075bbee3b41918d5cd3da9721fcbf98ff3bcd
2014-01-21 14:26:35 -05:00
Steve Kowalik
58c755cf4c Create a new baremetal element
Rather than using a script to mount the image using nbd to extract the
kernel and ramdisk, make a new element called baremetal, which contains
a cleanup.d script that will copy them out to <image name>.{vmlinuz,initrd}.

Closes-Bug: 1224669
Change-Id: I8f3569aa12148d18b1c8242b6fbbd8857894b26f
2014-01-21 16:48:20 +11:00
Jenkins
ed8264c9d9 Merge "Update to Fedora 20" 2014-01-20 21:30:11 +00:00
Jenkins
6397fd3b5f Merge "Add debian-upstart for experimenting with upstart" 2014-01-20 21:27:24 +00:00
Jenkins
037e798625 Merge "Fix mysql package mappings for opensuse" 2014-01-20 21:27:01 +00:00
Jenkins
ca2a430375 Merge "Allow adding packages to debootstrap" 2014-01-20 21:26:51 +00:00
Jenkins
c21c82bacf Merge "Convert -dev to -devel in fedora/map-packages" 2014-01-20 21:26:16 +00:00
Jenkins
cf7af05fff Merge "Fix the curl command in the ironic-deploy element" 2014-01-20 18:58:54 +00:00
Jenkins
92ab5ab5af Merge "fedora/RHEL: use env from /usr/bin" 2014-01-20 18:54:26 +00:00
Ralf Haferkamp
2e2b19fd4f Fix mysql package mappings for opensuse
Change-Id: I231df61a79e6c8686afbbd203fa6bba96497f228
2014-01-20 18:52:22 +01:00
Dirk Mueller
2def5b7727 fedora/RHEL: use env from /usr/bin
/usr/bin/env is the new canonical location of "env", use
it.

Change-Id: Ifc5fbd942d409b1f54057579c5f57ccac63d4b72
2014-01-20 16:16:41 +01:00
Jenkins
1831a2bfbd Merge "Allow use of mirrors when building Ubuntu images" 2014-01-20 11:35:31 +00:00
Steve Kowalik
48f5359efb Allow use of mirrors when building Ubuntu images
Add a script to ubuntu's pre-install.d that will change
archive.ubuntu.com to a mirror specified in $DIB_DISTRIBUTION_MIRROR.

Change-Id: Idfd5a40ec8a1912a5de5dcdcaf9795946b0b53b8
2014-01-20 15:07:04 +11:00
James Slagle
82668aacc0 Update to Fedora 20
Update the default version of Fedora to 20 for the cloud image. A few of
us have run through devtest using Fedora 20 and it's working.

To continue to use 19, just specify DIB_RELEASE=19 for your image
builds.

Change-Id: I3d48272dedcd424747db5485ae0d8e9953f04191
2014-01-17 11:12:58 -05:00
Angus Salkeld
a021b110ad Convert -dev to -devel in fedora/map-packages
If there is not a special case in package_map then
convert all *-dev packages into *-devel

Change-Id: I411935c1f3221016b56263ac9502221cd75d130d
2014-01-17 18:10:13 +10:00
Lucas Alvares Gomes
af8eeebeb8 Fix the curl command in the ironic-deploy element
We need to use the eval command together with curl so that the
$TOKEN_HEADER variable is seems by curl as two arguments: "-H" and
"'X-Auth-Token: ...". Without the eval bash would interpret the variable
as only one argument "-H 'X-Auth-Token: ...'" making the curl command
to not understand that parameter and fail to pass the auth_token to the
Ironic API.

Change-Id: I4dcfc323d6ab9b7fa207328386ef65a146a93617
2014-01-16 13:16:47 +00:00
Jenkins
016fc76d84 Merge "Symlink correct element install type" 2014-01-16 11:56:23 +00:00
Jenkins
5108838071 Merge "dib-run-parts should dereference symlinks" 2014-01-16 11:56:17 +00:00
Jenkins
71fb3e0f3c Merge "Wait for tgtd socket to be available" 2014-01-16 00:03:12 +00:00
Jenkins
e152e27937 Merge "Implement serial-console for systemd." 2014-01-16 00:03:11 +00:00
James Slagle
57ba300be4 Symlink correct element install type
The source-repositories element will now symlink the install scripts
corresponding to the set install type for an element into the install.d
directory.

Different install types are implemented by elements by writing scripts to do
the install type under install.d/<element-name>-<install-type>-install
directories.

For example, the nova element would provide:

nova/install.d/nova-package-install/74-nova
nova/install.d/nova-source-install/74-nova

source-repositories will create the following symlink for the package
install type:

$TMP_HOOKS_PATH/install.d/74-nova -> nova-package-install/74-nova

Or, for the source install type:

$TMP_HOOKS_PATH/install.d/74-nova -> nova-source-install/74-nova

Change-Id: I1bfaf39e5a98b2af904fbc6d674dbada30b27ed9
2014-01-15 14:57:08 -05:00
James Slagle
79f31d0476 dib-run-parts should dereference symlinks
dib-run-parts should dereference symlinks, and if they point to an
executable file, execute that file as a script. This can be accomplished
by using the xtype predicate in the find command instead of the type
predicate.

This change is needed so that we can dynamically symlink hook scripts
into hook directories such as install.d at runtime to support different
install types.

Change-Id: I933e7f4b4dcf16956841d8c14aa63b0f9a18fc5d
2014-01-15 14:57:08 -05:00
Clint Byrum
611a8b701a Add debian-upstart for experimenting with upstart
Upstart support in Debian is somewhat experimental, but having it would
be especially useful for TripleO which already generates upstart scripts
which will work fairly well on Debian based systems.

Change-Id: I267da5ae7bc4a484fac152a14963d96ca2ad2693
2014-01-14 22:41:25 -08:00
Clint Byrum
4ce573c582 Allow adding packages to debootstrap
Also allows setting the "distro name" so that things that change the
debootstrap signature will have a different tarball.

This is being done in advance of a debian-upstart element to allow
experimenting with debian and upstart.

Change-Id: I1a558fdaf5924c65f1cced9f9bf29d73643c30af
2014-01-14 22:41:25 -08:00
Clint Byrum
d0fd8915f6 Add support for Debian
Change-Id: Ibc6bc57dea1eab295fb23cccf40b38f3fcb285c3
2014-01-14 22:41:16 -08:00
James Slagle
8d910d10f8 Wait for tgtd socket to be available
tgtd returns execution control and backgrounds itself almost immediately
and before it has made it's listening socket available. This can cause a
race condition as the tgtd socket is not available when tgtadm is run,
resulting in an error:

failed to send request hdr to tgt daemon

Add a function to check if the socket is available before moving on to
calling tgtadm, and a wait_for helper function we can use.  We'll
check for the socket every 0.5 seconds, for up to 5 seconds.

I'm seeing this issue on almost every deploy using a ramdisk built from
Fedora 20. I'm not sure if something has changed in tgtd, but this
behavior is documented since Fedora 18 at least. In the systemd script
for tgtd, there is actually "sleep 5" to work around the problem.

See Also: https://bugzilla.redhat.com/show_bug.cgi?id=848942

Change-Id: Iffa9fc63393309ca653d592dff17316ecbea3e09
2014-01-14 12:53:03 -05:00
Jenkins
de7deb7ce9 Merge "Add new modprobe-blacklist element." 2014-01-14 13:05:55 +00:00
Jenkins
d9303ac9af Merge "Add package support to source-repositories" 2014-01-14 12:42:29 +00:00
Jenkins
85bb142641 Merge "Retry link check up to 10 times." 2014-01-14 11:12:25 +00:00
Jenkins
cccb870d92 Merge "Removing the config-applier element" 2014-01-14 11:09:14 +00:00
Dan Prince
ab9d5d3cc3 Add new modprobe-blacklist element.
This element can be used to provide a custom list
of modules via DIB_MODPROBE_BLACKLIST which
will be disabled via modprobe.d/blacklist.conf.

I'm using this to disable network adapters on the
Red Hat TripleO rack where the devices can't be
explicitly disabled via the BIOS.

Change-Id: I8a0a8ee05fa62628434d7f6422577dbf5cdd7a2e
2014-01-13 15:43:29 -05:00
Dan Prince
5ae9c5d24c Install traceroute on Fedora.
Useful for debugging, etc.

Change-Id: Ia06f8d7a76de2f082bea09c57fbb8150c9706afc
2014-01-13 15:12:39 -05:00
Dan Prince
ae28c99b5f Retry link check up to 10 times.
Updates the dhcp-all-interfaces element so that the link
check tries up to 10 times.

On some of my machines 3 times (seconds) doesn't appear to
be quite long enough...

Change-Id: Ibf7015162fc890d4de8a417b868b0301146944c0
2014-01-13 13:58:42 -05:00
Dan Prince
ae22d39472 Implement serial-console for systemd.
Update install.d/20-stty so that we try to start
a getty on ttyS0 and ttyS1 when using systemd.

Change-Id: Id5b605c74bf82855af0af4d0f95659cdd3a7b3a0
2014-01-13 13:02:54 -05:00
Derek Higgins
63a4c1e9d5 Removing the config-applier element
This is pretty much a duplicate of t-i-e/elements/os-apply-config, isn't used
in tripleo and the upstart script is out of date. We don't need to carry this.

Change-Id: I2b23d5930afae42cff28e2d5ce3d6c84224afa4a
2014-01-13 14:10:10 +00:00