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>
This commit is contained in:
parent
42f9100d82
commit
e5c1790be7
@ -4,6 +4,7 @@
|
||||
name: nodepool-functional-k8s
|
||||
pre-run: playbooks/nodepool-functional-k8s/pre.yaml
|
||||
run: playbooks/nodepool-functional-k8s/run.yaml
|
||||
post-run: playbooks/nodepool-functional-k8s/post.yaml
|
||||
required-projects:
|
||||
- zuul/nodepool
|
||||
nodeset: debian-bookworm
|
||||
|
@ -21,7 +21,7 @@ import urllib.parse
|
||||
|
||||
import boto3
|
||||
import botocore.exceptions
|
||||
from moto import mock_ec2, mock_s3, mock_iam
|
||||
from moto import mock_aws
|
||||
import testtools
|
||||
|
||||
from nodepool import config as nodepool_config
|
||||
@ -122,9 +122,7 @@ def ebs_quotas(quotas):
|
||||
|
||||
class TestDriverAws(tests.DBTestCase):
|
||||
log = logging.getLogger("nodepool.TestDriverAws")
|
||||
mock_ec2 = mock_ec2()
|
||||
mock_s3 = mock_s3()
|
||||
mock_iam = mock_iam()
|
||||
mock_aws = mock_aws()
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
@ -144,9 +142,7 @@ class TestDriverAws(tests.DBTestCase):
|
||||
fixtures.EnvironmentVariable('AWS_SECRET_ACCESS_KEY', aws_key))
|
||||
|
||||
self.fake_aws = FakeAws()
|
||||
self.mock_ec2.start()
|
||||
self.mock_s3.start()
|
||||
self.mock_iam.start()
|
||||
self.mock_aws.start()
|
||||
|
||||
self.ec2 = boto3.resource('ec2', region_name='us-west-2')
|
||||
self.ec2_client = boto3.client('ec2', region_name='us-west-2')
|
||||
@ -197,8 +193,7 @@ class TestDriverAws(tests.DBTestCase):
|
||||
ebs_quotas=getattr(test, '__aws_ebs_quotas__', None))
|
||||
|
||||
def tearDown(self):
|
||||
self.mock_ec2.stop()
|
||||
self.mock_s3.stop()
|
||||
self.mock_aws.stop()
|
||||
super().tearDown()
|
||||
|
||||
def setup_config(self, *args, **kw):
|
||||
|
4
playbooks/nodepool-functional-k8s/post.yaml
Normal file
4
playbooks/nodepool-functional-k8s/post.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- name: Collect k8s logs for debugging purposes
|
||||
role: collect-kubernetes-logs
|
@ -6,3 +6,4 @@
|
||||
- role: ensure-nox
|
||||
- role: ensure-kubernetes
|
||||
ensure_kubernetes_type: microk8s
|
||||
ensure_kubernetes_microk8s_channel: '1.28/stable'
|
||||
|
Loading…
Reference in New Issue
Block a user