Commit Graph

52 Commits

Author SHA1 Message Date
Clark Boylan e5c1790be7 Rollback to 1.28/stable microk8s in functional testing
We use latest/stable by default which very recently updated to
1.29/stable. Unfortunately it appears there are issues [0] with this
version on Debian Bookworm which also happens to be the platform we test
on. Our jobs have been consistently failing in a manner that appears
related to this issue. Update the job to collect logs so that we can
better confirm this is the case and rollback to 1.28 which should be
working.

Also update the AWS tests to handle a recent moto release which
requires us to use mock_aws rather than individual mock_* classes.

[0] https://github.com/canonical/microk8s/issues/4361

Change-Id: I72310521bdabfc3e34a9f2e87ff80f6d7c27c180
Co-Authored-By: James E. Blair <jim@acmegating.com>
Co-Authored-By: Jeremy Stanley <fungi@yuggoth.org>
2024-01-29 14:15:54 -08:00
James E. Blair 3fce10179e Use sudo when collecting podman logs in openstack-functional test
We run the podman containers as root, so when we collect the logs,
we must do that as root too, otherwise we won't see the containers.
This is why we currently collect no container logs.

Also, increase the boot timeout from 600 to 1200 seconds to deal
with what appears to be much slower boot times of the test node.

Change-Id: Ie146599f7598459c41c2d2d885b90a702bc900bb
2023-11-04 06:40:45 -07:00
James E. Blair 1ce9c264d3 Remove openshift functional testing
OpenShift has removed their 3.11 container images from dockerhub
and while some of them are available at quay.io, not all of them
are, and it does not appear that we are able to install 3.11 any
more.

To unblock development in nodepool, remove the functional testing.

We will rely on the existing fake-based unit tests now.

Change-Id: Ifb4b02ae1058c7549c30ab915591d4b171e3540e
2023-10-25 13:02:12 -07:00
Clark Boylan 5702331087 Move nodepool functests to podman
Now that nodepool images are on quay.io we don't get speculative
container image testing with docker. The reason for this is docker only
knows how to lookup images hosted by docker.io in mirrors which
specualtive container image testing relies on. Since the images are
hosted on quay.io instead of docker.io we lose this functionality.

Address this by switching to podman and podman-compose which does
understand how to fetch images with mirrors from any location.

Depends-On: https://review.opendev.org/c/zuul/zuul/+/687135
Change-Id: I1a510a9b68a2f01098f3c099a129d6d268b422d9
2023-05-30 15:35:47 -07:00
James E. Blair 3a5db84a33 Switch to nox
Like Zuul, replace our usage of tox with nox.

Change-Id: I18e2dffaf737f0b57020d50c1c18397ee5dc1362
2023-01-10 10:30:14 -08:00
Ian Wienand fdb49bc029 Unpin microk8s
The dependent change has fixed up the issues with >1.23, unpin this.

Change-Id: Ia5be8397110ec1c8d79806a8fdca8ed1d86a382e
Depends-On: https://review.opendev.org/c/zuul/nodepool/+/867744
2023-01-10 10:30:14 -08:00
Ian Wienand 610443d04b nodepool-functional-k8s: switch to microk8s
Switch this job to use microk8s, which should be more stable than
minikube on our Ubuntu testing hosts.

Depends-on: https://review.opendev.org/c/zuul/zuul-jobs/+/866953
Change-Id: I8e76581ea5cf4a4241aec48bc59086d7f17cd72a
2023-01-10 10:29:55 -08:00
Ian Wienand f4d0c8f226 nodepool-functional-openshift: update nodepool launcher to Fedora 36
Update to current Fedora so we can remove the old node types.

Change-Id: Iad0c18419616a962a973f41dfcf6ea8cb396d4a5
2022-09-07 12:08:52 +10:00
Ian Wienand fb736fac7d functional-container: use different root-disk label
For the reasons described in the inline comment, use a different
root-disk label when building dib test images.

Change-Id: I3b518802d681b888916a5cc6a3dcf7e1b537da1e
Depends-On: https://review.opendev.org/c/openstack/diskimage-builder/+/853573
2022-08-18 11:19:14 +10:00
Ian Wienand 6fc372c885 Switch to using openstackclient
Switch commands to openstackclient and authenticate with info stored
in clouds.yaml

Change-Id: I9e6500b1f6541c10c9c0c0ffbbb741e0c321bcff
2022-03-27 14:33:42 +02:00
Ian Wienand e7822cf89a nodepool-zuul-functional: remove
As described in the dependent change, the testing done here is better
done by the quickstart jobs these days.  The dependent change has
removed the tox environment this calls in Zuul.  This removes the job
definiton and related files from nodepool.

Change-Id: I17e1002012e9ac6abc434454af989f1da1c379b7
Depends-On: https://review.opendev.org/c/zuul/zuul/+/826772
2022-01-28 08:20:08 +11:00
Ian Wienand 26bad7f853 Fix gate for Focal issues
This fixes libffi bindep installation on Ubuntu Focal

The Python 3.6 tox tests are switched back to bionic, as Focal nodes
don't have Python 3.6.

Additionally, we squashed the following change into this to unblock
the gate:

Remove nodepool-functional-openstack

This test installs devstack and then nodepool on a bionic host (in
contrast to the -containers variant that builds a container from the
Dockerfile and installs/runs that).

Firstly, devstack support for Bionic is going away soon so we have to
update this.  We don't really need to test if we run ontop of a plain
Bionic/Focal host.  We have tox jobs testing various Python versions
for compatability, so running on here isn't providing any extra
coverage.  DIB can't build many things on plain Bionic/Focal due to
updates or incompatabilities in "alien" versions of RPM, Zypper,
debootstrap, etc.  The container incorporates fixes as required and is
where anyone is going to put attention if there are build issues;
hence we're not testing anything useful for image building paths.
Finally we also have nodepool-zuul-functional, which brings up Zuul
and nodepool on a plain Bionic host anyway.  Per the prior reasons,
that covers basically the same thing this is providing anyway.

openstacksdk is using this on older branches, but is switched to using
the container job in the dependent changes.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/788414
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/788416
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/788418
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/788420
Depends-On: https://review.opendev.org/c/openstack/diskimage-builder/+/788404

(was : Change-Id: I87318e9101b982f3cafcf82439fdcb68767b602b)

Change-Id: Ifc74e6958f64be70386cdb3e05768d94db75c3bb
2021-05-19 08:18:24 +10:00
Ian Wienand a07bb0a0ae Install podman in container for container-based builds
This installs podman inside the nodepool container, which is used by
the dependent change in DIB to extract initial chroot environments
from upstream containers.  This eliminates the need to run non-native
tools on build hosts (rpm/zypper on Ubuntu, etc.).

As noted in the config, podman defaults to assuming systemd is
installed and using various systemd interfaces.

Additionally, we map the a volume into the container which allows
nested podman to do what it needs to do.

Needed-By: https://review.opendev.org/700083
Change-Id: I6722aa2b32db57e099dae4417955a8a2cd28847e
2021-05-05 10:34:42 +10:00
Ian Wienand 4689a7d938 nodepool-functional : ignore errors copying logs
If the job stops before the required directories here are created we
get a failure copying, which stops us collecting things that may be
useful to diagnosing the error.  Put the copying in a block that
ignores errors.

Also just copy the /var/log/syslog -- I think this came in originally
from something running on CentOS which doesn't have this, but now we
run on Ubuntu hosts and syslog has interesting things for diagnosing
errors.

Change-Id: Iaca4801a652ef4a67772c804271ea5c1db377051
2021-04-20 09:27:54 -07:00
James E. Blair 4c5fa46540 Require TLS
Require TLS Zookeeper connections before making the 4.0 release.

Change-Id: I69acdcec0deddfdd191f094f13627ec1618142af
Depends-On: https://review.opendev.org/776696
2021-02-19 18:42:33 +00:00
Clark Boylan 6da6d92d53 Stop using fedora-30
Fedora 30 is old. Fedora 32 is available, lets use it. We use the new
ensure-zookeeper role as Fedora 32 does not have zookeeper packages
anymore.

Co-Authored-By: Tristan Cacqueray <tdecacqu@redhat.com>
Depends-On: https://review.opendev.org/752757
Change-Id: I3b429be1fa90cc8a546e5331a4d9b38a4659a591
2020-09-18 15:30:31 -07:00
James E. Blair c31dc75912 Stop building arm container images and fix devstack tls
Now that the underlying images are correctly being built for arm,
we see that several dependencies are missing wheels, and compiling
them under emulation takes a very long time.  Until we resolve that,
only build container images for amd64.

When devstack is enabled with TLS support
(If607caf301211181b4f37a2c7012f875de3d285c) the cloud config has a
reference to the CA in /opt/stack/data; thus we need to map it into
the builder/launcher container.  We missed this with testing in
Iacc71e9e744249c7ce585ab7131cc9e905d600ff because the image build
failed and thus the container-based job didn't run.

Change-Id: Ica9aecd457f8b6abcfd3cdbdb425d411f98ffeff
2020-07-23 10:56:12 -07:00
Sean McGinnis 004f60eb8b
Add ensure-virtualenv to nodepool-functional-openstack
This playbook attempts to create a virtualenv, which now fails since
virtualenv is not included in the base image. This adds the
ensure-virtualenv role to make sure it is present.

Change-Id: Id4e41fb6022536ce77cf274626d4fc3e0c6329eb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-20 08:17:41 -05:00
Monty Taylor ae92b00aa8 Add ensure-tox to k8s and openshift jobs
We use tox to run the tests. Previously we were getting the
pre-installed tox from the opendev images. With the new images,
it's not there, so we need to run ensure-tox in our jobs.

Depends-On: https://review.opendev.org/735905
Change-Id: Ic1291eec079fbbd34ad69cf291f59219ed43e7d9
2020-06-16 07:59:09 -05:00
Ian Wienand c22fe0518d container functional test : allow to specify elements-dir
This will allow testing of external elements with this playbook

Change-Id: I6e6aeaa60ca30f10734ed19cb7bd949d621c0636
2020-04-30 11:45:38 +10:00
Ian Wienand 140068b514 func-tests: drop debuntu specific env vars
These tests are used generically to build a range of images, not just
debuntu based ones.  Remove these platform specific flags.

In the jobs based on this for the nodepool gate we are building
centos images, so these don't apply there.

Change-Id: Ia4dde1fb01da284a5e681237ab88c68fb9afcbef
2020-04-22 10:40:38 +10:00
vass a0201a27a2 Use ensure-* roles
The install-* roles in zuul-jobs have been renamed to ensure-*, follow
the rename.

Change-Id: I94176c5753e4868f7d31d47f57aef0f47be1fa38
2020-04-06 20:17:50 +02:00
Mohammed Naser f4f234e1a9 Switch to collect-container-logs
This change switches the post bits to use a new centralized
role to collect all container logs.

Depends-On: https://review.opendev.org/701867
Change-Id: I1b1bdad108515604dce45c7b418bfaae1bf235a8
2020-01-09 19:42:16 -05:00
Ian Wienand 809cada20a Functional tests - use common verification script
There is a lot of logic in the check.sh script of the openstack
functional tests.  Extract into a single location in /tools and call
it from the install and container tests.

Change-Id: Ib5728f5cee917c73d0da276d36da5776dee279fc
2019-12-16 12:37:19 +11:00
Ian Wienand 5fca8e5ad2 Add a container-with-releases functional test
This job, in contrast to the siblings job from
I0b8c309fe3284a2824a38d343fca168441f20471, uses released versions of
dependencies inside the containers.

Change-Id: If510238c6ab2b8f6570848f76e84383925c73d87
2019-12-16 12:37:19 +11:00
Ian Wienand ceb6e2bbdb Add container-with-siblings functional test
This adds an initial container-based test.  We use the "siblings"
containers, which thus makes this job roughly equate to the extant
non-container "-src" jobs that install dependencies from source (a
follow-on If510238c6ab2b8f6570848f76e84383925c73d87 will add jobs
based on released dependencies).

Change-Id: I0b8c309fe3284a2824a38d343fca168441f20471
2019-12-16 12:37:19 +11:00
David Shrewsbury 36fb6e90a5 Cleanup openshift pre.yaml playbook
Setting up nodepool services directories should not be necessary
for openshift functional testing since it uses the testing framework
nodepool (via useNodepool()) and not a shared, running service.

Change-Id: Iff3e026e846327184d4d44d043e42caf84ee1d7d
2019-10-18 10:22:45 -04:00
David Shrewsbury c17fd6ddf8 Remove unused functional testing playbooks
Similar to change Ibe94d5c3e8717c381aee4472d84379cf6d31b336,
the nodepool-functional-py35-src and nodepool-functional-base
playbooks are also unused at this point.

Change-Id: I02359f0e147aed429643f8e316f997a22545959c
2019-10-18 09:53:08 -04:00
Zuul 7228d0466d Merge "Remove unused k8s log config" 2019-10-18 13:30:21 +00:00
Zuul ffe3e4e07a Merge "Pull minikube log data" 2019-10-18 13:30:19 +00:00
David Shrewsbury a619fea8e8 Remove unused playbook
AFAICT, this isn't used in nodepool, openstacksdk, or dib.

Change-Id: Ibe94d5c3e8717c381aee4472d84379cf6d31b336
2019-10-16 15:26:16 -04:00
David Shrewsbury 3a9b3e194c Remove unused k8s log config
The entries being removed are not used for k8s functional testing
and resulted in an empty directory.

Change-Id: I3d86e2d0f49917299f1f332339382e57277820b4
2019-10-16 15:02:36 -04:00
David Shrewsbury 9405ea6a8e Pull minikube log data
This is needed to debug k8s failures.

Change-Id: I3ff21ba4358b7c9d8630295821752f27438a962d
2019-10-16 08:45:09 -04:00
Ian Wienand c137253e44 dib-functional : allow extra elements to be passed
Add a variable to make it easier to add extra elements for testing
purposes.

Change-Id: Ib246228214beff0aaf2a9cef3df4459657b1e93f
2019-10-01 16:37:25 +10:00
Ian Wienand 111039d057 Functional testing: add journal-to-console element
This element redirects the systemd journal to the console.  It can be
helpful if the inner VM isn't booting; when it times out nodepool will
dump the console into the logs.  With this enabled, you'll be able to
see various useful output such as NetworkManager getting addresses,
etc.

Depends-On: https://review.opendev.org/669784
Change-Id: I608b8cd9e467351c996fc5f51f15ee67f4570ba3
2019-07-25 13:32:18 +10:00
Clark Boylan 7625ef6908 Add nodepool_debug flag to openstack functional jobs
This flag when set to true will enable debug logging in the nodepool
services (builder and launcher). It is optional and when not set logs
are captured at INFO level and higher (the existing behavior).

Change-Id: If1434378b325d6115b45e66b3c42c824e083100e
Co-Authored-By: Ian Wienand <iwienand@redhat.com>
Co-Authored-By: James E. Blair <jeblair@redhat.com>
2019-07-09 16:43:11 -07:00
James E. Blair 007f7e0b08 Switch functional testing to a devstack consumer job
Rather than implement functional OpenStack testing as a devstack
plugin, use devstack as a black-box OpenStack.  This allows us
to move nodepool to a new Zuul tenant without depending on the
devstack job and all its associated projects.  It will also let
us replace devstack with something potentially lighter weight in
the future.

The job permits customized settings for what images to build, so
that the DIB project can inherit from it and make child jobs for
each of the operating systems it cares about.

Change-Id: Ie6bc891cebd32b3d1bb646109f13ac2fd383bba5
2019-06-27 08:58:17 -07:00
OpenDev Sysadmins f8ac79661a OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:25:31 +00:00
Tristan Cacqueray c1378c4407 Implement an OpenShift resource provider
This change implements an OpenShift resource provider. The driver currently
supports project request and pod request to enable both containers as machine
and native containers workflow.

Depends-On: https://review.openstack.org/608610
Change-Id: Id3770f2b22b80c2e3666b9ae5e1b2fc8092ed67c
2019-01-10 05:05:46 +00:00
James E. Blair fce2ffb502 Move k8s install to pre playbook
In the k8s integration job, run the install-kubernetes role in
the pre-playbook since it is not (generally) the thing under test.

Change-Id: Ib20cd12100f323f1eb262261394c4b180dc1f2cd
2018-11-13 16:39:06 +01:00
Ian Wienand 17d053cf94 Pin docker for k8s test
Docker 18.09 has released, but minikube currently fails with

 [ERROR SystemVerification]: unsupported docker version: 18.09.0

Although I'm sure this will be fixed quickly, pin to the prior release
for the moment.

Depends-On: https://review.openstack.org/616391
Change-Id: I4b7bd6a7ef016106808d95f37ba5caa2b4e0a9b3
2018-11-08 14:23:39 +11:00
David Shrewsbury 511ffd9c29
Add tox functional testing for drivers
Reorganizes the unit tests into a new subdirectory, and
adds a new functional test subdirectory (that will be further
divided into subdirs for drivers).

Change-Id: I027bba619deef9379d293fdd0457df6a1377aea8
2018-11-01 15:33:44 +01:00
Tristan Cacqueray 4295ff6870 Implement a Kubernetes driver
This changes implements a Kubernetes resource provider.
The driver supports namespace request and pod request to enable both
containers as machine and native containers workflow.

Depends-On: https://review.openstack.org/605823
Change-Id: I81b5dc5abe92b71cc98b0d71c8a2863cddff6027
2018-10-25 10:24:45 +00:00
Andreas Jaeger 1d1c88a89e Refactor playbooks/nodepool-zuul-functional/pre.yaml
Instead of using tasks and roles together, create a new role and use it.
This makes ordering easier to understand.

This is followup for
https://review.openstack.org/#/c/545158/14/playbooks/nodepool-zuul-functional/pre.yaml

Change-Id: I5242e9333dd8761272731d1e5e8af2fd5ca5ee8f
2018-02-20 19:56:11 +01:00
Andreas Jaeger a3ad923a7e Avoid tools/nodepool-integration-setup.sh from zuul
Fold in content from zuul/tools/nodepool-integration-setup.sh into our
playbook to reduce dependency of the repos and simplify job setup.

Change-Id: I168522ae2c214eac2f51410c67b3a79862a8787f
2018-02-16 08:56:18 +01:00
Andreas Jaeger b692467182 Remove copying of legacy install-distro script
This is not needed anymore, the zuul job does not use it.

Change-Id: I4f9e41485ebe2c8b8e2303283b2937b8d3d67d49
Depends-On: https://review.openstack.org/545221
2018-02-16 08:40:12 +01:00
Ian Wienand 5195ccb70a Fix nodepool-zuul-functional
Several fixes to this job:

We need to run bindep twice - once for nodepool, once for zuul. Add
invocation of bindep role and also copy install-distro-packages so that
the job works, next step is remove the install-distro-packages from
zuul.

Add a post-run to copy the nodepool logs, so you can diagnose what's
going wrong if the jobs fails

Fix up a configuration issue, it tries to write build-logs to
/var/log/nodepool which it doesn't own, redirect to the temp area.

Add it as a non-voting check job

Depends-On: https://review.openstack.org/545163
Change-Id: I12db55d3e4c7a71b9af56567858df0a620ee3b73
2018-02-16 08:38:58 +01:00
Ian Wienand de24f25e58 Add native distro test jobs
This implements legacy-dsvm-nodepool-[distro]-src jobs as native jobs.
This seems like the best home for them, as they are run by multiple
externals such as glean and diskimage-builder.

Previously the defaults were set such that with no arguments, the
trusty test ran for nodepool-functional-py35.

To facilitate better templating, this turns all builds off by default.
The nodepool functional test is moved to a base template, and then
nodepool-functional-py35 explicitly builds and boots Xenial now
(trusty doesn't seem very useful).

The check_devstack_plugin.sh script runs after devstack, so needs to
source the stackrc file to pull in the variables about what images are
paused or not.

Additionally, the path for the script is fixed to nodepool so we can
run the job from other projects.

The redhat, ubuntu and suse legacy tests are re-implemented for their
respective builds.

This also highlighted that the opensuse test wasn't actually doing
anything.  This actually adds the configuration to build opensuse-423.

Needed-By: https://review.openstack.org/543270
Needed-By: https://review.openstack.org/543328
Needed-By: https://review.openstack.org/543329
Needed-By: https://review.openstack.org/543330
Change-Id: I203d149a1d63ac8358e1c8b878d9c2bc0ba67c02
2018-02-13 19:05:48 +11:00
Zuul e050908cf2 Merge "Convert from legacy to native devstack job" 2018-02-07 21:25:55 +00:00
Andreas Jaeger ed8fa74b8d Convert nodepool-zuul-functional job
Convert job to native Zuul v3 syntax.

Depends-On: https://review.openstack.org/540967
Change-Id: I1ab33417f3d1603163f280dab73778a293970f57
2018-02-05 20:29:57 +01:00