Commit Graph

19 Commits

Author SHA1 Message Date
Paul Belanger ff14b3244a
Remove cache-bindep element
Currently, we only install bindep into a virtualenv in our
cache-bindep element. We can move this into infra-package-needs as an
optimization and reduce elements we depend on.

Change-Id: I591ed9a0835609c1ff8cc6069e45231032fd9f28
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-01 17:32:42 -04:00
Paul Belanger 444461a53d Revert "Force python2.7 for bindep-env"
I8dc5ee0b14906324169def2cdc35fbcd4f776423 fixes this issue.

This reverts commit 4b5a153a57.

Change-Id: I8cbd419166f11798e9d3d2885a1edd9184b43f2e
2017-04-11 00:15:34 +00:00
Paul Belanger 4b5a153a57
Force python2.7 for bindep-env
We are currently seeing the following traceback for fedora-25:

 Traceback (most recent call last):
   File "/usr/bindep-env/bin/bindep", line 11, in <module>
     sys.exit(main())
   File "/usr/bindep-env/lib/python3.5/site-packages/bindep/main.py", line 64, in main
     errors = depends.check_rules(rules)
   File "/usr/bindep-env/lib/python3.5/site-packages/bindep/depends.py", line 205, in check_rules
     installed = self.platform.get_pkg_version(rule[0])
   File "/usr/bindep-env/lib/python3.5/site-packages/bindep/depends.py", line 313, in get_pkg_version
     universal_newlines=True).decode('utf-8')
 AttributeError: 'str' object has no attribute 'decode'

Until fixed, pin to python2.7.

Change-Id: I5ac830b5f2f841dc50dafb58dccad6602afe448a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-10 19:09:26 -04:00
Paul Belanger 4cd0618c05 Remove 50-cache-pkgs from cache-bindep
Today each mirror region has an AFS mirror cache of packaging, as a
result lets try having jobs use it over caching bindep.txt
dependencies on our images.

This should save us about 27mins in diskimage build times for
ubuntu-trusty and ubuntu-xenial.

Change-Id: I74ad0fdbd939948d9285dcd7ef839bdbe299319f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-11-29 15:41:37 -05:00
Matthew Thode 9231f9b57d
Add Gentoo support to nodepool
This commit adds Gentoo support to elements needed to build a Gentoo
nodepool image.  The previous version of this commit had the default
section of the pkg-map in the wrong area, specifically in the following
file.

nodepool/elements/infra-package-needs/pkg-map

Change-Id: Ic686c325bc06564585a2e3ac50cadd7556612333
2016-10-16 20:37:14 -05:00
Paul Belanger 510faf0bde Revert "Add Gentoo support to nodepool"
Our images have failed to build for the last 3 days, reverting until we can debug.

This reverts commit 4c515e2073.

Change-Id: I2e653bcd8a30a85ea46a9861bdf9f95413a76f64
2016-10-13 21:39:04 +00:00
Matthew Thode 4c515e2073
Add Gentoo support to nodepool
This commit adds Gentoo support to elements needed to build a Gentoo
nodepool image.

Change-Id: I2ceeb915748a11d8e729069566e722a3fe30ba99
Signed-off-by: Matthew Thode <mthode@mthode.org>
2016-10-03 10:24:44 -05:00
Andreas Jaeger 8ebc5b314a cache-bindep: Handle bindep.txt
Enhance cache-bindep so that it handles both bindep.txt and
other-requirements.txt.

Change-Id: Ifabb94e0cf50f89e876b8011293286f2b8ffb40e
2016-08-10 19:03:31 +02: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
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
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
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
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
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
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