Our custom dib-run-parts now supports --list for better compatibility
with some OS-provided run-parts tools.
Change-Id: I2feb615b2094d9d6522bfe9b422362223bb8e652
Closes-Bug: #1190521
Installing redhat-lsb-core adds 87M to the install due
to bugzilla #1002342
lsb_release is a platform agnostic script, so this change fetches
a single file via source-repositories from linuxfoundation bzr http
and installs it to /usr/local/bin
Change-Id: I4c979d4eb5e34a753d9143d9dcfe4e5d08f74a0d
Adds a file type to source-repositories to allow individual files
to make use of source-repositories caching.
REPO_DIRECTORY has been rename to REPO_DEST since it is now sometimes
a file.
This change also fixes the incorrect path to the cache-url in the
tar type.
Change-Id: Ib79e41969c982a02f0235318d9f254b39c3c6d93
patch is installed indirectly via redhat-lsb-core, so it
should really be installed directly.
Meanwhile, Daddy Shadowman waited for these patches to be
submitted to bugzilla.
Change-Id: I2107cf7be99f396c5dd489a2693b949022a512e7
If you want to have the installation update packages, you'll
need to register the system log in to rhn and subscribe to an
available subscription.
export DIB_RHSM_USER to your rhn username
export DIB_RHSM_PASSWORD to your rhn password
To get the qcow2 image, log into rhn.redhat.com and download the
image from
https://rhn.redhat.com/rhn/software/channel/downloads/Download.do?cid=16952
Then export DIB_CLOUD_IMAGES to whereever you're hosting the qcow2.
Change-Id: Idb547f4ffe75514b1e3f6b34f5f347493b132925
If GRUB2 is not available in the system a fallback to install Extlinux
will happen. This patch also allows you to enforce the use of Extlinux
exporting the DIB_EXTLINUX variable.
Change-Id: I88fa792a0bd19cacca167134f2054b11c807a451
This patch is part of a another big patch that will implement a fallback
to Extlinux in case GRUB2 is not available in the system. The reason why
it's being splitted in two patches is because git is not being able to
recognize the file changes when the rename happens in the same commit.
Change-Id: Ic2027dfa057fd6d62b532203b7ff50c3c739bccb
The element bind mounts a pip cache inside the image build chroot so
that pip downloads can be reused across image builds. While similar
in purpose to the PyPi element that sets up a mirror, this element
just allows for a reusable download cache and doesn't require anything
to be setup beforehand.
The pip-cache element is not concurrency safe, and that is indicated
in the README for the element. An upstream bug was file as well:
https://github.com/pypa/pip/issues/1141
Change-Id: Ibd1d4ea17c24923ed939357ada95b781e3179cfd
Rather than dublicating code to implement rhel or any
other derivitive, this patch introduces an rpm-distro
element that should be used as a dependency.
Change-Id: I8a92bb041764d03f430b438f0013704f79a8674c
If the loop partition isn't created as a device by the kernel, go ahead and use
kpartx to create the device.
Change-Id: I53290b7724d0cb45a1fc9225ec096025db8978dd
When ramdisk-image-create is called with the hwdiscovery element,
it failed to install hwinfo package.
The root reason is 10-hwinfo is not executable, the fix is to
set the file permission of 10-hwinfo to be executable.
Change-Id: I3a57147103f607b3975eb6ad23a44475f26c2f1e
IP address is passed as a kernel boot param when booting undercloud
machine. For Fedora 19, this IP is not set, instead IP is fetched
from DHCP.
The problem is caused by a bug in dracut-network version 029, which
causes that dracut network setup script is not executed properly. This
patch applies a fix for the bug when building undercloud image.
Fixes: bug #1213833
Change-Id: Ie94a86ed716044343791628973143c1a7d0778dc
The yum element provides for specific customizations
for yum based distros. The included customization is
a yum cache mounted outside of the chroot so that yum
downloaded packages are reused on subsequent image builds.
Change-Id: I6833c9fdbc83cb09debec6a789082e105c917800
The dynamic kernel module system is not available on RHEL, CentOS,
Scientific Linux, or SUSE. Make it part of the distro post-install
rather then base post-install.
Change-Id: Ic2c345bf9f0738dadae611194e263d3a5d424a3e
- pip install to a github URL without a git+ prefix fails.
- Need to close EOF heredoc when creating mirror.yaml
Change-Id: Ic555174881e9c06fede1cf731141cbe6eb0e0b02
Using a custom pypi mirror can be very convenient, making image builds
substantially faster - because we create multiple virtual
environments we benefit more than single-virtualenv users would.
Change-Id: I997daf1f9477c447e1fb30818aea9e80a49b31a6
Manually listing the mount points that need cleanup is not
maintainable and makes it hard to write elements that use bind
mounting to inject resources into the build environment.
Change-Id: I7c9ade444f4ebe42552f8e321f257a7ec0a674ef
The images produced by the diskimage-builder have their filesystem with
a label of "cloudimg-rootfs", The regex changing fstab on fedora didn't
match the F19 case.
This regex matches both
F18 :
LABEL=_/ / ext4 defaults 1 1
F19 :
UUID=f2da0fc8-2e12-4a6e-8e95-a31a474aa1a8 / ext4 defaults,noatime 0 0
Change-Id: Iafcf5e069199f1df76874309b2d5064f343fb5e5
We try to expose metadata to users about what dib included in the
image and source-repositories was not doing that, so this fixes it. It
also permits easy introspection from other elements (such as an
upcoming PyPI cache layer).
Change-Id: I1e48e65f69ebe1f4556cc3bf35ccf195e99bcc76
Ubuntu 13.04 has been released now for 3 months. The updated libvirt,
openvswitch and kernel are all beneficial to various OpenStack components,
and many other software is updated beyond the versions in Ubuntu 12.10.
Change-Id: I358aed8bf906c3ff5103f19b1f9e6ac689b5d5ee
source-repositories uses find to discover things it should import. If
someone happens to use emacs, and happens to have had an autosave file
in a directory with a wildly broken version of a source-repositories-
file, then dib will attempt to execute the contents of the autosave file
and the user will be sad. Adding a filter to the find command for files
ending in ~ will prevent pain and suffering.
Change-Id: I27c8a4b53d3c9b913ca926db16b4271941f6fb5d
devstack-gate needs to be able to make an image that has pre-downloaded
but not installed a sequence of packages. To support that, add a -d flag
to install-packages to allow downloading but not installing. -d passes
through on a dpkg install, and with this patch should be transformed
to --downloadonly which is the yum version.
Change-Id: Ia4e61fa4304df86afbee7dfc8067ea1bdf528f3e
Symlink /usr/lib -> ../lib for Fedora deployment ramdisk. This
symlink is needed for systemd-udevd. Otherwise, the network device is
not loaded and initialized when the deployment image is booted. This
logic was previously contained in
elements/deploy/root.d/50-redhat-prepare-fs, but now that ramdisk
images are built in a chroot, the change needs to be moved so that it
is applied to the ramdisk build.
Change-Id: Icea43230126956ccf5fb8a6a96ca706b75d5c32f
Create an install hook where core utilities can be installed
on Fedora. In this case we are installing which.
Which is being used by
ramdisk/post-install.d/01-ensure-binaries
vm/finalise.d/51-grub
The absence to which caused the ramdisk build to fail on F19.
On Ubuntu which is installed with the package debianutils, this pretty
much has to exist on Ubuntu images, so a corresponding package install for
ubuntu isn't needed.
Fixes Bug 1202612
Change-Id: I847c1619cdab021c9348caed3fa32db64e663e8e
- Ensures /sbin and friends are in $PATH when invoked (without this,
various sudo invocations fail in exciting ways).
- Use dib-run-parts in lib/common-functions instead of run-parts
(neither SLES nor openSUSE ship run-parts).
- Ensure dib-run-parts doesn't descend into subdirectories (same
behaviour as run-parts).
- Move dib-run-parts from root.d to bin (cleaner, consistent with
other elements with separate bin scripts).
- Tested by building Ubuntu image on openSUSE 12.3.
- Note: this doesn't add support for creating SUSE images, it just
lets you run disk-image-create on SUSE-based distros.
Change-Id: I906c6bc3cf51cdf2c4415adeae1ca250faac25e1
The search and replace that converted dashes in REPONAME only converted
the first dash. They should all be converted.
Change-Id: I76a48cf5bdfa8664f0a65d0238fa4da7d80305db
source-repositories does a git reset on the .git directory of cached
repositories. But doesn't specify the directory to reset. A working
directory needs to be specified so that the $PWD isn't used.
Without this change $PWD is polluted with the contents of repositories
being cached.
Change-Id: Ic37b702ac579bf766bb2204a988fa9468d308abf
Caching PyPI objects will require inspecting the content downloaded by
the source repositories, so needs to run after it.
Change-Id: I551c075e0bb6853b2ef79268b7f6455a4f06743d
Cloning large repositories over the internet can take considerable
time. Caching them locally makes repeated image builds significantly
faster, so lets do that.
When users override the element source they will often be using a
local repository, so in those cases I don't cache - but we could
easily change our minds on that in the future.
Change-Id: I9822362cf722b904d9806dbbb4bb07cfe2b33437
Similar to the Ubuntu element the Fedora element had not been updated
to honour --offline. Also similarly we only check for the existence of
the final cached file rather than the image we directly download,
because they are generated separately.
The -u change is just hygiene to detect future buggy changes.
Change-Id: Ib92a9d419bb485c8861da041066827e8d6aac0b7
When --offline is set elements should not revalidate cached data. The
ubuntu element had not been updated to match this. SHA checking is
also skipped as we only move a new cached file into place when the
hash matches, and we might download a new hash before updating the
image cache, which would cause persistent --offline failures.
Change-Id: If1a0366b51951a73b7a3ffe23a29a3d910b08938
In the 52-force-text-mode-console hook, gracefully exit when the
/boot/grub2 directory does not exist on the Fedora 19 cloud image
filesystem. By default the Fedora 19 cloud image is using extlinux to boot
the image instead of GRUB. The decision was taken because GRUB is quite
big (would pull in ~30MB of dependencies) and there's very little benefit
in using it because cloud images don't need to cover all the corner cases.
Change-Id: I52723d4d14c21b1787b4c7e0dd21a09cdbdae0d1
If you have an EFI host but the image doesn't have the EFI modules
installed the grub-install command will fail in case the --target
argument is not set. The problem is that the grub-install script will
check whether the /sys/firmware/efi file exists or not to determine if
it's an EFI installation, but this value comes from the host, so this
patch will look for the /sys/firmware/efi file and will also check if
the EFI modules are installed in the image, if not set the --target to
a non-efi platform.
Change-Id: I4481b43e4a8fe4144be9c7eb9d9c618bbb2df21e