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
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
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
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
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
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
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
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
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
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
Adds a new "package" type to source-repositories. When the package type
is specified in an origin-repository-* file the package name and type
"package" need to be specified like so:
nova package
The existing map-packages mechanism can be used to map the specified
package name to the actual distribution package names. The
pre-configured package repositories on the image will be used to install
the packages during the install.d phase of the image build.
If the repo type is package, an environment.d hook script is updated
with an environment variable which is sourced by dib-run-parts. This is
so that other hooks, particularly in install.d, will know what repo type
was used and can make the correct decision about doing a source install
or not.
Change-Id: Ief4e524664cd32d2087aeb3b1766f05e017de91e
With smaller base images, such as Debian, the padding value used to
size the root filesystem does not leave enough room for grub which is
installed after the filesystem is created.
Change-Id: Ic2ab9e2efc9bf1b02f802ee47a36e3fff9c3512e
Before downloading and caching the latest version of grub2, we need to
first remove all old versions. Otherwise, the find command that writes
the grub2 version to /tmp/grub/install to install during the finalise
phase could pick one of the older versions of grub2 in the cache. This
will cause the install during the finalise phase to fail since the older
version of grub2 will conflict with the newer installed version of
grub2-tools.
Change-Id: I5b43e359db3ba81ed6283dfb41c7e89629516d38
Includes:
* Enhancements to the generate-interfaces-file.sh script
so that it generates ifcfg network-scripts for
distros like Fedora/RHEL.
* Includes a new dhcp-all-interfaces.service systemd
script which ensures network interfaces get generated
before the network service starts on Fedora.
* Add a new disable_interface function to
generate-interfaces-file.sh which (on Fedora)
will delete the ifcfg config for an interface which
isn't plugged in.
This is important because ifcfg-eth0 exists by default
and we want to remove it if the NIC isn't connected.
Previous behaviour on Ubuntu is unchanged and the
generate-interfaces-file.sh just logs it as skipped.
* General doc updates...
I tested this on a multi-nic machine w/ Fedora where the first NIC
exists but was not connected.
Change-Id: Ia99e312539da43caefd72aa60398d43dac5dcc8f
Closes-Bug: 1239880
Tcpdump has a fairly small footprint and should be installed to all
images (it currently is on the ubuntu image by default). Sometimes the
reason you need it is also the reason its to late to get it.
Change-Id: I4849157515b389d534bdee755cdac6b0768fcb29
install-packages is an executable script, it should be +x. The install
command that was installing it is setting permissions to 755, so we were
fine there. However, I was trying to test the script outside of an
image build to test a change, and it's helpful to have it +x in the
repository for that context like all the other scripts under bin.
Change-Id: Ic300cc56d463640d119db4e310d375c66ed133ca
If "kpartx -av" is called and there is no unused /dev/loop* device,
then kpartx fails. Calling "losetup -f" finds first unused device
and creates it if it doesn't exist.
Fixes bug #1195264
Change-Id: I5d59b519fd8e2a7380b71a788f9d3f2331b6567f
dib-init-system is installed in 04-dib-init-system. Before it is
installed, 10-dib-init-system.bash may be sourced so command not found
issue found.
The patch invokes "/tmp/target.d/dib-init-system" directly in
10-dib-init-system.bash.
Change-Id: I9843224497c7dab8392261b26d62b6d79d1795ee
cleanup for ramdisk failed to umount TMP_BUILD_DIR with device or
resource busy error.
The patch unmounts all the mountpoints under TMP_BUILD_DIR and
detaches loop devices associated with TMP_IMAGE_PATH.
The unmounts are applied with both force(-f) and lazy(-l)
options. Force option is only for NFS mounts, it's kept here since no
harm for lazy option.
Change-Id: I84035e6a003d8135186b2fda3facbd2c37967529
This is a dependency for the libvirt-python Python package that
ceilometer-agent-compute uses. libvirt-python is already installed globally in
the system via apt/yum, but that's not available to ceilometer-agent-compute's
virtualenv.
Change-Id: I07a12226889c6cda3bd04021240ee9714a396522
If we don't recognise git/tar/etc as source-repositories repotypes, we
now log the repotype, for debugging purposes.
Change-Id: I7b870807658441c928c7880291eb0284b6f97778
We now unconditionally cache the repositories being fetched with
source-repositories.
Additionally, by improving the way we handle repository refs, we are now
able to build images with code taken directly from gerrit reviews.
Change-Id: Ifd4c5691f6761eb5551663e6d0aa1c0e42afced3