Corrects an issue in the config_exists function that could
cause duplicate interfaces to be configured on Ubuntu.
Previously we used 'return ifquery' directly which caused
a silent 'numberic argument required' error to go unnoticed.
This would also return 1 meaning a new interface would get
configured.
The new logic should handle things properly.
Change-Id: I625225e15113d7e184e3bcb5054df1616dec008a
Closes-bug: #1298430
Virtual baremetal instances have their NICs show up as ens4
which doesn't play nicely as a default in devtest at
the moment.
Ideally we'd want it to be em1 like real baremetal
(which is why we put this in the baremetal element
to begin with). Turns out the baremetal element is
required in devtest so we can extract the ramdisk and kernel
so lets leave it alone for now and move this elsewhere
until we get a better solution for fake 'baremetal'
testing.
Closes-bug: #1298152
Change-Id: Ia71e1d32b93db0c4c844a6dc1ebcd04ab0c13f05
Currently the dpkg element fakes start-stop-daemon, initctl and
invoke-rc.d to stop dpkg from starting a bunch of daemons in the
chroot. This is problematic when packages use service, start, stop or
restart commands.
This patch uses a policy-rc.d instead of faking invoke-rc.d to achieve
the same thing. This approach now aligns exactly with debootstrap.
Without this patch DIB runs on some debian distributions fail
when trying to umount the chroot loop device as there are daemons
running.
The log will now show "invoke-rc.d: policy-rc.d denied execution of
start." instead of "Warning: Fake invoke-rc.s called, doing nothing."
Change-Id: I6db192127aca19b5b7915179b781f5192078bfc7
Related-Bug: #1211564
We've started to require this in reviews, so we should really have
automation in place to catch it right away.
Change-Id: I43fd90647acba400cea11c665fb587856514b0ee
This will provide a place to put checks that catch common errors
in elements. To start, this just checks that files starting with
a shebang are chmod +x so they can actually be run.
Change-Id: I4116a8f38f7bdfc5866764354c459fad8ca18e92
cloud-init packages are not available in the Debian Wheezy repository.
However, they are available in wheezy-backports.
With this change, the cloud-init packages are installed from
wheezy-backports if DIB_RELEASE is wheezy.
Change-Id: I3daa3b0ba185ba3f7c1bf6b8f9b1f8c167fcb340
save_image is used to copy kernel and ramdisks out of the image, which
we will sometimes want to keep the source, and sometimes not. However
for the main image itself, the temp copy is never kept, so use mv
rather than cp and avoid the excess IO.
Change-Id: I5a9f0d69ffee3e6b872a8927537ac17f02f5aa4d
An element can define a list of elements provided by itself. This allows
using an alternative element and keeping element dependencies at the
same time. This will be needed for example for mariadb element which will be
an alternative to mysql element - mysql dependency can be kept everywhere
but user can choose mariadb explicitly as a replacement by putting "mysql"
into "element-provides" file.
Change-Id: I7f193612f279dd71d9f1f1edfc60009838a00c5a
Those parameters allow to access the console for VMs using
extlinux (CentOS 6 for example). They are already added to
Fedora images.
Change-Id: I035170bd101062e004fb3782b5f8e5a7944a4f03
Closes-Bug: 1296899
pypi-mirror creates a separate mirror index for wheels (one per OS
that mirrors are built on). To be able to use it one then needs to be
able to export multiple mirrors for inclusion in pip.conf. As a drive
by I made it possible to disable the use of the pypi.python.org index
without using --offline (as --offline has larger impact).
Change-Id: I3e85a8069b18cafd7eae4cd0591821acc3b5a739
Remove the correct ifcfg-eth0 file on Fedora.
This will require an associated incubator change as well
to ensure the undercloud/overcloud now use em1.
Change-Id: I4b4bb7b6a25b058eebe889fd8ce1a403aaf193fd
libmariadb-dev is named mariadb-devel on Fedora. mariadb-devel
package is needed for upcoming mariadb element.
Change-Id: Ib62071a964a4449c4e32ef1646ab7a0fb0f5f7b7
Update the systemd serial port element implementation
so that it uses udev rules. Much nicer than
hard coding ttyS0 and ttyS1.
The udev rule only adds real serial device types
(i.e. == 4). See:
define TTY_DRIVER_TYPE_SERIAL 0x0003
from include/linux/tty_driver.h.
Change-Id: I5d7de4815fd09c01693b7da4b8949f22fee20745
Updates the dhcp-all-interfaces element to fix a race
with the recent udev rules implementation on Fedora.
With the new approach we make the udev rule want (require
to startup) a generic dhcp-interface@.service template which
can be started individually for each interface that is
discovered.
The dhcp-interface@.service is setup such that it:
1) It calls dhcp-all-interfaces <iface> directly with
a pre-exec script. This creates the ifcfg file right
before we need it but avoids the case where network.service
might get greedy and try to start it itself.
2) Only runs if the ifcfg script doesn't already exist. This
is important because we only need to bootstrap the DHCP configs...
Once they exist the network.service will take care of starting them
on reboots, upgrades, etc.
3) On initial boot ensure that the initial DHCP interfaces come
up after network.service. Since we really only want
dhcp-all-interfaces to help bootstrap that haven't already
been configured this seems reasonable.
4) We also try to ensure that cloud-init
comes up after the DHCP interfaces. Cloud init has a decently
long timeout that this wasn't a functional problem but it keeps
log file spew down.
Change-Id: I71b026f027182aad49c3435bb903e5e38e524685
Closes-bug: #1294803
This is being added as a separate element because RHEL 7 is too
different from either RHEL 6 or Fedora to share all of the
configuration they do. It uses the redhat-common element for
pieces that are duplicated.
Some current limitations of the element:
-RHEL 7 is currently still in beta, so final image locations are
not available. This currently defaults to the RHEL 6.5 image,
but that will need to be overridden using the DIB_* env vars.
-There are additional tripleo-image-elements changes that will be
needed to be able to use this for building tripleo images.
-Open vSwitch packages are not currently available in the official
RHEL 7 repos.
-RHEL does not support qemu without kvm acceleration, so at this
time it cannot be used as a compute node for virtualized testing.
Change-Id: I705fd475303576525a27ce6801c673b5721792c9
Add an element intended for use in both Fedora and RHEL. This
allows them to share install steps that are common to both.
Change-Id: Ie4e820a7b777b8701514351b1f802cfe57c3812e
Fixes a few syntax errors in the markdown rendering related to the new
verbage about install types. Also gives a better example of using a
DIB_INSTALLTYPE_* environment variable.
Change-Id: I4b60f458adc08b601e9d913f3e448bcf620314db
Refactors dhcp-all-interfaces.sh so that if an optional
INTERFACE argument (the first argument) is passed to the script
it only inspects that single interface. If no argument is
passed then the previous default behaviour is used which
causes all interfaces to be inspected.
To avoid a collision with the previous $1 we move to using
$FLOCKED for the exec flock command which runs on distributions
using ENI.
Also sets PATH so that the commands within the script
can all be found if it isn't set properly (/sbin/ip, /bin/cat, etc.)
This is a move towards using udev rules to add these types
of interfaces automatically.
Change-Id: I3ec8fd2cc2071bfc6943c744ca619e31b71146fc
Move whether the package or source install type is enabled out of the
source-repositories element and into the base element.
source-repositories wasn't a great fit for this functionality to begin
with.
Specify the install type for an element via the
DIB_INSTALLTYPE_<install_dir_prefix> environment variable.
Additionally with this approach, any new install type can be added
in an element, without having to update source-repositories or anything
in dib.
You could just write your install type implementation under
nova-foo-install, then define DIB_INSTALLTYPE_nova=foo in your
environment, and the scripts under nova-foo-install would get run during
the image build.
Source installs (any scripts under <install_dir_prefix>-source-install)
is the default install type for all elements.
Change-Id: I9414aca360c41e030e27d3d0c0a52d9d8e13d8b1
Since file to be fetched from the root tftp directory it shouldn't
contain any hardcoded path. Additionaly it eliminates bearing with
map-file containing regular expressions for tftp path replacement.
Change-Id: Iee1672834f735d7dfefce43000540522e1d053b9
Closes-Bug: #1291533