96 Commits

Author SHA1 Message Date
Clark Boylan
1d42cffaa1 Make sure we have a hostname when we grep for it
We attempt to set hostname in /etc/hosts if the hostname does not exist
there. However when the $HOSTNAME variable is empty we grep for
/etc/hosts from stdin which has no data. Check that $HOSTNAME is not
empty before we grep for it.

Change-Id: Ie35fd997f2f569ebea6614f91609281a991f8d6a
2014-06-10 20:15:33 -07:00
Jenkins
bb27e0ee15 Merge "Allow choice of GIT protocol used." 2014-06-11 00:32:54 +00:00
Ramy Asselin
7c7476ea71 Allow choice of GIT protocol used.
From within some corporate http networks, the 'git' protocol cannot be used.
Update the prepare_node and cache_git_repos scripts to default to using the
'git' protocol, but allow customiztion to use the 'http' protocol via command
line argument.

In addition, allow the full base url to be modifed as done in devstack stackrc
to also allow changing repositories.

Change-Id: I875f2e46c466e4e0fb7a5d4dbc54e958d91f9151
Partial-Bug: #1307702
2014-06-03 13:05:18 -07:00
K Jonathan Harker
fd3a3af97b Add the new hostname to /etc/hosts in prepare_node
It is good practice to update /etc/hosts with the new hostname when
changing it. Some programs (such as sudo) will give warnings if it is
unable to resolve its own name.

Change-Id: I5c95c9cadc32d7d42c6c6546e136a80f4a7e02f4
2014-06-02 18:45:14 -07:00
Monty Taylor
ac908ccde0 Update get-pip URL to the new location
The pypa team has made a new static location for get-pip.py. Instead
of downloading from github, we should use this.

Change-Id: Ifb7f00447d4a19f20f6413fa7fece5913de092f8
2014-05-28 10:16:16 -07:00
K Jonathan Harker
7fa0616201 Move openstack-specific config out of ::jenkins
The ::jenkins::slave class contained a lot of openstack-specific
configuration rather than configuration of a generic jenkins slave.

The term "bare slave" is overloaded and confusing: create simple_slave
and thick_slave to differentiate between the two meanings of "bare".
Some portions of ::jenkins::slave will move to simple_slave, some
portions to thick_slave, and some portions to slave_common (all in the
openstack_project module).

Change-Id: I5281a03a7f6da3f98714bcc59ae840ace8435578
2014-05-20 14:39:51 -07:00
Derek Higgins
64720b3acf Use grub2-mkconfig if update-grub isn't present
update-grub doesn't exist on fedora so if the legacy grub config file is
being used use grub2-mkconfig instead.

Also slightly change the sed GRUB_CMDLINE_LINUX regex so that it will
match if the command line already contains entries.

Change-Id: I21ce382a0023d674a4a2e6afecc9bc678791eac9
2014-04-30 01:30:42 +01:00
Jenkins
5e9e4932a3 Merge "Replace raw.github.com with raw.githubusercontent.com" 2014-04-29 17:08:00 +00:00
Monty Taylor
eae34d1cc6 Fix minor non-important error in cache_devstack
Found this while porting to diskimage-builder - the basedir value
is passed but not used. It's ok, because we happen to be using the
same value- but it's an error waiting to happen.

Change-Id: Ic2f39a9ff54c7bcdf3fcd48c4c6b2f98f6a88cf0
2014-04-28 08:19:57 -07:00
Monty Taylor
52e73c34d9 Remove chattr
Now that we create the file at boot time, it's not important that it
be immutable.

Change-Id: I06c60f61f51b791b7006983572b868c6d4459c68
2014-04-28 08:19:08 -07:00
Monty Taylor
743d66c162 Overrwrite resolve.conf at boot time
File injection on clouds really screws with us - so instead,
just handle it at first boot.

Change-Id: Iab15e5366dacdcc85211667bdec98b3d1a0c6926
2014-04-28 08:19:04 -07:00
Derek Higgins
75bafd95f7 Replace raw.github.com with raw.githubusercontent.com
raw.github.com now redirects to raw.githubusercontent.com and various
curl commands are failing unless they include "-L".

Change-Id: I07d9c2f9caa2abc82ffd57435335875df5fbc96f
2014-04-28 15:41:42 +01:00
Clark Boylan
271d48cbd6 Use os.path.exists when caching devstack images
os.path.exist does not exist. Use os.path.exists instead.

Change-Id: Iad18569a07fd714733f9c3a13e2fcf53d012d516
2014-04-17 13:43:21 -07:00
Sean Dague
c7563689ee cache get-pip.py
One of the few network interactions that we still have in devstack
gate is downloading get-pip.py from github (it's not even in the
pypi cdn). This fails a few times a day on average.

This is avoidable by adding get-pip.py to the devstack cache during
node prep.

Closes-Bug: #1299176

Change-Id: I72a75f27a416e9a4cc98b42c2702293676ca0e2d
2014-04-17 07:11:47 -04:00
Sean Dague
2437690c56 support the new devstack image finder
if the new devstack image_list.sh tool is found, use that are our
definitive image collection API out of devstack. We fall back to
the old method if it's not found, or fails to execute cleanly.

Change-Id: I9c59ac505b0a1085add76bfc6cb1b14e5545fc28
2014-04-17 06:40:11 -04:00
Jenkins
0188f8e5c3 Merge "Add a multinode label to nodepool" 2014-04-16 17:43:09 +00:00
Steve Kowalik
745aca9e3f Also clone os-cloud-config in prepare_tripleo.sh
TripleO is in the process of moving scripts out of incubator and into
os-cloud-config, so it needs to be available in CI.

Change-Id: I7fa902426fb1e341b05e561050956874090f925a
2014-04-08 16:17:24 +10:00
Jenkins
78206a2793 Merge "Always forward to 8.8.8.8 on test nodes" 2014-04-02 00:34:46 +00:00
James E. Blair
cd533419ef Add a multinode label to nodepool
Change-Id: Ie7cff6e6800d33c486f38d962e454049444d0df3
2014-04-01 08:36:44 -07:00
Jenkins
846e59e0d9 Merge "Revert "Adds second hiera data directory"" 2014-03-31 21:14:59 +00:00
James E. Blair
1ec999f890 Revert "Adds second hiera data directory"
This did not seem to work.

This reverts commit ed57cef9c5a65f429e07ce253668cd23ceb6c45a
2014-03-31 21:06:37 +00:00
James E. Blair
432b23f57d Always forward to 8.8.8.8 on test nodes
Our providers have unreliable DNS in different ways.  Instead of
special casing all of them, just always forward queries to 8.8.8.8
until we have our own neutron-local recursive resolvers.

Closes-Bug: 1286963
Change-Id: I5eca2e2db75b38f829ba458bb8c3789646f562c2
2014-03-31 13:05:39 -07:00
Jenkins
367beb3d98 Merge "Allow bare-precise nodes to sudo" 2014-03-31 17:57:18 +00:00
Spencer Krum
3db7f666c1 Adds second hiera data directory
This allows hiera data to be split into two buckets: sensitive and
non-sensitive. Sensitive data is put where it always has been. Non-
sensitive data, such as users ssh keys and lists of packages can be
put into the data directory contained within the
openstack-infra/config git repository.

This also introduces a more complex hierarchy: data is now split on
osfamily and lsbdistcondename. Operatingsystem is left for
compatibility.

Change-Id: I3b3faeab837aa5732da01e96bbe0c19aa936a58d
2014-03-28 18:42:33 -07:00
Derek Higgins
ab4cbd86c6 Prevent tripleo-bm-test network from setting DNS
On reboot DNS was being set to the IP of the test network dhcp. It
should be the DNS server set by the default network.

Change-Id: I6cc793f26e585e094914b666cdbd06b60b6fae3a
2014-03-27 14:37:45 +00:00
Derek Higgins
a788632557 Add support to restart unbound with systemd
Adds support for Fedora.

Change-Id: Ide7a63d070dac07b276dfa55da8db2ff089f1e71
2014-03-24 17:45:11 +00:00
James E. Blair
52857d1fd8 Fix tripelo-precise build script
The recent devstack-prereq refactoring made a wrong assumption
about the CWD of the script.  cd first.

Change-Id: Ib2210d00668df95c1d731b75f7dd6dc958729d4f
2014-03-21 17:09:02 -07:00
James E. Blair
56964870bc Correct invocation order of install_devstack_dependencies
CWD was not what it was expecting; it needs to run after the cd.

Change-Id: I3e2d8b84d144e8af4cd1b88b1a45d3d2d0385017
2014-03-21 14:09:25 -07:00
Jenkins
57d87997d2 Merge "Use unbound" 2014-03-21 17:29:49 +00:00
Elizabeth Krumbach Joseph
e79bbc8efd Only enable nodepool precise-backports on Ubuntu
In preparation for using Fedora with this script, only try to add
the precise-backports repo if we're using Ubuntu.

Fedora 20 has jq in the regular repos, so no Fedora version is
required.

Also fix permissions on install_devstack_dependencies.sh

Change-Id: I3544ddecb0e3ba9dc863f264d67669acd06616f3
2014-03-20 13:34:37 -07:00
Jenkins
c52a78cb33 Merge "Fix pip on py3k-precise nodes" 2014-03-20 12:32:02 +00:00
Monty Taylor
5c87003510 Fix pip on py3k-precise nodes
The puppet modules that run after install_puppet blows away the pip
installed pip and replaces it with distro pip. This becomes hard for
tox to reconcile when building a virtualenv with requirements which
declare a dependency on newer pip versions than got installed.

After setting up the script, remove the python-pip packages and
re-run the command to get current pip on the system.

Change-Id: Ie862cb35dd93cb655941ac556d2b07d5e6be9ca1
2014-03-20 00:56:59 +00:00
Jenkins
9bed815c87 Merge "Add support for Fedora 20 to nodepool" 2014-03-19 21:57:54 +00:00
James E. Blair
782cf9e38a Allow bare-precise nodes to sudo
Change-Id: I4adc220f487a7ccc9a474fc22018e997a76ed0d1
2014-03-19 11:31:57 -07:00
James E. Blair
e9a79e0db0 Use unbound
On all machines, set up unbound as a caching recursive resolver.
On single-use slaves, set it up to forward cache misses to the
DNS servers obtained by the template host on boot.

Change-Id: I8505f5a277f20b1328900a9a515cd84db77b2b3b
2014-03-18 09:23:38 -07:00
Jenkins
5f5d5f88ff Merge "Skip downloading giant VMware images" 2014-03-14 18:36:43 +00:00
Monty Taylor
2f2a69a271 Skip downloading giant VMware images
We're never going to use them in devstack-gate.

Change-Id: I66b7d768276616b8f11052449a41ca304cbf8942
2014-03-14 10:09:44 -07:00
Jeremy Stanley
3f2a7afd31 Restrict nodepool memory only when possible
* .../files/nodepool/scripts/restrict_memory.sh: We have different
bootloader versions/implementations on different providers and
platforms, and in some cases may even have no accessible bootloader
configuration at all we can modify. Make this script more adaptable
and make sure it does not cause image builds to fail when run in
those situations.

Change-Id: If47fcdb60142d38d604a8f49be7885e61df8f34b
2014-03-13 17:03:59 +00:00
Clark Boylan
efdad7853b Download each cached image once.
Nodepool's devstack image cacher was redownloading every image one time
per devstack branch. We only need to download the image once if the
image name doesn't change.

Change-Id: Ib1910c34b8479ebad740a915fcc9297205cbe387
2014-03-12 15:41:43 -07:00
Jenkins
52ce22a962 Merge "Limit non tripleo nodepool nodes to 8GB of RAM" 2014-03-12 18:01:13 +00:00
Clark Boylan
a0d04a6907 Remove unneeded package sources from nodepool node
We need additional package sources on nodepool nodes to install things
like puppet, pypy, and python3. But once these packages are installed we
don't need them anymore. Any test that does an apt-get update or yum
upgrade will hit these package repos despite not needing to. Remove the
additional sources after we are done with them to be nicer to them.

Fixes-Bug: 1253774
Change-Id: I3c5bd7e544076f26b224553bdea6134d39fc8bba
2014-03-12 10:03:31 -07:00
Elizabeth Krumbach Joseph
2eb2ab5db1 Add support for Fedora 20 to nodepool
For TripleO, one of our test cases is a fully Fedora-driven test,
this adds support for Fedora as a nodepool VM by adding support
to prepare node scripts.

Also adding install_devstack_dependencies.sh for Ubuntu and Fedora
shared dependencies for DevStack (and TripleO) preparation scripts.

Change-Id: I7399cc4d4b6ec6f8598afa68bc99ebb24cb01f64
2014-03-11 15:36:19 -07:00
Clark Boylan
392788204d Limit non tripleo nodepool nodes to 8GB of RAM
Limit the non tripleo nodepool nodes to 8GB of RAM regardless of the
flavor used. This allows us to use arbitrary flavors that may have the
CPU resources that we require without risk that we become dependent on
the vast amounts of RAM that typically come with more CPU.

While we are at it set grub timeout to 0 saving 5 seconds of boottime
for every server we boot.

Change-Id: Ia38341239e0189c84a21a4f58dd7ca637490a27b
2014-03-06 14:14:58 -08:00
Robert Collins
7c66394839 Install libffi-dev needed for python-glanceclient
Change-Id: I9e1815c685d8cd3256a50a7e5a5966ec91eadc8a
2014-02-28 12:58:46 +13:00
Clark Boylan
9ac5cbfbf7 Optionally give mysql user all global privs.
One our single use unittest slaves we want to allow unittests to create
and destroy arbitrary mysql database schemas. The simplest way to do
this is to grant all priveleges to the test user on the mysql server
globally. This is safe because the nodes are thrown away post test.

Change-Id: Ic92ff2f9c752d955e6f82eb4b88330b5448cfa75
2014-02-26 11:48:59 -08:00
Jenkins
f6064b9773 Merge "Mount ext3 filesystems as ext4 on single use slaves" 2014-02-24 21:49:58 +00:00
Clark Boylan
4cbe8ace5f Mount ext3 filesystems as ext4 on single use slaves
It has been suggested that tests may be happier with ext4 instead of
ext3 on the test slaves. At the end of building an image for single use
slaves modify fstab so that when slaves are booted with the image they
mount / as ext4.

Related-Bug: 1273386
Change-Id: I88409e734b1599a5517abfd9d76c7fd622c01bb5
2014-02-24 13:39:14 -08:00
Jenkins
3dd49c21b7 Merge "XenServer installer script" 2014-02-23 00:01:18 +00:00
Jeremy Stanley
9b4555321c Nodepool should clone the config repo from git.o.o
* .../nodepool/scripts/cache_git_repos.py: Since the projects list
is not being retrieved as part of a git repository, use HTTPS
protocol rather than HTTP so it will be consistent with the way we
retrieve the bootstrap script in prepare_node.sh.

* .../nodepool/scripts/prepare_node.sh: Switch the config clone
operation from the Gerrit server to the Git server farm, since the
former does not support git protocol. Also make it a shallow clone
since we just need the files.

Change-Id: I1dc0697bb3f9832d180b6b1ebffaa563bd886281
2014-02-21 19:34:29 +00:00
Jeremy Stanley
017889913a Make nodepool git repo caching more robust
Previously, nodepool's prep scripts would not abort when
encountering git cloning errors. Now we retry once on failure and
then abort if it fails a second time. Also the script now makes sure
the clone actually results in a functional copy of each repository
by attempting to list branches and reset to HEAD.

Change-Id: I84565e4e90b34c6a9b8c86754efdde137cda08b2
2014-02-21 16:23:10 +00:00