From 922478fbda1a9b23b566969ce691b2d5182054d1 Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Fri, 20 Oct 2023 12:51:27 +0300 Subject: [PATCH] Unblock the CI gate The Nova collector json schema validation started [1][2] failing after the jsonschema upper constraint was bumped from 4.17.3 to 4.19.1 [3]. The reason is that jsonschema v4.18.0a1 switched to a reference resolving library [4], which treats the aggregate "id" as a jsonschema id and expects it to be a string [5]. For this reason, we're now getting AttributeError exceptions. As a workaround, we'll rename the "id" ref element as "host_aggr_id". Also, the watcher-tempest-multinode job is configured to use Focal, which is no longer supported by Devstack [6]. That being considered, we'll switch to Ubuntu Jammy (22.04). While at it, we're disabling Cinder Backup, which isn't used while testing Watched. It currently causes Devstack failures since it uses the Swift backend by default, which is disabled. [1] https://paste.opendev.org/raw/bjQ1uIdbDMnmA1UEhxLL/ [2] https://paste.opendev.org/raw/bNgxqulBwBLYB7tNhrU4/ [3] https://github.com/openstack/requirements/commit/ab0dcbdda28753cca86e162b9ae2fcb1aa99d001 [4] https://github.com/python-jsonschema/jsonschema/releases/tag/v4.18.0a1 [5] https://github.com/python-jsonschema/referencing/blob/c23a5dc1c9bc361daa0de270cafda955d81a51ab/referencing/jsonschema.py#L54-L55C18 [6] https://paste.openstack.org/raw/bSoSyXgbtmq6d9768HQn/ Change-Id: I300620c2ec4857b1e0d402a9b57a637f576eeb24 --- .zuul.yaml | 3 ++- watcher/decision_engine/model/collector/nova.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 4becc6bd7..f0538e279 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -89,7 +89,7 @@ - job: name: watcher-tempest-multinode parent: watcher-tempest-functional - nodeset: openstack-two-node-focal + nodeset: openstack-two-node-jammy roles: - zuul: openstack/tempest group-vars: @@ -107,6 +107,7 @@ watcher-api: false watcher-decision-engine: true watcher-applier: false + c-bak: false ceilometer: false ceilometer-acompute: false ceilometer-acentral: false diff --git a/watcher/decision_engine/model/collector/nova.py b/watcher/decision_engine/model/collector/nova.py index 6fed8ea0c..cdb134115 100644 --- a/watcher/decision_engine/model/collector/nova.py +++ b/watcher/decision_engine/model/collector/nova.py @@ -48,7 +48,7 @@ class NovaClusterDataModelCollector(base.BaseClusterDataModelCollector): "type": "array", "items": { "anyOf": [ - {"$ref": HOST_AGGREGATES + "id"}, + {"$ref": HOST_AGGREGATES + "host_aggr_id"}, {"$ref": HOST_AGGREGATES + "name"}, ] } @@ -98,7 +98,8 @@ class NovaClusterDataModelCollector(base.BaseClusterDataModelCollector): "type": "array", "items": { "anyOf": [ - {"$ref": HOST_AGGREGATES + "id"}, + {"$ref": + HOST_AGGREGATES + "host_aggr_id"}, {"$ref": HOST_AGGREGATES + "name"}, ] } @@ -129,7 +130,7 @@ class NovaClusterDataModelCollector(base.BaseClusterDataModelCollector): "additionalProperties": False }, "host_aggregates": { - "id": { + "host_aggr_id": { "properties": { "id": { "oneOf": [