Commit Graph

678 Commits

Author SHA1 Message Date
Jenkins
9941326be6 Merge "set -u doesn't permit bash arrays to test -n" 2014-05-21 20:21:11 +00:00
Jenkins
44922b8247 Merge "Ensure we can read the kernel out." 2014-05-20 03:18:42 +00:00
Jenkins
f70a9fa4e2 Merge "Add map-services for debian distros." 2014-05-19 21:23:00 +00:00
Jenkins
d69c0fce86 Merge "Fedora: Add support for configuring Yum mirrors" 2014-05-19 15:52:13 +00:00
Dave Thomas
1a70916bca set -u doesn't permit bash arrays to test -n
Although set -u allows empty WHITELIST=() list to be set, you can't test
-n "$WHITELIST".  Looks like the intention of the commit that caused
this issue (Change-ID Iad2d490c86dceab148ea9ab08f457c49a5d5352e) is to
set a policy to prevent future use of bugs due to unbound variables.

Thanks StevenK for pairing with me and helping me hone my bash skills.

Change-Id: I2349c990ba53b0aaecd5119812582c7c848f1e4e
Closes-Bug: #1319987
2014-05-16 13:16:06 -07:00
Jenkins
a719b9fa5f Merge "4 spaces indent" 2014-05-14 08:26:08 +00:00
Robert Collins
072fee1a74 Ensure we can read the kernel out.
If the kernel is restricted read (as a security measure) we may not be
able to read it without chmodding it.

Change-Id: Ib577705c27d8c351288334de03a7848cf49f2de9
2014-05-14 04:25:05 +12:00
Jenkins
dcb5f57a5a Merge "Move instead of copy the temporary git manifest" 2014-05-12 03:02:28 +00:00
Gonéri Le Bouder
ea3f4dd459 4 spaces indent
ensure 4 spaces indentation is used everywhere.

Change-Id: Ieb48faacb4c96b7b358771d70c17f2f22d0354f4
2014-05-10 11:17:29 +02:00
Trent Geerdes
771ed1903c Adding -x to set parameters for more output
When the cache tarball gets fail the output doesn't indicate
what url is failing.  Adding '-x' displays the urls attempted.

Change-Id: I71b2dbfd712e72c591410ca9b68edc76d493ad6e
2014-05-08 14:41:03 -06:00
Ben Nemec
16be6d7ce0 set -u and -o pipefail everywhere
As with the previous similar changes, this is intended to catch
problems as they happen instead of ignoring them and continuing on
to potentially fail later.  Setting this on all existing scripts
will allow us to enforce use via Jenkins.

Change-Id: Iad2d490c86dceab148ea9ab08f457c49a5d5352e
2014-05-06 15:51:07 -05:00
Dan Prince
131fb6e4db Fedora: Add support for configuring Yum mirrors
Updates the fedora element so that DIB_DISTRIBUTION_MIRROR can
be used to configure a custom Yum mirror on Fedora. This
implementation replaces the baseurl in each of the default
Fedora Yum .repo files so that a custom mirror URL/path
can be supplied. The URL should point to the directory
where the updates and release directories exist. Example:

  http://download.fedoraproject.org/pub/fedora/linux

As part of this change we also remove any existing
metalink settings in the .repo files to cover the case
where an end user runs their own createrepo command
to create the mirror... which means your metadata won't match that
of the normal Fedora mirrors and your baseurl won't get used.

Change-Id: I1a49a2941b1cc489e91a72b87430393cd32e865d
2014-05-06 10:11:26 -04:00
Jenkins
dde3360057 Merge "Support declarative package installs/uninstalls" 2014-05-06 08:51:29 +00:00
Dan Prince
3a7800ec99 Add map-services for debian distros.
DIB's map-services is currently used in TIE's os-svc-config
binaries to support service name lookups. Many of the systemd
specific functions require bin/map-services to exist.

This change adds bin/map-services files that are noops
to both the debian and ubuntu elements so that as those
distros move towards using systemd they can make use
of the functions we already have in place.

Change-Id: If8d61f3858b11de86c3292e840d033e5e3cecedb
2014-05-05 16:08:40 -04:00
Ben Nemec
79ab95b16e Make sure all scripts are set -e
If scripts are not set -e then errors can be ignored, causing more
confusing failures later.

Also adds an exclusion comment to the ramdisk init script since we
don't want that to exit on failure.

Change-Id: Idf43993bd10b1ef16c1d3b0d9df8d0ad94c46458
2014-05-02 17:18:54 -05:00
Jenkins
928e6f237b Merge "debian: properly deal with Debian stable/unstable" 2014-05-02 15:37:26 +00:00
Jenkins
d99d8092a7 Merge "Add sysv support to elements/dhcp-all-interfaces" 2014-05-02 08:59:46 +00:00
James Slagle
7f9ebf2632 Support declarative package installs/uninstalls
Adds a new element, package-installs, that provides an interface for
declarative package installs and uninstalls. Packages to install can be
added to an install.d/package-installs-<element-name> file. The set of
packages listed across such files are installed in a single transaction
at the beginning of install.d.

Prefacing the package name with a "-" indicates that the package should
be uninstalled at the end of the install.d phase. Again, the full set of
uninstalls are done in a single transaction.

An element providing a package-installs file should add package-installs
to its element-deps file.

Change-Id: I5b540388eff1079c8dee933b869463371481152b
2014-05-01 08:47:14 -04:00
Gonéri Le Bouder
6da238485d debian: properly deal with Debian stable/unstable
This commit fixes the if/else block around Debian stable/unstable which
was badly merged during the last rebase.

Change-Id: Ia2eb806da3d7c8d28afffb026f35600c7125d8d7
2014-04-30 18:29:31 +00:00
Jenkins
b46ece4de9 Merge "debian: add systemd support" 2014-04-30 12:08:01 +00:00
Jenkins
6e1b64deb3 Merge "debian: support upstart on Wheezy" 2014-04-30 12:01:12 +00:00
Jenkins
71fafff215 Merge "Permit cache-url to work with fifos." 2014-04-30 08:30:44 +00:00
Jenkins
8bba3a2137 Merge "cleaning up 01-copy-manifests-dir" 2014-04-29 22:32:08 +00:00
Jenkins
301dc5cc0e Merge "set -e all the things" 2014-04-29 11:29:43 +00:00
Jenkins
1384f8aa16 Merge "Map openjdk-7-jre-headless to RHEL+SUSE" 2014-04-29 08:10:37 +00:00
Jenkins
59a2ccc6c3 Merge "Add package uninstall support" 2014-04-29 08:10:31 +00:00
Robert Collins
481f8de56a Permit cache-url to work with fifos.
This makes it easier to work with temporary files - less traps
scattered around higher layer code.

Change-Id: I2fdd93115a7b0d289c2e28f8c133d4059de75b87
2014-04-29 14:46:50 +12:00
Jenkins
8a566e67a6 Merge "Explicitly use bash" 2014-04-29 01:35:22 +00:00
Gonéri Le Bouder
9e60987e40 debian: add systemd support
This patch adds a debian-systemd element to get systemd support with
Debian.

A backport of systemd is used on Debian Wheezy.

Change-Id: I095c81b2c32844fccf940c97b79054923c25b8c2
2014-04-28 16:51:13 +02:00
Gonéri Le Bouder
155accb599 debian: support upstart on Wheezy
Upstart cannot be installed by debootstrap on Wheezy because of a
conflict with sysvinit. sysvinit is flagged a being “essential” and
apt-get will refuse to remove it.
See: https://bugs.debian.org/668001

This patch uses another strategy. We install a standard sysvinit
Debian chroot with debootstrap and during a second step, we
replace sysvinit with the wanted init system.

Change-Id: I081c81b2c32874fccf940c97b79054923c25b8c2
2014-04-28 16:51:13 +02:00
Jan Grant
90bbd1e98f Debian element should activate eth0
Cloud images expect the primary interface to run dhclient in order
to come up and acquire an IP address. Although we have technology
to manage without this for the undercloud and so on, the seed
still relies on this machinery in order to bring up its first
interface.

Change-Id: I079a679779de760ee9ca6f93cbb22e69a65e03af
2014-04-28 13:01:45 +01:00
Jenkins
b1e8c082c3 Merge "Add a mapping for kernel headers" 2014-04-26 00:38:12 +00:00
Ben Nemec
f6ba2aeaf4 set -e all the things
Using set -e in all of our scripts will prevent some subtle bugs
from slipping in, and will allow us to enforce use of set -e with
tooling.

This change also adds -u and set -o pipefail in the less complex
scripts where it is unlikely to cause problems.  A follow-up change
will enable those options in the complex scripts so that if it
breaks something it can be reverted easily.

Change-Id: I0ad358ccb98da7277a0ee2e9ce8fda98438675eb
2014-04-25 17:38:51 -05:00
Ben Nemec
0b367e919b Explicitly use bash
In the mailing list discussion, everyone seemed to agree that we
should just be explicit that these are bash scripts since that's
where we're testing them and there's no good way to ensure they
work on any other shells right now.

Change-Id: I86c41d2cddf6e91e7deeb4c2ab51635c80a1ce0c
2014-04-25 17:38:41 -05:00
Jenkins
db1ba39fed Merge "Remove All Rights Reserved" 2014-04-25 21:23:02 +00:00
Monty Taylor
1c07d4ba1a Remove All Rights Reserved
The phrase is no longer needed as of August 23, 2000 with Nicaragua's
joining of the Berne Convention.

Additionally, in at least one instance,
elements/cache-url/bin/cache-url, its existence in the file between
Copyright lines is just weird and feels misleading, even though it is
not.

Remove all of the lines, because sanity.

Change-Id: I24fd76c2b4f66b8036010b5079db39ead729abee
2014-04-25 11:25:10 -07:00
Jenkins
e1c28525fc Merge "Place /usr/lib64/ccache in PATH" 2014-04-25 17:17:50 +00:00
Jenkins
0ec786e5a1 Merge "Revert default Ubuntu release back to Saucy" 2014-04-25 02:01:12 +00:00
Jenkins
0303108857 Merge "indent: replace tab by 4 spaces" 2014-04-24 23:19:09 +00:00
James Slagle
6824181354 Add package uninstall support
Adds the ability to uninstall packages to our install-packages scripts.

Change-Id: I72e0252968a151d71176aa479c7233f6df0a10ac
2014-04-24 16:57:20 -04:00
Jenkins
23bb91dd5b Merge "Disable splashimage for legacy grub." 2014-04-24 20:20:33 +00:00
Adam Gandelman
927f80adaa Revert default Ubuntu release back to Saucy
Trusty ramdisks do not boot, failing to exec init.  This reverts
the default DIB_RELEASE back to Saucy until Trusty ramdisks have
been properly tested.

Change-Id: I5ac81822b78805275268cecc021a74a62c22ef58
2014-04-24 11:19:43 -07:00
Monty Taylor
ace82f16e9 Add a mapping for kernel headers
Nodepool needs to be able to install kernel headers, which means we
need a mapping for redhat systems here.

Change-Id: Ic83d642b5ebe85b042cf7b23b295be74bbe185fa
2014-04-24 10:44:40 -07:00
Alexis Lee
21f01e937c Map openjdk-7-jre-headless to RHEL+SUSE
Provide package name mappings for openjdk-7-jre-headless:
        RHEL/Fedora: java-1.7.0-openjdk-headless
        SUSE: java-1_7_0-openjdk-headless

See https://review.openstack.org/#/c/86314

Change-Id: I3a351d0f9854f6f320ba145a71ffc66fd02c231c
2014-04-24 07:49:12 +00:00
Alexis Lee
6b2a78f3ab Sort rhel/bin/map-packages
Unlike the redhat-common and opensuse map-packages maps, the RHEL one
appears to be unsorted. Fix that.

Change-Id: I75c5d2694525731660c2a3b5b58ee696c61923ba
2014-04-23 08:53:03 +01:00
Juerg Haefliger
e5f537ff2a Add sysv support to elements/dhcp-all-interfaces
This patch adds support for sysv init to the dhcp-all-interfaces element.
Specifically, it adds a sysv init script and the relevant install/config steps.

Tested with Debian jessie/testing.

Change-Id: I4ae1d5365bafda188cb65ea1fb72d8ffe2408910
2014-04-23 09:20:29 +02:00
Jenkins
621d63ce2a Merge "Make "trusty" (Ubuntu 14.04) the default release" 2014-04-23 02:46:55 +00:00
Derek Higgins
df78cd3dca Place /usr/lib64/ccache in PATH
ccache wasn't being used on fedora as the symlinks are in lib64.

Change-Id: I810558799dd2382b36b5112e435b74fd5caa8ccf
2014-04-23 01:18:29 +01:00
Steve Kowalik
0072a39b2b Small fixes for dhcp-all-interfaces
I3166951c6fbb2faec53ffc339edd2fd0c3512300 recently landed without two
fixes that I suggested, namely using rm -f rather than testing for
file existance, and a comment fix.

Change-Id: I68e187e20802f3482d4c524a6c435fec7526178e
2014-04-22 16:39:52 +10:00
Michael McCune
bcf529ce80 cleaning up 01-copy-manifests-dir
This change adds extra tests to the
elements/manifests/cleanup.d/01-copy-manifests-dir script to prevent it
from exiting with an error due to non-existant files.

The premature exit condition only seems to happen when an image is being
created without including the "base" element.

Changes
* adding file detection tests for dib_arguments and dib_environment
files

Closes-Bug: #1308224
Change-Id: Iaa8bafb6765241408b9f02d4896913d15f2f401d
2014-04-21 16:42:44 -04:00