The key 'RPM-GPG-KEY-redhat-release' may not exist in image
e.g. when you use non-default image (for example, if you build CentOS
image using rhel element).
Fixes bug #1252697
Change-Id: Iae642abb7a7f76c5528750dafedd4fd4bda56fe2
We can now actually override the $TROUBLESHOOT environment variable in
ramdisks, by not declaring it as readonly. Yay for insufficient
end-to-end testing.
Change-Id: I026c9dbdd411bf3eb945d5b18188eb1eedf3850a
We now allow operators to drop into a troubleshooting shell while
booting a deploy ramdisk, without having to have pre-configured their
desire to do so ahead of time, by means of a 10 second pause for them to
press a key.
Change-Id: I05ffa1ebaa95c83dee7bd2a2f52ba4c08928bb10
If we are booting pxe booting using syslinux, and it has IPAPPEND 2 in
the boot stanza, then it will append the mac address of the device we
are booting from to the kernel parameters where we can get at it
pretty easily.
If we are booting physical hardware via UEFI over the network, we can
rely on the BootCurrent EFI variable to point at the boot entry for
the NIC we booted from, which will include the MAC address of that
nic.
If neither of those cases are in play, we can just fall back to the
all-physical-devices-with-links code.
This currently uses the Bash 4 support for associative arrays to handle
the netboot-in-UEFI case, if needed I can rewrite it to be Bash 3 compatible.
Change-Id: I5e50e30c60d6d732a09ab61251cbb9be08bb6113
Since we are using bash syntax in some of the element fragments,
we should make sure we use bash for all of them, so that things don't
break on systems where /bin/sh != /bin/bash.
Change-Id: If2f043c57aa4e1492b7f9839213ef6123f683612
We now run the network bringup portion of the ramdisk init from an
init.d script, thus allowing image builders to inject code into the init
script before that point (e.g. configure network hardware).
The environment variables used by the network bringup code are retained
in the base init script so they can be overridden by init.d fragments.
Change-Id: I1ef0bb21e7f26c0ff3f02266f853ce5402bcb94d
Closes-Bug: #1252023
Check if Upstart exists before blocking the daemon. Not all dpkg based
OS's have Upstart installed so this should help increase compatibility.
Closes-Bug: #1251949
Change-Id: I2dcb1ff3641778b5653ca5762a728398adb57da1
We assemble the init script of ramdisks with the fragments from included
elements, alphabetically.
We now place leading numbers on all of the fragments we ship, to make it
more obvious to element authors and downstream users, how the process
works.
Closes-Bug: #1251706
Change-Id: I56b0d42971c8c462eddcfe1769f8124405e1233c
dib-init-system script is installed into $PATH. Called
without arguments it will print the name of init system
used to stdout.
Additionally, set DIB_INIT_SYSTEM environment variable to
the init system used.
Tested on ubuntu+upstart, centos+upstart, fedora+systemd,
debian+sysv.
Closes-Bug: #1251610
Change-Id: I29668079091f6060dab66d8259890384d3bbd653
This is needed to run scripts from devtest, in particular so that
swift ring files can be distributed.
Change-Id: Icbe8c5b24a0d494730357983f230a37a7f078de7
This commit refactors the python code in diskimage_builder slightly. This is
in preparation for a larger review that adds more functionality to the python
code, namely the ability to apply elements to the current system as opposed to
a chroot. Further, the refactorings can stand on their own for better clarity.
They include:
- renaming elements.py to element_dependencies.py. Adds clarity about the
purpose of this module.
- updating other code for this rename.
- move tests into a tests submodule.
Change-Id: I5519cc52398e442b24e33802bae42070d64b0c1d
ramdisk-defaults file is sourced before chroot to an image being created
is executed. Busybox path should be set inside chroot instead.
Change-Id: Ic0e1d3093ca9d489dd96b14157e93b336cf0baee
To comply with the new hacking>=0.8.0,<0.9 requirements,
assertEqual is used instead of assertEquals which has been deprecated,
giving the error H234.
Change-Id: I3cbef1353260aec1502114010e12d0e507376389
The command `sudo rmdir $TARGET_ROOT/lost+found` will fail
if `$TARGET_ROOT/lost+found` directory doesn't exist,
e.g. when you use non-default image.
Fixes bug #1245856
Change-Id: I48c8f2f201b29912a726249023ca7d20893cc958
These are different tftp implementations, tftpd-hpa and tftpd-server are
equivalent, this mapping was added in a previous commit.
Change-Id: Idd1f554d4ee8e1d3c515d5f2f191e90abe0ff396
Now that we have moved onto neutron-dhcp-agent. dracut-network is no
longer needed, infact it was getting in the way. Dracut wasn't
requesting the classless-static-routes dhcp parameter but was
configuring networking. Removing this causes the network service to
redo dhcp and set the appropriate static route (specifically so
overcloud nodes are routed to the correct metadata server). This element
is still required for undercloud nodes so needs to be included there.
Change-Id: Ic23560164aff7791dd87ed2c3ad008efd248ae93
This will be needed by a patch I'll be submitting to t-e-i to
change the tftp implementation used by ubuntu, so that both
Ubuntu and Fedora can use the same implementation.
Change-Id: Ie9581265dfa2c37342e01162fe580b1948dd3e03
We need this for the Horizon element (which should work both on debian and
fedora-based distros).
Change-Id: I3a1dacbd1823abe051ba977b92b67ed27423f405
Signed-off-by: Tomas Sedovic <tsedovic@redhat.com>
I am getting a lot of http 404's from Fedora mirrors, in particular in
the US. Alternatively we could get cache-url to use previously existing
files if they exist and there is an error but this may not be the
correct thing todo in all cases.
So for now we do a retry if HTTP 404 is returned to the request for a
Fedora image.
Change-Id: I7634aeac3bdfe6930fafe6d276186c09fc8587b5
Commit 0210be22ae introduced the
possibility of basename being called on an empty string. Because
that can happen in normal operation (such as an x86_64 kernel,
in which case the PAE check will find nothing), don't allow the
basename error to kill the script. Also ignore failures in the
second basename call so the proper error message is echoed.
Change-Id: I38a18af09ab24fda9c98cbf3ace8fd7acc6faef5
When picking the latest version of the kernel on i386 we should prioritize
PAE kernels. Debug kernels will be ignored.
Change-Id: Ic0fc5907074ee2a5ddfbbb1db2f1c8a6060cae9f
Related-Bug: #1240873
disk-image-get-kernel picks the wrong version of kernel and initramfs
if there's a PAE and non-PAE version present. Only affects i386 images.
Change-Id: I06e08fdf038988759b620f549261499cb0a69b34
Closes-Bug: #1240873
We now forcibly remove all framebuffer video drivers from ramdisks, as
part of our ongoing effort to keep every kernel we boot, in text mode,
so it can be more easily intercepted by LOM hardware, nova console
logging, etc.
Fixes-Bug: #1178409
Change-Id: Ia72211c97c03c3f60eb9a1483297fe587de51f0b