* Mon Feb 26 2024 Miroslav Rezanina <mrezanin@redhat.com> - 23.4-5
- ci-ci-Pin-pytest-8.0.0.-4816.patch [RHEL-21323] - ci-fix-Add-types-to-network-v1-schema-4841.patch [RHEL-21323] - Resolves: RHEL-21323 ([rhel-8] The schema WARNING info for network-config.json is not suitable in cloud-init-23.4)
This commit is contained in:
parent
b6159c65b4
commit
ce70fdbaf8
51
ci-ci-Pin-pytest-8.0.0.-4816.patch
Normal file
51
ci-ci-Pin-pytest-8.0.0.-4816.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From 3f138f68a36224dcefd5c16befbc00486b09c8ec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Brett Holman <brett.holman@canonical.com>
|
||||||
|
Date: Mon, 29 Jan 2024 12:03:36 -0700
|
||||||
|
Subject: [PATCH 1/2] ci: Pin pytest<8.0.0. (#4816)
|
||||||
|
|
||||||
|
RH-Author: Cathy Avery <cavery@redhat.com>
|
||||||
|
RH-MergeRequest: 123: fix: Add types to network v1 schema (#4841)
|
||||||
|
RH-Jira: RHEL-21323
|
||||||
|
RH-Acked-by: Ani Sinha <None>
|
||||||
|
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||||||
|
RH-Commit: [1/2] db0348f73893a7bb536e4a3562dc7ef33b2590ad
|
||||||
|
|
||||||
|
The latest pytest release broke some tests in non-obvious ways. Pin
|
||||||
|
the version for now so that CI passes.
|
||||||
|
|
||||||
|
(cherry picked from commit 7c96c9cd9318e816ce4564b58a2c98271363c447)
|
||||||
|
Signed-off-by: Cathy Avery <cavery@redhat.com>
|
||||||
|
---
|
||||||
|
integration-requirements.txt | 2 +-
|
||||||
|
test-requirements.txt | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/integration-requirements.txt b/integration-requirements.txt
|
||||||
|
index 1f8b54a5..c0792d63 100644
|
||||||
|
--- a/integration-requirements.txt
|
||||||
|
+++ b/integration-requirements.txt
|
||||||
|
@@ -7,7 +7,7 @@ pycloudlib>=5.10.0,<1!6
|
||||||
|
# test/unittests/conftest.py to be loaded by our integration-tests tox env
|
||||||
|
# resulting in an unmet dependency issue:
|
||||||
|
# https://github.com/pytest-dev/pytest/issues/11104
|
||||||
|
-pytest!=7.3.2
|
||||||
|
+pytest!=7.3.2,<8.0.0
|
||||||
|
|
||||||
|
packaging
|
||||||
|
passlib
|
||||||
|
diff --git a/test-requirements.txt b/test-requirements.txt
|
||||||
|
index 46a98b4c..3d2480fd 100644
|
||||||
|
--- a/test-requirements.txt
|
||||||
|
+++ b/test-requirements.txt
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
# test/unittests/conftest.py to be loaded by our integration-tests tox env
|
||||||
|
# resulting in an unmet dependency issue:
|
||||||
|
# https://github.com/pytest-dev/pytest/issues/11104
|
||||||
|
-pytest!=7.3.2
|
||||||
|
+pytest!=7.3.2,<8.0.0
|
||||||
|
|
||||||
|
pytest-cov
|
||||||
|
pytest-mock
|
||||||
|
--
|
||||||
|
2.39.3
|
||||||
|
|
110
ci-fix-Add-types-to-network-v1-schema-4841.patch
Normal file
110
ci-fix-Add-types-to-network-v1-schema-4841.patch
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
From 720faf533832ba758dcc8436f144168996508c2a Mon Sep 17 00:00:00 2001
|
||||||
|
From: James Falcon <james.falcon@canonical.com>
|
||||||
|
Date: Tue, 6 Feb 2024 09:24:37 -0600
|
||||||
|
Subject: [PATCH 2/2] fix: Add types to network v1 schema (#4841)
|
||||||
|
|
||||||
|
RH-Author: Cathy Avery <cavery@redhat.com>
|
||||||
|
RH-MergeRequest: 123: fix: Add types to network v1 schema (#4841)
|
||||||
|
RH-Jira: RHEL-21323
|
||||||
|
RH-Acked-by: Ani Sinha <None>
|
||||||
|
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||||||
|
RH-Commit: [2/2] a73a68dff5a6ef54dc4e3b3527fc778400a461cc
|
||||||
|
|
||||||
|
Conflicts:
|
||||||
|
For RHEL no log argument as we are not including commit e168b4a1383b6eae9c1dc81411d7684fcbbf7df9
|
||||||
|
|
||||||
|
Even though it has conflicted with our documentation, we have allowed
|
||||||
|
nameserver address to a be a string, mtu to be empty, and nameserver
|
||||||
|
search to be missing. Since we have allowed these, expand our schema
|
||||||
|
and documentation accordingly.
|
||||||
|
|
||||||
|
Fixes GH-4710
|
||||||
|
|
||||||
|
(cherry picked from commit b08193b376552ede5d162d8283310adc783d81bf)
|
||||||
|
Signed-off-by: Cathy Avery <cavery@redhat.com>
|
||||||
|
---
|
||||||
|
.../config/schemas/schema-network-config-v1.json | 13 +++++++++----
|
||||||
|
doc/rtd/reference/network-config-format-v1.rst | 4 ++--
|
||||||
|
tests/unittests/config/test_schema.py | 13 +++++++++++++
|
||||||
|
3 files changed, 24 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cloudinit/config/schemas/schema-network-config-v1.json b/cloudinit/config/schemas/schema-network-config-v1.json
|
||||||
|
index c77885ec..56dc27c9 100644
|
||||||
|
--- a/cloudinit/config/schemas/schema-network-config-v1.json
|
||||||
|
+++ b/cloudinit/config/schemas/schema-network-config-v1.json
|
||||||
|
@@ -24,7 +24,10 @@
|
||||||
|
"description": "The lowercase MAC address of the physical device."
|
||||||
|
},
|
||||||
|
"mtu": {
|
||||||
|
- "type": "integer",
|
||||||
|
+ "type": [
|
||||||
|
+ "integer",
|
||||||
|
+ "null"
|
||||||
|
+ ],
|
||||||
|
"description": "The MTU size in bytes. The ``mtu`` key represents a device's Maximum Transmission Unit, which is the largest size packet or frame, specified in octets (eight-bit bytes), that can be sent in a packet- or frame-based network. Specifying ``mtu`` is optional. Values too small or too large for a device may be ignored by that device."
|
||||||
|
},
|
||||||
|
"subnets": {
|
||||||
|
@@ -384,8 +387,7 @@
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"type",
|
||||||
|
- "address",
|
||||||
|
- "search"
|
||||||
|
+ "address"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
@@ -396,7 +398,10 @@
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"description": "List of IPv4 or IPv6 address of nameservers.",
|
||||||
|
- "type": "array",
|
||||||
|
+ "type": [
|
||||||
|
+ "array",
|
||||||
|
+ "string"
|
||||||
|
+ ],
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
diff --git a/doc/rtd/reference/network-config-format-v1.rst b/doc/rtd/reference/network-config-format-v1.rst
|
||||||
|
index d267eb94..42f2dc22 100644
|
||||||
|
--- a/doc/rtd/reference/network-config-format-v1.rst
|
||||||
|
+++ b/doc/rtd/reference/network-config-format-v1.rst
|
||||||
|
@@ -252,8 +252,8 @@ Users can specify a ``nameserver`` type. Nameserver dictionaries include
|
||||||
|
the following keys:
|
||||||
|
|
||||||
|
- ``address``: List of IPv4 or IPv6 address of nameservers.
|
||||||
|
-- ``search``: List of hostnames to include in the :file:`resolv.conf` search
|
||||||
|
- path.
|
||||||
|
+- ``search``: Optional. List of hostnames to include in the :file:`resolv.conf`
|
||||||
|
+ search path.
|
||||||
|
- ``interface``: Optional. Ties the nameserver definition to the specified
|
||||||
|
interface. The value specified here must match the ``name`` of an interface
|
||||||
|
defined in this config. If unspecified, this nameserver will be considered
|
||||||
|
diff --git a/tests/unittests/config/test_schema.py b/tests/unittests/config/test_schema.py
|
||||||
|
index 28f0b39d..52667332 100644
|
||||||
|
--- a/tests/unittests/config/test_schema.py
|
||||||
|
+++ b/tests/unittests/config/test_schema.py
|
||||||
|
@@ -2048,6 +2048,19 @@ class TestNetworkSchema:
|
||||||
|
does_not_raise(),
|
||||||
|
id="bond_with_all_known_properties",
|
||||||
|
),
|
||||||
|
+ pytest.param(
|
||||||
|
+ {
|
||||||
|
+ "network": {
|
||||||
|
+ "version": 1,
|
||||||
|
+ "config": [
|
||||||
|
+ {"type": "physical", "name": "eth0", "mtu": None},
|
||||||
|
+ {"type": "nameserver", "address": "8.8.8.8"},
|
||||||
|
+ ],
|
||||||
|
+ }
|
||||||
|
+ },
|
||||||
|
+ does_not_raise(),
|
||||||
|
+ id="GH-4710_mtu_none_and_str_address",
|
||||||
|
+ ),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
def test_network_schema(self, src_config, expectation):
|
||||||
|
--
|
||||||
|
2.39.3
|
||||||
|
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: cloud-init
|
Name: cloud-init
|
||||||
Version: 23.4
|
Version: 23.4
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Cloud instance init scripts
|
Summary: Cloud instance init scripts
|
||||||
|
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -31,6 +31,10 @@ Patch17: ci-fix-clean-stop-warning-when-running-clean-command-47.patch
|
|||||||
Patch18: ci-test-jsonschema-Pin-jsonschema-version-4781.patch
|
Patch18: ci-test-jsonschema-Pin-jsonschema-version-4781.patch
|
||||||
# For RHEL-22248 - [Azure][RHEL-8] cloud-init-23.4 cannot read "- Azure" datasource_list format
|
# For RHEL-22248 - [Azure][RHEL-8] cloud-init-23.4 cannot read "- Azure" datasource_list format
|
||||||
Patch19: ci-Revert-Use-grep-for-faster-parsing-of-cloud-config-i.patch
|
Patch19: ci-Revert-Use-grep-for-faster-parsing-of-cloud-config-i.patch
|
||||||
|
# For RHEL-21323 - [rhel-8] The schema WARNING info for network-config.json is not suitable in cloud-init-23.4
|
||||||
|
Patch20: ci-ci-Pin-pytest-8.0.0.-4816.patch
|
||||||
|
# For RHEL-21323 - [rhel-8] The schema WARNING info for network-config.json is not suitable in cloud-init-23.4
|
||||||
|
Patch21: ci-fix-Add-types-to-network-v1-schema-4841.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -246,6 +250,12 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
|
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 26 2024 Miroslav Rezanina <mrezanin@redhat.com> - 23.4-5
|
||||||
|
- ci-ci-Pin-pytest-8.0.0.-4816.patch [RHEL-21323]
|
||||||
|
- ci-fix-Add-types-to-network-v1-schema-4841.patch [RHEL-21323]
|
||||||
|
- Resolves: RHEL-21323
|
||||||
|
([rhel-8] The schema WARNING info for network-config.json is not suitable in cloud-init-23.4)
|
||||||
|
|
||||||
* Fri Feb 02 2024 Jon Maloy <jmaloy@redhat.com> - 23.4-4
|
* Fri Feb 02 2024 Jon Maloy <jmaloy@redhat.com> - 23.4-4
|
||||||
- ci-Revert-Use-grep-for-faster-parsing-of-cloud-config-i.patch [RHEL-22248]
|
- ci-Revert-Use-grep-for-faster-parsing-of-cloud-config-i.patch [RHEL-22248]
|
||||||
- Resolves: RHEL-22248
|
- Resolves: RHEL-22248
|
||||||
|
Loading…
Reference in New Issue
Block a user