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
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
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
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
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
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
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
raw.github.com now redirects to raw.githubusercontent.com and various
curl commands are failing unless they include "-L".
Change-Id: I07d9c2f9caa2abc82ffd57435335875df5fbc96f
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
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
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
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
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
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
The recent devstack-prereq refactoring made a wrong assumption
about the CWD of the script. cd first.
Change-Id: Ib2210d00668df95c1d731b75f7dd6dc958729d4f
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
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
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
* .../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
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
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
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
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
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
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
* .../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
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