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
Some of the tripleo-image-elements were failing for RHEL due to lack of
build essential, python-dev and libz-dev.
This commit should fix those failure.
Change-Id: I080f9601faedb3259deada5cfbda7d00d3f13eb9
A recent change[1] relies on IMAGE_NAME being available when
98-source-repositories was run. However IMAGE_NAME was previously only
exported if the -o option had been used.
[1] I7dbe9e163ad38a418cf2869a81e720de2c27dfb1
Change-Id: Ife3d94fd45a2e0e0948c17414c369e0e6e040442
By default most cloud images have disabled the
udev rules which give us stable network interface names. While
this is a reasonable default for something like EC2 (the target
for these images) this is very bad behavour on bare metal
and can cause a "musical NICs" situation to occur where
on reboot the NIC names get swapped.
In this commit we re-enable stable interface naming by
removing the dev nulled rules softlink and installing
the biosdevname package. Once this is done interface
names should again show up as em1, em2 instead of
the old eth0, eth1.
We also remove some the common, statically configured
eth0 config files on some distributions. Equivalent
files (if needed) may be auto-generated by using
the dhcp-all-interfaces element.
Change-Id: Idd67977342719e2f295e2fa2c0ed6cfa8602171a
As git repositories are copied into the image make a note of their
details and add them to a manifest on the build system.
This allows the code used in building an image to be found after
the image build is completed without needing to open the image up
for inspection.
Change-Id: I7dbe9e163ad38a418cf2869a81e720de2c27dfb1
In 8b2325118f we added a line
so that 98-source-repositories tries to return from the top
level script (not from within a function).
Also, remove the return 1 within the function as well
because we just want to continue in these cases.
Change-Id: I66eddc12208b278594a0a8d8676c38d72045ca75
This will help to ensure images that would cause bug #1289582 would
still fail even on systems that have more RAM. Also this will ensure we
only reserve enough tmpfs space for this build.
Change-Id: Icece64e691d126a5fc89262897630fdbef1ffdf1
NFS client utilities for Debian are found in nfs-common, and the
Fedora equivalent is found in nfs-utils. The NFS server components
are already accounted for in the nfs-kernel-server mapping.
Change-Id: I2a43208f54b7fb625c239ce22231c43e194a97ed
Looks like shells only support alphanumeric characters and "_"'s in
environment variables. We were substituting "-" characters but in
order to be able to set overrides in projects with names containing
other characters we need to substitute more, I'm looking at you
oslo.config.
Change-Id: I3e2b1b0bc5871e4ec4ffd8117906cd077aa2cb0d
Co-authored-by: James Polley <jp@jamezpolley.com>