Commit Graph

115 Commits

Author SHA1 Message Date
Jenkins
3144cc63be Merge "Allow for bad Fedora image mirrors" 2013-10-23 23:10:29 +00:00
Tomas Sedovic
1c132f6aa5 Add apache and mod_wsgi to Fedora's package map
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>
2013-10-23 15:23:42 +02:00
Derek Higgins
9947cdebd9 Allow for bad Fedora image mirrors
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
2013-10-23 10:49:29 +01:00
Lucas Alvares Gomes
0181b177c2 Remove old-kernels for fedora
Remove the old kernels on fedora to save some space in the image.

Change-Id: Ia7ace63c286052713ac1ef3092373cc2712db11a
2013-10-17 11:51:44 +01:00
Derek Higgins
11b116977c Specify distro release in fedora image name
The fedora element downloads the latest available image so presumably
will jump to F20 once available. Probably causing several days (weeks?)
of busted stuff. Of course it will be impossible to know when all users
of the elements are ready to switch but the least we can do is allow a
little time as a buffer.

This commit ties it down to a specific version which can then be updated
when the consumers of this element are ready. This allso follows the
same pattern as the ubuntu element.

Change-Id: I15c8e15a66e8af1bd152c27144acbc55af9da88e
2013-10-10 08:21:52 +01:00
Tim Serong
6da49c6d49 Use --numeric-owner when extracting base image
When extracting the base image without --numeric-owner, user and group
names in the tarball are mapped to uid/gid by the host.  This can cause
problems when building an image for some other distro than you're
running yourself.  For example, building an Ubuntu image on openSUSE
ends up with /var/cache/man in the image owned by 'proxy' (uid 13)
instead of 'man' (uid 6), because the host (openSUSE) uses uid 13 for
the 'man' user.  This particular man/proxy discrepancy results in
"fopen: Permission denied" errors when apt-get does its "Processing
triggers for man-db" thing in the Ubuntu system.  I wouldn't be
surprised if there were other kinks caused by this uid/gid mapping
discrepancy too, but that's the one I found so far.

The same thing can also happen with Fedora, but seems to be less likely,
or at least less obvious to me when building Fedora images on openSUSE.
But, IMO, it's better to be safe and just use --numeric-owner on all
base image untarring outside the chroot.

Change-Id: I9da5ac66dd182e7278fe4fee932093f61d35673a
2013-10-08 22:45:51 +11:00
Clint Byrum
f120e122bc Add mapping for atftpd in fedora/rhel
Upcoming tripleo-image-elements changes will need this.

Change-Id: I775dda78aaee892c8b47999707574054c3d9a95b
2013-09-26 10:38:44 -07:00
Matthew Farrellee
1d2a85d5e4 Add DIB_IMAGE_CACHE
DIB_IMAGE_CACHE will be a user override for the location where images
are cached. Default location is ~/.cache/image-create

Change-Id: I3e9b9f970864d555c9ec9436344b53f6d3d66dfa
2013-09-19 14:34:05 -04:00
Steve Baker
9ba761ef27 Install fedora grub from cached rpm during finalise
When uninstalling grub2, leave all its dependencies
including grub2-tools installed to minimise the number of packages
which need to be installed in the finalise stage.

Since the yum cache is unmounted during finalise, installing
grub2 in finalise is slowed by re-populating the yum cache.

This change copies the grub2 rpm out of the yum cache so it can be installed
from file during finalise.

This should prevent disk becoming full during finalise on Fedora.

Closes-Bug: #1217185

Change-Id: If095adc4abb52a19a3aa0b1caebfb3e4d8f605ef
2013-09-15 09:11:58 +10:00
Jeff Peeler
ccd7b86b60 Remove -r option from kpartx for successful build
This option does not exist on RHEL hosts and matches what is
currently present in elements/rhel/root.d/10-rhel-cloud-image.

Change-Id: I578233c1f37d035c67600fc60e7c4eb4ff75cbb3
2013-09-12 17:56:30 -04:00
Matthew Farrellee
43b96d91c2 Add package mapping for default-jre
Change-Id: Idffbc84ea2afaf2584c1bb79729c3e0cf52b851e
2013-09-10 20:01:21 -04:00
Steve Baker
c182fef45c On Fedora, use Linux Foundation bzr lsb_release
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
2013-09-04 10:16:49 +12:00
IvanBerezovskiy
d4a9b44e73 Add package mappings for MySQL-MariaDB
Partial-Bug: #1213891

Change-Id: I1ac1d11ff1716eccee4c734395282be25dd5b541
2013-08-28 15:04:12 +04:00
Lucas Alvares Gomes
5dd6c4a834 Extlinux fallback
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
2013-08-27 11:14:44 +01:00
Richard Su
1fb5d232be qpid package mappings
Change-Id: Iad2c21f3c2cd771f58d5444f61186b3aaf84e89e
2013-08-22 23:52:05 -07:00
Chris Alfonso
301c3c4475 Extracting common functionality for rpm based distros
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
2013-08-20 16:44:19 -04:00
James Slagle
c9a6aef9f4 Add yum element.
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
2013-08-14 18:26:51 -04:00
Steven Dake
2c73a001b2 dkms is unavailable on RHEL and derivatives
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
2013-08-12 19:07:28 -07:00
Derek Higgins
a5806cd482 Change the rootfs label in F18 and F19
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
2013-08-07 09:57:21 +01:00
Monty Taylor
c179d9b04d Add downloadonly flag to fedora
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
2013-07-27 12:17:02 -04:00
Derek Higgins
d8ba46f8e3 Install which on Fedora
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
2013-07-26 11:04:58 +01:00
Robert Collins
b8d08006db Update the Fedora element to honour --offline.
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
2013-07-18 13:19:35 +12:00
Jenkins
5d84c9ea46 Merge "Update Fedora cloud image to its latest version" 2013-07-15 15:37:53 +00:00
Matthew Farrellee
82eacdec2f Add package mappings for augeas-tools and openssh-client
Change-Id: I06e2c30ea13ff616ca2ae7c55a7c050aaae64df9
2013-07-12 10:24:15 -04:00
Kashyap Chamarthy
92313e0c81 Update Fedora cloud image to its latest version
Latest Fedora cloud images are available here

  http://cloud.fedoraproject.org/

With this change, when a Fedora version comes up,
d-i-b will point to it automatically.

Fixes 1199237

(Also, thanks to Lucas Gomes for testing.)

Change-Id: Ifcb8a48f3baf3ef841f00e6a20c6fd9f79fea129
2013-07-11 11:58:42 +05:30
Richard Su
9a81644d65 Fix loop0p2 does not exist on F19
On Fedora 19, there is a delay between the time loop0p2
is created to the time it is ready to be mounted.

This patches waits for 5 seconds for /dev/mapper/loop0p2
to be accessible. If it is not ready then the script
exits with status 1.

Fixes: bug #1197340

Change-Id: Iff0cfd0566673799a77500e0e24954f5f3743a17
2013-07-05 12:38:24 -07:00
Lucas Alvares Gomes
57a1304df9 Add arping to the fedora map-packages
Needed for the quantum-network-node element

Change-Id: I9a96476667c33a8260a60e7ad95c0f15166bc868
2013-07-05 10:21:33 +01:00
Lucas Alvares Gomes
095b0b3b61 Add mysql-devel to fedora map-packages
Needed for Ifc3580d4b59a5f1e97de77c0c4a875b123208100

Change-Id: I984a5c63a20bc79747d3d09affd9b45371c46702
2013-06-28 16:22:56 +01:00
Jenkins
860090bd1a Merge "Re-use cache_url() in fedora element." 2013-06-26 13:04:24 +00:00
Jenkins
2ced195d20 Merge "Fix pyOpenSSL on Fedora." 2013-06-26 04:25:34 +00:00
Richard Su
44df18af75 Fix cloud-init routing issue on Fedora
Add "NONZEROCONF=yes" to /etc/sysconfig/network to prevent
169.254.0.0 route from being created. This route interferes
with fedora baremetal nodes' access to the nova metadata
server at 169.254.169.254.

Change-Id: Iad77abfc97c0eba944680772f233389481a270ff
2013-06-25 14:49:18 -07:00
Lucas Alvares Gomes
1ee499729b Fix pyOpenSSL on Fedora.
On fedora 18 the package pyOpenSSL is conflicting with one of the
packages needed to build the bootstack image. The problem gets sorted
if you install pyOpenSSL at the beginning of the image building process
and this is what this patch is doing.

Change-Id: I681683b81ad638dfeb690fde1bc7d08a2116aaed
2013-06-21 18:08:44 +01:00
Mark McLoughlin
6c997fda97 Re-use cache_url() in fedora element.
The fedora element downloads images too, so we should re-use the caching
code from the ubuntu element.

There doesn't seem to be other examples of code shared between root.d
scripts. In the fedora and dpkg elements we copy install-packages into
the chroot, but that model doesn't apply when we're running scripts
outside of the chroot. Seems sane to just run it directly from the bin/
dir in the temporary hooks directory.

Change-Id: Iaa6aca660042fea323cab4271633a4bdbbc271b8
2013-06-20 00:04:59 +01:00
Lucas Alvares Gomes
f17e169f69 Add /usr/local/bin to the secure_path variable.
This patch will append /usr/local/bin to the sudoers secure_path variable,
by doing so commands prefixed with sudo will then find some binaries
delivered by other elements in that path (e.g nova-rootwrap).

Change-Id: I1ebad8b1932620559a3d90aa39298f9b12e636fd
2013-06-12 11:01:01 +01:00
Jenkins
e66bb40e7e Merge "Change the rootfs label in fedora's /etc/fstab." 2013-06-11 08:49:12 +00:00
Lucas Alvares Gomes
6219ad7917 Change the rootfs label in fedora's /etc/fstab.
The images produced by the diskimage-builder have their filesystem with
a label of "cloudimg-rootfs", so we need to change the default /etc/fstab
on fedora to reflect that.

Change-Id: Id1bb00cb81cb200a114f500e26272624be577da0
2013-06-11 09:46:57 +01:00
Jenkins
233ee29299 Merge "Add zlib-devel and qemu-img to fedora map-packages." 2013-06-10 22:13:44 +00:00
Jenkins
8c847b75c9 Merge "Add dracut-network element." 2013-06-10 22:07:09 +00:00
Lucas Alvares Gomes
f58adecaf6 Add zlib-devel and qemu-img to fedora map-packages.
Needed for building the bootstack image.

Change-Id: I4da14527f1647633213d86bef59fbd0eee3591f3
2013-06-07 16:42:39 +01:00
Lucas Alvares Gomes
4e4a88a387 Add dracut-network element.
This element will install the network modules for dracut and regenerate
the initramfs. The network support would allow us to configure the network
of the image via kernel cmdline instead of injecting files into the image.

Change-Id: I829405127e77aec80b99ac8dd2032cb0c6d81063
2013-06-05 14:18:57 +01:00
Jenkins
e34a211d21 Merge "Remove obsolete Fedora rc-local install.d hook." 2013-05-31 10:33:42 +00:00
Lucas Alvares Gomes
58538cea51 Remove obsolete Fedora rc-local install.d hook.
After the refactor of the first-boot routine there's no use for this
script anymore, in fact all it's doing is to create a broken link.

Change-Id: Ic09e7208bc950380341e8a073647950ac99a05fd
2013-05-31 11:29:23 +01:00
Matthew Farrellee
e6608d42da Switch from losetup+partprobe to kpartx for Fedora image creation.
Fedora's partprobe does not create devices the same way it does on
Ubuntu. Instead of using partprobe, this patch uses kpartx, which
works on both Fedora and Ubuntu.

Change-Id: Iac5cbac083e423425693c8210cd5d058ce4bce72
2013-05-30 17:32:13 -04:00
Clint Byrum
da02e05ff4 Fix fedora element to work with qcow2 images.
The images from mattdm were updated and also changed to qcow2 format.

Change-Id: I6560f177baa9a0e2d303364a3ad4eb216f1f2136
2013-05-25 06:24:08 -07:00
Jenkins
495381c2f5 Merge "Refactor the first boot routine." 2013-05-20 18:38:45 +00:00
Lucas Alvares Gomes
02ee161e81 Refactor the first boot routine.
Setting up a routine to run at first time the system boot may vary from
distribution to distribution. This patch will remove the logic from the
diskimage-builder code and put it into the elements.

The base element will now deploy a dib-first-boot script and each OS
element will ensure that this script runs at rc.local time. By doing
that we will put the OS specific stuff in the OS elements and remove
the embedded code out of the img-function file.

Change-Id: I24c5d1b1185de5693f145347fe912245f1ba7dfe
2013-05-16 15:50:10 +01:00
Steve Baker
6561ed2ce8 Run fixfiles restore in chroot instead of firstboot.
Boot time was 30 seconds shorter in an all-in-one devstack
environment.

Thanks to Ghe Rivero for a pointer to the solution
https://bugzilla.redhat.com/show_bug.cgi?id=208275

Change-Id: I90d0c96d5659326ba67d6119b96d9a4113adf7fe
2013-05-16 15:23:58 +12:00
Jenkins
7e0fe78cf2 Merge "Fix for running /etc/rc.local on Fedora" 2013-05-15 22:35:19 +00:00
Jenkins
010fef9843 Merge "Trigger SELinux autorelabel on first boot." 2013-05-15 22:32:42 +00:00
Steve Baker
d36ecfb75c Trigger SELinux autorelabel on first boot.
This adds about 30 seconds to my local boot time.

Fixes bug #1179730

Change-Id: I519bb9289236abd43f8eb784768dcab10e2e5754
2013-05-14 12:03:24 +12:00
Steve Baker
c6da246b73 Fix for running /etc/rc.local on Fedora
With systemd rc.local lives in /etc/rc.d and is only run
if the rc-local service is enabled.

This change creates a /etc/rc.d/rc.local symlink, and modifies img-functions
prepare_first_boot to tolerate an initially missing /etc/rc.local.

Fixes bug #1179674

Change-Id: I7e6102b62224950c1de5d48205dc4feff60f9389
2013-05-14 11:48:58 +12:00
Steve Baker
04e8d1cc00 install redhat-lsb before pre-install.d baseline-tools
baseline-tools expects lsb_release (although tolerates it not being there)

Order needs to be 01-override-yum-arch, 02-lsb, 03-baseline-tools
hence the renames.

Possibly lsb_release isn't cared enough about to do this.

Change-Id: I03abffb1ab2f560e746ba4ffd407605de31f4930
2013-05-13 15:58:31 +12:00
Steve Baker
aea625d64d install redhat-lsb-core instead of redhat-lsb
The later pulls in most of a desktop. The former still pulls in a lot
but significantly less, and still provides lsb_release.

Change-Id: Ie27310f01c037b4a10feb5e380e6f5c4ecf21364
2013-05-13 15:55:51 +12:00
Jenkins
999296272c Merge "Add few other packages to the map list for fedora." 2013-05-02 19:16:54 +00:00
Jenkins
90a64d745b Merge "Fix up the conflict between audit and glibc packages." 2013-05-02 19:16:11 +00:00
Robert Collins
cb62bae9b8 Build images using loopdev instead of qemu-nbd.
Qemu-nbd does not perform well with older versions of qemu due to
the lack of writeback caching mode. It also only builds qcow2 images
and there is a desire for raw image support. Finally, qemu-nbd makes
it very difficult to build images concurrently due to the somewhat
opaque nature of how it selects a /dev/nbd# device. losetup, on
the other hand, makes this process very straight forward.

Change-Id: I309fad8af4fd1e8d1720c17b65e1897a76d5e897
Co-Author: Clint Byrum <clint@fewbar.com>
2013-04-30 08:56:12 -07:00
Lucas Alvares Gomes
5bb6b362d4 Add few other packages to the map list for fedora.
Needed to build some modules with pip.

Change-Id: If6e210bbd68ffe7454069c4b0880ba787733aa7a
2013-04-29 16:03:43 +01:00
Lucas Alvares Gomes
da7e5b837c Fix up the conflict between audit and glibc packages.
Update audit in order to fix up a conflict with a file from the glibc
package on a fresh Fedora 18 install.

Change-Id: Ib44c8415bce4ec47e21626a697cf426b96a9061a
2013-04-26 11:55:10 +01:00
Chris Jones
a8312db742 Migrate cloud image URL/Release options to DIB_.
This switches $CLOUD_IMAGES and $RELEASE to the DIB_ namespace so
they will survive future changes to the sanitisation of the build
environment.

Change-Id: I7dc2aa82fb9ef452705b080cc404f41046014f20
2013-04-12 14:48:54 +01:00
Tim Miller
9eda303f5f Fedora element allows root to sudo without TTY.
The root user tries to `sudo -u stack`, without a tty,
causing fedora+devstack images builds to fail in Jenkins.

Change-Id: Ia0a7fb315cf9bd17cf250e70dba06363a697c97c
2013-04-09 16:46:16 -07:00
Robert Collins
5ada82a59c Add armhf support.
ARM doesn't have a generic Linux image due to the soc-specific nature of Linux
kernels today, so we drop the manual installation of that package, replacing it
with a dist-upgrade instead. This involved tweaks to the dpkg and fedora
install-package scripts.

Change-Id: I97924b80ca87781307e1087b9fe4b18215770e84
2013-04-09 08:17:22 +12:00
Clint Byrum
614b6af62f Fix heat-cfntools to work on Fedora
Also add redhat-lsb to Fedora images for lsb_release which should prove
useful as a way to do distro-specific things.

Change-Id: Ie32566349319ca244fa02065bb9f81c36c1b49fb
2013-02-27 18:15:08 -08:00
Steve Baker
48e22d91b6 Run alternatives pip -> pip-python
Checks to see if python-pip is installed and installs
an alternatives link at /usr/bin/pip

Change-Id: I858ac2597d3cacc79144a8b345faf6a2f7dee26e
2013-02-22 12:44:24 +13:00
Robert Collins
f42cb641bf Fedora needs to depend on dib-run-parts too.
Change-Id: I56611d1c2bf13c8d24a87869bf8334d8e4992f6f
2013-02-15 15:34:09 +13:00
Robert Collins
9afddcf266 New element that uses a fedora cloud image as the base.
Change-Id: I7d83bb2b359e7a8c3858eca04c96e35cf4e1fe9e
2013-02-15 09:33:29 +13:00