971 Commits

Author SHA1 Message Date
Zuul
8a8adfb58f Merge "openshift speculative containers" 2019-12-11 19:17:27 +00:00
Clark Boylan
f418a8d533 Fix python3 compat in tox siblings handling
This fixes a byte vs str problem on python3 in the tox role's sibling
library.

As part of this fix add unit testing of the function that was failing
under python3 and functional testing of the role that covers siblings.

Change-Id: I2df4ddce91dfd53f5c4177a19288e97120bc3e3b
2019-12-10 15:27:41 -08:00
Zuul
641baedc4c Merge "build-docker-image: fix up siblings copy" 2019-12-09 23:49:16 +00:00
Zuul
939a09387d Merge "build-container-image: support sibling copy" 2019-12-09 23:42:30 +00:00
Zuul
7f6710385f Merge "Fixes tox log fetching when envlist is set to 'ALL'" 2019-12-09 00:18:55 +00:00
Ian Wienand
599954715e build-docker-image: fix up siblings copy
There are a number of issues with this.  Firstly, it needs to copy the
parent directories to make a heirarchy in the .zuul-siblings
directory.  The current "cp -r" was only copying the final directory.
Switch into the source directory and use "--parent" to do this.

Also, it should be copying into the context dir.  Add the
{{ item.context }} to the path where appropriate.

Make new testing image that copies in files from the siblings.
Because COPY will fail if the sources aren't there, this is like an
assert that we copied it correctly.

Change-Id: I9f3b0a1f71d20cf7511f224648dd2fa51a039015
2019-12-09 11:14:21 +11:00
Ian Wienand
29d55cbf17 build-container-image: support sibling copy
Add support for "siblings:" to the build-container-image role.  This
is a port of change I079d823e7194e15b1b496aea0f53f70f6b563f02 from the
build-docker-image role.

Note that we found a couple of issues with this role, fixed with
I9f3b0a1f71d20cf7511f224648dd2fa51a039015.  However,
build-container-image has merged before this fix, so thess fixes now
follow this change.  To avoid squashing this into something confusing
this update incorporates those fixes.  However testing is left to the
follow-on change because the extant build-docker-image role would fail
the corrected testing.  They should be merged roughly together.

One minor thing is the removal of an additional duplicated "tags:"
entry from the variable documentation.

Change-Id: I71e2f2ab29446bd113644ce8c75378b8d3ef8ba6
2019-12-09 11:13:42 +11:00
James E. Blair
6a9aa82fcc openshift speculative containers
Change-Id: I81f7be6065a74f45386ea735a5291d48b7e042ce
2019-12-06 13:50:25 -08:00
James E. Blair
d48667a3c5 use-buildset-registry: Add podman support
Change-Id: I41718073962c8e7eb3d8810276e550fb84bd6e99
2019-12-05 11:44:15 -08:00
James E. Blair
b583530f2b Add build-container-image role
Testing is added in a followup change.

Change-Id: Ia1ebf0075e9f6976310dff618cb06da928f55a7b
2019-12-03 14:22:59 -08:00
James E. Blair
ec8a58ddb7 use-buildset-registry: Vendor pytoml and remarshal
In order to edit the V2 registries.conf file used by podman, we
need to be able to manipulate toml from ansible.  There is no
standard library or Ansible support for that now, and we don't want
to install any python packages on the remote node.  Therefore,
vendor the remarshal and pytoml code into this role.

This is done in a standalone commit for easier review and auditing.

The originating projects are:

  https://github.com/dbohdan/remarshal
  https://github.com/avakar/pytoml

And both are MIT licensed.  Appropriate headers are added where
necessary.

Note that pytoml has been concatenated into one file in order to
adhere to Ansible's requirements for python modules.

Change-Id: I679ea5eb5cb29591be09d2f1b712400c49158abd
2019-12-03 14:10:23 -08:00
Ian Wienand
0b0cb18a60 build-docker-image: add option to install siblings
When you build from a Dockerfile, it runs in a given "context"; that
is the directory the Dockerfile is in and the directories below it.
It can not access anything outside that context during the build.

When building a container for a project in the gate, you may wish to
install sibling projects that Zuul has checked-out into your container
(i.e. so that Depends-On works).  As mentioned, because
/home/zuul/src/<project> is not in the context of the current project,
you will not be able to access this source code during the container
build.

So to help facilitate dependencies, add a siblings: tag which can copy
some or all of the required-projects already specified for the job
into a special sub-directory of the current source.

Because all the code is now in the same context, this will allow build
scripts to be written that look for directories in .zuul-siblings and
can install the source code from there.  To further help the scripts,
the ZUUL_SIBLINGS arg is set for the docker build giving the copied
paths.

The test is updated with some paths to test the copy.

Change-Id: I079d823e7194e15b1b496aea0f53f70f6b563f02
2019-12-03 20:59:45 +11:00
Albin Vass
2ad252a217 Fixes tox log fetching when envlist is set to 'ALL'
Change-Id: I5cf5bbf44b9eb653856efb7e60561069f17a66d0
2019-11-28 12:24:16 +00:00
Ian Wienand
cfdf251140 Use RDO trunk repos work for openvswitch on centos8
This is a bit of a hack, but allows installation of openvswitch for
testing the multinode roles.  Official CentOS 8 RDO builds are still a
work in progress, but this will let us get a head-start on any
multi-node testing.

Change-Id: I2eb1a16e9995a19d61e309aa59b232577184b527
2019-11-25 08:27:50 +01:00
Monty Taylor
e79ca5ec3a Stop installing pydistutils.cfg
We install pydistutils.cfg to catch legacy cases where people
are doing things with easy_install. That code path is not
desirable and increasingly broken, as support for things like
allow-hosts is dropped upstream.

Stop installing the file. This will mean people using easy_install
won't get the benefit of the mirrors, but they shouldn't be
using easy_install anyway.

Remove pydistutils.cfg if it's there

Make sure we don't have any pydistutils.cfg around.

Change-Id: I24a05f456f87bd4cb57ebf89d4245477bf675f97
2019-11-24 12:03:39 -05:00
James E. Blair
68ea061fb2 install-podman: also install slirp4netns
This is required in order to perform port forwarding when running
rootless.

Again, unclear why this isn't required in the package.

Change-Id: I61964a23ce7c80b1af149cb7f98897367e970d45
2019-11-21 14:27:54 -08:00
James E. Blair
3c4f23ec43 install-podman: also install uidmap
This package is required in order for UID mapping in rootless
operation to work. It is unclear why it isn't specified as a
dependency.

Change-Id: I7dd22b683c2fed9921de39a474de3bd9f2c3b0d4
2019-11-21 10:09:16 -08:00
Ian Wienand
6228b71b07 install-devstack: switch to Python 3
Nova has switched to Python 3 only but devstack has not caught up (see
[1]).  Switch on Python 3 here; it will soon be the default and we can
shake out any errors before that.

[1] https://review.opendev.org/694891

Change-Id: Idf26a7af08219421c1a6cc381317e59fb6950b86
2019-11-19 15:20:39 +11:00
Zuul
e26a4d6163 Merge "Role to install podman" 2019-11-18 20:52:24 +00:00
Ian Wienand
26cadea6af install-docker: show installed version
Show full version details of install.  This can be useful when you're
trying to decide what features you may or may not have.

Change-Id: Iedc6aa1b73b0e7d7612c27d890273e84d4d04a22
2019-11-11 12:56:43 +11:00
Ian Wienand
cdff4b7835 Role to install podman
A simple role to install podman packages.

Change-Id: I135fab8474b3564bb4ab1f2b19d4645d4a86f560
2019-11-08 08:51:58 +01:00
Zuul
81d7e7a993 Merge "Remove argument to ssh-keygen for key size" 2019-11-05 20:49:24 +00:00
Ian Wienand
89ed14752b test-swift-log-upload: fix dry_run parameter
This was pointed out and fixed by jhesketh in
Ie4888606a8ca4ffe2eb99ddbbcd9d5cee8ceec44, but I forgot to add it to
the test role.  Sure enough, it fails as jhesketh predicted.

[1] https://review.opendev.org/#/c/592929/3..4/roles/upload-logs-swift/library/zuul_swift_upload.py

Change-Id: I8d25a234fb92cd1bcfcd0cb7ddf9b8222dbd5978
2019-11-01 16:06:22 +11:00
Ian Wienand
9a8cc2a1c0 test-upload-logs-swift: Add missing template for test
I forgot to "git add" this file in
Id91350ff1c531fd7266f3bf76681a8415941481f.

Change-Id: Ia6af42a7d9062fa7895f3b6901a0fa1e8646e8b9
2019-11-01 15:24:29 +11:00
David Shrewsbury
ce67cef122 run-buildset-registry: Fix python version check
The "Start the buildset registry" task, which uses the
docker_container Ansible module, was failing with:

    "No module named 'requests'"

This is because the earlier package install task was installing
the packages into the wrong python version because the
ansible_python_interpreter value was 'auto' and thus never
included the 'python3' value.

Change-Id: I887fdf8d000c8b916fdab281c531b7c98bdd5ae2
2019-10-31 16:17:27 -04:00
Zuul
d7b86832b2 Merge "upload-logs-swift: test bulk download script change" 2019-10-31 06:36:02 +00:00
Zuul
04f7283b27 Merge "upload-logs-swift: Stub out dry run in the uploader" 2019-10-31 06:26:59 +00:00
Ian Wienand
ddc0da55a1 upload-logs-swift: test bulk download script change
This implements the production change
I98c80f657f38c5e1ed5f28e5d36988a3429ad1f8 in the test role.  Review
comments should be left there; we can merge this and then parent a job
to base-test to test it.

Change-Id: Id91350ff1c531fd7266f3bf76681a8415941481f
2019-10-31 06:26:49 +00:00
Ian Wienand
a6f946472d upload-logs-swift: Stub out dry run in the uploader
By doing this, we're not constrained about where to run the uploader
while still providing some useful testing in dry-run mode.

Change-Id: Ie4888606a8ca4ffe2eb99ddbbcd9d5cee8ceec44
2019-10-31 15:43:44 +11:00
Clint Byrum
a997073141 Remove argument to ssh-keygen for key size
We don't need to be explicit, ssh-keygen will pick a good size for us.
Meanwhile, 1024 bit keys are generally seen as security problems and
thus ring bells and are refused by some servers/services.

Change-Id: Iaea82e0b394a5a6b1da3b59637fc4e0f541e1978
2019-10-30 16:43:40 -07:00
James E. Blair
91ae8e62de Test buildset registry with k8s and docker
This adds a test job for the buildset registry with k8s with the
docker runtime.

Change-Id: I0ec1d3d5980424f85f5e7619b9dec96c8f0f70f1
2019-10-28 15:45:39 -07:00
James E. Blair
dba2c101fd Adjust buildset registry container name
If we want to run a second registry on a different port, we'll need
a different name for the docker container.

Change-Id: I887d9015c0d21e6d7f95379e6fa7fb4211e58d3d
2019-10-28 15:42:29 -07:00
James E. Blair
a321a8270d Make the buildset registry port configurable
This will allow us to run the role twice on the same host.  This
will be useful when we test changes to this role.

Change-Id: I97baeb3172298648bcfef26c5be635ad4be036f0
2019-10-28 15:42:29 -07:00
James E. Blair
8766890012 Use zuul-registry as buildset registry
The proxy functionality is no longer needed so it is removed.

Change-Id: I29ff75d331b433ea4ad3b66ed723eee14a90b404
Depends-On: https://review.opendev.org/689829
2019-10-28 15:42:26 -07:00
Zuul
aa7dcaf69c Merge "fetch_subunit: Change variable" 2019-10-21 19:58:39 +00:00
Zuul
ff1c4648e1 Merge "fetch-subunit-output: collect additional subunits (2nd try)" 2019-10-21 19:48:51 +00:00
Andreas Jaeger
293b064d29 fetch_subunit: Change variable
Change new variable zuul_additional_subunit_dirs to
fetch_subunit_output_additional_dirs to name it after the role.

Change-Id: I7ac0b5d343701409a8741439334fe27f5374a258
2019-10-21 21:07:39 +02:00
Zuul
0d39fba5fe Merge "configure-mirrors: Consolidate dnf/yum handler" 2019-10-19 07:45:07 +00:00
David Shrewsbury
a37c21b772 Increase minikube logging output to maximum
Per settings mentioned at: https://minikube.sigs.k8s.io/docs/tasks/debug/

The current logging level is very minimal for tracking down any
potential k8s issues.

Change-Id: I4ebd694481de936f9df790a46e195b251a803c5f
2019-10-17 20:00:01 +00:00
James E. Blair
03e42f874b install-kubernetes: add support for cri-o runtime
This adds optional support for using the cri-o rather than the
(still default) docker runtime.

Change-Id: I0f7cbb758a21cb022ceac24654183138bebf83bf
2019-10-17 11:27:31 -07:00
Luigi Toscano
ab8f9fc403 fetch-subunit-output: collect additional subunits (2nd try)
In addition to the main subunit file from zuul_work_dir,
collect the subunit files from the elements (directories)
of the zuul_additional_subunit_dirs list.

The default behavior is unchanged.

While the documentation of this role states that zuul_work_dir
contains an absolute path, this is not always true.
So make sure to not make any assumption about zuul_work_dir
in order to not fail spectacularly as it happened with the
previous patch[0].

Add also some tests for the role: both the basic case
and with an additional test directory.

[0] https://review.opendev.org/673885

Change-Id: Iabf2e0cf6d86e36a174778367186bbd39a65c3dd
2019-10-17 00:42:28 +02:00
Zuul
6d5826844a Merge "Allow for overriding dns resolvers in install-kubernetes" 2019-10-16 19:30:17 +00:00
Sorin Sbarnea
d3a52f108d configure-mirrors: Consolidate dnf/yum handler
Simplify logic by using a single handler for redhat systems.

Change-Id: I328f0abb602f0d71372812ff64d8ad3f3764fbd0
2019-10-15 18:21:44 +01:00
Ian Wienand
2e684a8da5 configure-mirrors: add CentOS 8
Add repositories for CentOS 8, add base test.

Co-Authored-By: Sorin Sbarnea <ssbarnea@redhat.com>
Change-Id: I24e194a2f4729046c8f521ffccd3b00055127516
2019-10-15 17:33:48 +11:00
Ian Wienand
2462d16322 configure-mirrors: make separate template directories for each platform
This keeps each platform's "/etc" template files in a separate
top-level directory.

Additionally, we add a distro major version match to the task import
and rename centos7 (in preparation for centos8).

Change-Id: If65d51a27e30311b1da20522afb6dbce7ee6cf35
2019-10-15 17:04:57 +11:00
Clark Boylan
7755ef1b8d Use gzip to compress files uploaded to swift
We've discovered that rackspace swift seems to always want to gzip
encode files when clients request their contents. When our files are
deflate encoded this results in files that are first deflate encoded
then gzip encoded. Not all browers or layer 7 firewalls can handle this
(despite being perfectly valid according to the HTTP RFCs). We'll use
gzip to see if that causes rackspace to not double encode the files.

To do this with memory efficienty we vendor a tool from pypi called
gzip-stream which allows us to read chunks of the compressed data at a
time without loading the entire file into memory or writing multiple
gzip headers in a single file.

Change-Id: I9483cfdbd8e7d0683eeb24d28dd6d8b0c0e772fa
2019-10-11 11:32:17 -07:00
Clark Boylan
61c05a180f Test role for upload-logs-swift
This creates a testing role for upload-logs-swift so that we can test
chagnes to this role before moving them into the production role.

Change-Id: If55b0e2809d9309bc98e6763da32219d996dbfa4
2019-10-11 11:32:11 -07:00
Clark Boylan
3c60b35a19 Replace command with shell in persistent-firewall
We continue to see the odd task rc of -13 when running iptables-save to
store persistent set of firewall rules. Switch to shell to give us a bit
more debugging freedom if necessary (and to rule out the command
module).

Change-Id: I0c0208101cad985d4113de6b636c3816613b778c
2019-10-02 10:18:38 -07:00
Zuul
7ce53a7732 Merge "Add unit tests for tox_instalL_sibling_packages" 2019-10-01 19:42:04 +00:00
Mohammed Naser
0193198215 Add unit tests for tox_instalL_sibling_packages
This adds very basic framework and a simple unit test for a function
which had non-Python 3 code.

Change-Id: Ie22402aeacd21942c356d7d7c5c962b40a29caa4
2019-10-01 19:18:25 +00:00