106 Commits

Author SHA1 Message Date
Jenkins
51ec23046a Merge "Silence zuul_swift_upload" 2016-04-05 15:03:17 +00:00
Jeremy Stanley
565c807d3b Add traceroute to default preinstalled packageset
When building images with diskimage-builder, include traceroute so
that it can be used as an ever-present diagnostic in a variety of
jobs without having to declare it in job-specific or
project-specific dependency lists.

Change-Id: Ic0be90226d01b399f3ca0c26ad6d43bcaa2a0bdf
2016-04-04 18:19:36 +00:00
Clark Boylan
90bc24b54f Add removal of grub boot timeouts back in
When we removed the restrict memory grub stuff because hpcloud was no
longer in use we also removed the configuration updates that set the
grub timeout to 0. This can save many seconds per instance boot purely
waiting for grub to timeout and continue booting the host.

Change-Id: I2d79ec4ebd55f927d868e06c8f00cf50f34f3b92
2016-03-30 15:20:10 -07:00
Jeremy Stanley
678c1c81b5 Drop tempfile workaround for aggregate bindep list
Since support for using "-f -" to read a package list from stdin
is supported in bindep 0.1.0 and later, remove the hacky temporary
workaround which stashed it in a tempfile.

Change-Id: I02d153113a160028658e38828e113fcf02bc5ab1
2016-03-28 14:03:18 +00:00
Andreas Jaeger
84e76e3f72 Silence zuul_swift_upload
At the end of gate jobs, we get warnings from zuul_swift_upload that
are not actionable for us.

Use requestsexceptions to silence these warnings. Add requestsexceptions
to the venv that is created for zuul_swift_upload to run in.

Example file
http://logs.openstack.org/48/298048/1/check/gate-ha-guide-tox-checkniceness/62e2d16/console.html

The example shows 6 warnings starting with:
/usr/zuul-swift-logs-env/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:315:
SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject
Name Indication) extension to TLS is not available on this platform.
This may cause the server to present an incorrect TLS certificate, which
can cause validation failures. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/zuul-swift-logs-env/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120:
InsecurePlatformWarning: A true SSLContext object is not available. This
prevents urllib3 from configuring SSL appropriately and may cause
certain SSL connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
...

Change-Id: I02b4b6c7b426f3e9aa498941e4d75f67066d4d27
2016-03-27 21:23:31 +02:00
Clark Boylan
53cd995cf6 Add element to handle generic package installs
We end up needing to install a fair bit of stuff on top of the minimal
images in order to make them useable. Do this in a generic infra package
needs element that can grow to accomodate our needs.

For the future we can hopefully get some of this into dib itself so that
others can easily build instances they can ssh into.

Change-Id: I5826df829971e182cd0713b29df1cf70c119a0ab
2016-03-17 12:26:58 -07:00
Igor Belikov
e57fe8bdf7 Add curl package to puppet nodepool element
puppet element calls install_puppet.sh script from system-config repo,
which depends on either curl or wget being installed in the system. Some
minimal images like debian jessie or ubuntu xenial miss those packages
and cause puppet element to fail when building the image.

Change-Id: Ic5124906b19b82d134a611e68fc7c5dd6fc88702
2016-03-16 16:18:30 +03:00
Paul Belanger
458f2fdb64 Fix typo with $YUM variable
Like ianw suggested, we should fallback to yum if ${YUM} is not
defined.

Change-Id: I9e2c632a3c7225d13e6245e65fa4da29ce7541df
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-03-07 13:11:10 -05:00
Jenkins
547aa9c06b Merge "Fix cache-bindep breakage on Fedora / CentOS" 2016-03-07 13:32:26 +00:00
Paul Belanger
7158aa01f8 Fix cache-bindep breakage on Fedora / CentOS
Currently, we don't have 100% gate coverage for
other-requirements.txt. As such, it is possible for our DIB builds to
fail on bindep.  So, we only cache packages for Ubuntu Trusty ATM
until we can enable 100% coverage for centos and fedora for
other-requirements.txt per project.

Change-Id: I0f06619224ab59bc6165316226abeccb75c101cb
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-03-06 19:27:58 -05:00
Clark Boylan
69a073edbe Don't cache inactive repos
We have attic and stackforge projects all of which are now inactive.
Because they are inactive we don't need to be caching these repos on
every test slave image.

Change-Id: I4df78c3d542758ce6159c195c1407f1d56f565a0
2016-03-05 18:01:08 -08:00
Ian Wienand
2badcc1893 Add a dib-builddate file
Add a build-date timestamp file to the nodepool-base element and
output that as part of the "network-info" macro that we run at the
start of most tests.

This will allow non-priviledged users to quickly see the date the node
running their test was built on, which can be correlated to the logs
on nodepool.openstack.org to help debug issues that might have to do
with the underlying image build.

Change-Id: Id0c9f6203ed487350285031d3965bc6290370a27
2016-03-01 15:16:15 +11:00
Jenkins
8aa39b8d06 Merge "Cleanup the early devstack clone script" 2016-02-16 04:25:36 +00:00
Andreas Jaeger
71d84bed47 Remove restrict-memory
We do not have HP cloud anymore, remove the restrict-memory files.

Change-Id: I68f8fbd01927ead42e9fab1ff41360f035275d4a
2016-02-15 20:04:12 +01:00
Ian Wienand
abbbf317ce Cleanup the early devstack clone script
This script is unnecessarily complex for what it is doing, which is
essentially pre-seeding the source-repositories cache for devstack.
As we can see from I41e81d6bac98875eecde2376e0865784626e11a8 it's very
confusing having large parts of the source-repositories script
copy-pasted as a separate element and has led several of us down the
wrong path.

Strip this script back to the simple thing it is doing, which is
checking out/updating the source-repositories devstack cache.

I have tested this by building an image with a warm cache and with a
cold cache, in both cases the checkout was found and the list of
images to cache in 55-cache-devstack-repos was found.

Change-Id: I6c686312de102cbe438585e26bf6986e06b6f41c
2016-01-19 11:11:28 +11:00
Ian Wienand
c70cf77969 Update remote refs in early devstack clone
In another confusing addendum to
I41e81d6bac98875eecde2376e0865784626e11a8 (which was already a
confusing addendum to Ieb6a6e9f55bd93f63c3d0a71828c276c2d02e1b9), we
have decided that the refspec used to fetch here is not sufficient to
clear out remote branches everything when updating.

"+refs/heads/*:refs/heads/*" says to replicate everything from the
remote refs/heads into our local refs/heads, but leaves out
refs/remotes/*

The upshot of this is that I41e81d6bac98875eecde2376e0865784626e11a8
will remove the local branches (refs/heads/stable/icehouse, say) but
not remove the remote branches (refs/remotes/origin/stable/icehouse).
The devstack caching script keeps picking up these remote branches,
checking them out, and consequently trying to download old images.

*Nothing* ever removes these branches.  In the main dib cache git
update, we also have --prune, but our refspec there is even more
limited (+master:master).  This explains why these branches never seem
to die.

Note, an even better mirror would be "+refs/*:refs/*" (in fact, if you
do git clone --mirror, this is what the repo would be setup with to
fetch by default).  However, this drags in "refs/changes/*" and all
sorts of other gerrit things.  We don't really need them so we just
keep the limiting on.

Change-Id: Ia9c3ffdb2b5f72a45d629961338b415308d6dd21
2016-01-19 11:06:12 +11:00
Ian Wienand
53832d82cd Prune old branches in early devstack clone
In a rather confusing addendum to
Ieb6a6e9f55bd93f63c3d0a71828c276c2d02e1b9, we have actually mirrored a
version of the source-repo script from dib and munged it to cache
devstack early so we can use it to find the vm images to download and
cache.

However, we are not ensuring that we remove old branches in this
clone, which is leading to the problems of us picking up images from
old branches that don't exist any more.

Change-Id: I41e81d6bac98875eecde2376e0865784626e11a8
2016-01-18 17:27:31 +11:00
Jenkins
c6526e5480 Merge "Install puppet using build_git system-config" 2015-12-15 20:41:09 +00:00
James E. Blair
381d507b04 Increase memory restriction to 9023M
On OVH and Bluebox, the memory layout is such that there is still
significant (~900M) memory above the 8192M address.  Increase the
limit to encompass that, which will bring these providers up to
approximately 8G, while increasing hpcloud (which is the actual
target of this restriction) to about 8.5G.

Change-Id: I5c121be55cadad13ad5807968f33b492f9b1e215
2015-12-15 10:32:06 -08:00
Clark Boylan
bffc38d470 Install puppet using build_git system-config
When running disk image builder use the build specific checkout of
system-config to install puppet and puppet modules. This allows for easy
local testing of changes to those scripts. Without it master is always
used.

Change-Id: Ifc86d77f702633d630adc1ee619f58607cb56c82
2015-12-08 13:43:47 -08:00
Andreas Jaeger
d8170deb07 Remove CentOS6 from nodepool scripts
With CentOS6 usage removed, remove special handling for it from nodepool
scripts.

Change-Id: Ife5ec9ade201dcd8f5969087dd2fc88be12dbebd
2015-12-04 22:11:22 +01:00
Matthew Treinish
3ed5aa98c5 Revert "Set a temporary cap on subunit2sql before 1.0.0 release"
The release has happened, the migration worked, all's right with the
world.

This reverts commit 04eb36588d80dd77a9c692f53470b7d727567604.

Change-Id: I28a3e9cf3b420a6ccca20c52c4e67adc3f5710c5
2015-11-29 17:01:45 +00:00
Matthew Treinish
04eb36588d
Set a temporary cap on subunit2sql before 1.0.0 release
This commit adds a temporary version cap on subunit2sql to be < 1.0.0.
The 1.0.0 release includes a very large database migration which will
be slow to execute. The python DB api from >=v1.0.0 will not work with
a database that doesn't have the updated schema. So while the migration
is running let's cap the version we install to prevent everything from
breaking while the migration is running. (which might take days)

Change-Id: Iab89beb5c7aba8b744a62f5063e513b72cab0ec2
2015-11-23 15:49:58 -05:00
Jeremy Stanley
23da1ea04a Revert "warm pip wheel cache during image build"
Turns out we can't do this without dirtying our images by
preinstalling all the libraries/headers our requirements want to
link against. We should revisit the wheel mirror solution which has
already been written as a saner solution.

This reverts commit 1503ef327817bd42cbf888e773f5639e660169a7.

Change-Id: I69ea73b6eb4b620f1ac77467ee3784ec3c813ee2
2015-11-04 20:40:23 +00:00
Sean Dague
1503ef3278 warm pip wheel cache during image build
This installs everything in upper-constraints in a throw away venv,
which has the knock on effect of fully populating the wheel cache for
root with wheels for everything. This hopefully speeds up all devstack
runs quite a bit.

Change-Id: I429f353c33d892f76552c83d34ac1329ed18f97f
2015-11-04 12:52:22 -05:00
Cyril Roelandt
2554d974b8 Add python3-dev
The gate-neutron-dsvm-functional-py34 job needs Python.h, and it is
currently not available when running Python 3.

Change-Id: I00ce26864db682a4577dc5360519918007aa5499
Partial-Bug: #1500400
2015-10-22 15:08:28 +02:00
Ian Wienand
90c53a8ded diskimage-builder element cleanups for dib-lint
Since I6c5a962260741dcf6f89da9a33b96372a719b7b0 dib has had a
standardised method for ensuring consistency of tracing and error
detection.  Bring the tracing for these elements up to that standard,
but maintain the status-quo of flags such as "-e" and "pipefail" by
adding ignore flags where appropriate (we can update these separately
to avoid breakage)

Other minor changes are alphabetical-ordering in the element-deps
files and permissions on prepare-node script

With this, "tox -edib" passes

Change-Id: Ibba1dadb9e819f94294c9d583b83ff698252f93f
2015-10-08 11:33:03 +11:00
Ian Wienand
32dcd6af92 Skip caching for dnf (Fedora 22) builds
We are still working on the caching story for dnf-based builds
(i.e. Fedora 22). There are a couple of options which we will work
through on the linked page.  We will sort this out before we move the
devstack job (yet to be created, because the nodes aren't there yet)
out of experimental.

In the mean time, disable the caching in these elements so we can get
Fedora 22 image builds (currently they're in a big looping failure
[1]).

[1] http://nodepool.openstack.org/image.log

Change-Id: I3a435889fc5109d7365240068047aac98abc605e
2015-10-01 15:35:16 +10:00
Jenkins
5cda264308 Merge "Use restorecon over chcon for unbound selinux" 2015-08-27 11:50:30 +00:00
Paul Belanger
f30d863496 Use restorecon over chcon for unbound selinux
Rather then explicitly forcing a security context for unbound, we
should restore the default selinux contexts defined by the OS.

Change-Id: I4bb21dcbbcbcff6a5458ebf9478f58d95ad7240a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-08-19 10:15:13 -04:00
Matthew Treinish
76d164b1ba
Create an os-testr venv for running subunit2html
This commit creates a venv for installing os-testr which will enable
all test jobs to have access to the subunit2html utility which has
been moved to live inside the os-testr package instead of as a slave
script.

Change-Id: I2050b54eb2def10438764f3eeb55ecf9caa874dc
2015-08-14 12:37:22 -04:00
Paul Belanger
ebdd2553d0 Remove color output from puppet apply
This help when reading log files from nodepool. Otherwise we see the
following in the log files:

  [1;31mWarning: Config file /etc/puppet/hiera.yaml not found, using
  Hiera defaults[0m

Change-Id: I3a865e5107e2749ed44c144539af49e311e0125f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-08-06 15:38:35 -04:00
Jenkins
78d105a8a4 Merge "Express nodepool base's dependency on puppet" 2015-07-15 13:12:01 +00:00
Monty Taylor
e3ad2d85d2 Express nodepool base's dependency on puppet
The nodepool base element really needs the puppet element, but we didn't
express that in the element deps. That makes a later reorg of elements
more difficult than it needs to be, because our consumption element list
is expressing internal dependency chains.

Change-Id: Ib2296bed1d7f289e7aa2720a38555275de1b6402
2015-07-15 08:34:13 -04:00
Jenkins
4d5bc96fa0 Merge "nodepool: describe nodepool-base env variables" 2015-07-14 16:06:26 +00:00
Jenkins
e998bfcabf Merge "Add dependency on nodepool-base to node-devstack" 2015-07-14 13:50:55 +00:00
Antoine Musso
9f5c63b0d3 nodepool: describe nodepool-base env variables
The nodepool-base element relies on a couple environement variables.
Describe NODEPOOL_SCRIPTDIR and NODEPOOL_STATIC_NAMESERVER in the
README.rst file.

Change-Id: I56f2aab095a0504e19598d7296d072e7a51b07c2
2015-07-03 21:28:08 +02:00
Jeremy Stanley
ff8a9f590e Clean up bindep invocation in cache-bindep element
Invoke bindep from the bindir for its virtualenv in /usr/bindep-env,
and guard its exit code with true since its normal behavior is to
return zero only when all needed packages are already present.

While here, replace calls to tempfile with mktemp since the former
is not readily available on CentOS 6.x.

Change-Id: I926e73f305b1b54f6855cc4acf3407e91b88213a
2015-07-03 01:31:40 +00:00
Jeremy Stanley
43e8e90cbf Don't fail to build cache on missing bindep lists
While git show is being used to build up a list of candidate
packages to cache, it can cause the cache hook to abort if it
returns nonzero because of a nonexistent bindep list file. Guard
that with a fallback to true so that the loop can continue
normally.

Change-Id: Ic3b773ad2e8efa2c450d37a0115355c0e95da853
2015-07-03 00:13:17 +00:00
Jeremy Stanley
0e079c607f Backward-compatible branch list for bindep element
The version of git on CentOS 6.x is too ancient to support git
branch --list which is necessary to disambiguate -r with a name
pattern. Instead just list all remote branches and filter with grep
like a good Neanderthal.

Change-Id: I4e673e86acb70c205d159e22b5864cf60ae831df
2015-07-02 23:41:52 +00:00
Jeremy Stanley
e700bd2820 Rename bindep package caching element for conflict
A quirk of diskimage-builder is that no two elements you compose are
allowed to have parts with the same filename. Rename cache-bindep's
install.d/50-download-pkgs so that it doesn't conflict with the one
of the same name in the cache-devstack element.

Change-Id: I5709147fc5bd4c06fb1bba8ea0e068c0eda7d010
2015-07-02 23:03:45 +00:00
Jenkins
bb486b5ebb Merge "Pre-cache distro packages from bindep lists" 2015-07-02 21:02:04 +00:00
Jeremy Stanley
a1f1ce370d Fetch all heads and tags when caching source repos
Passing a source-repositories ref of "*" signals fetching all heads
and tags rather than just a specific refname. This is desirable for
the warm cache on our job workers, since jobs may run against
arbitrary branches (or possibly even tags). The point is to have a
reasonably complete mirror of each repo, rather than a fairly
minimal clone.

Change-Id: I624ed1e259e007d4246afb45c3a0560598bfbe3f
Depends-On: I4562c9689a8d235ebe09b2f7178aa5890dbc85f1
2015-06-25 15:54:11 +00:00
Jeremy Stanley
fc39aea6d0 Pre-cache distro packages from bindep lists
We intend to use bindep to tell us what distro packages should be
installed at job run-time, so need to similarly identify those in
such a way that they can be cached on our worker images.

Install the latest bindep release from PyPI into /usr/bindep-env
(consistent with the way we provide virtualenvs for access to
zuul-cloner and libraries used by our log uploads to swift).
Concatenate bindep lists from all branches of every hosted Git repo
along with our fallback list in project-config. Run bindep to render
them into a platform-specific manifest of package names and feed
that to the relevant package management tool for the platform to
download this set into the package cache.

Note that similar tooling is not applied to snapshot nodes, since we
only intend to run jobs which use bindep on diskimage-builder
created nodes.

Change-Id: I0c408fee35dfe9b4f700c51565bfaae0a3d03beb
2015-06-24 18:56:09 +00:00
Jens Rosenboom
abbe9c6093 Add dependency on nodepool-base to node-devstack
The build for node-devstack will fail because of missing scripts unless
nodepool-base is executed before, so add this as dependency.

Change-Id: Iabc06a542529500ad248ae067beed9639d24e506
2015-06-11 10:22:08 +02:00
Steve Kowalik
85a0f4f44f Switch to using $() for subshells, part 1
Cleanup every use of `` for subshells in the nodepool and tools
directory , replacing them with $(), and finally making the scripts
consistent.

Change-Id: I2b05cd20f9c9a30ab88f8db235aa81da93b1fad3
2015-06-04 15:30:55 +10:00
Jenkins
38ec65bd48 Merge "Deal with yum --downloadonly CentOS 6.x quirks" 2015-05-12 21:38:26 +00:00
Jeremy Stanley
3d5b04ed19 Deal with yum --downloadonly CentOS 6.x quirks
Some packages may depend on python-setuptools, which is not
installed and cannot be reinstalled on CentOS 6.x once yum has
erased them, so use --skip-broken to avoid aborting. Also on this
platform --downloadonly causes yum to return nonzero even when it
succeeds, so ignore its exit code.

Change-Id: Iaada39ae81e1e47fe9d0bedba80fd19e4e0e6f38
2015-05-12 15:25:01 +00:00
Monty Taylor
449d432feb Don't disable cloud-init if it is not installed
When we're building nodepool images on top of minimal elements, there
will be no cloud-init, and therefore no need to disable cloud-init
datasources. In fact, trying to do so will be an error.

Change-Id: I98887c43566e07f2be9d2dc5fae6538078c7348e
2015-05-10 12:58:08 -04:00
Monty Taylor
e60dc2a3c1 Don't require NODEPOOL_SCRIPTDIR to be set
If someone is building an image locally and don't want to do anything
special with nodepool scripts, they should not need to set an env var.
The env var obviously still needs to be honored for nodepool operation
and for override.

Change-Id: I08076a8eafe7019e715b1b46633e8f603031a1ea
2015-05-10 12:41:53 -04:00