Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add "manual" to allowed subnet types #5875

Merged
merged 32 commits into from
Dec 12, 2024

Conversation

mathmarchand
Copy link
Contributor

@mathmarchand mathmarchand commented Nov 14, 2024

fix: Add "manual" to allowed subnet types

fix: Add "manual" to allowed subnet types

Adding "manual" to network-configv1 allowed subnet types as it is missing. Also added parameters for the testing all the options from that list.

Fixes GH-5769 

Test Steps

I can reproduce this with cloud-init 24.4~3+really24.3.1-0ubuntu4 with:

# cat v1.yaml 
network:
  version: 1
  config:
  - mac_address: 34:80:0d:2c:a4:99
    mtu: 1500
    name: enp129s0f1
    subnets:
    - type: manual
    type: physical
  - mac_address: 34:80:0d:2c:a4:9a
    mtu: 1500
    name: enp129s0f2
    subnets:
    - type: manual
    type: physical
  - mac_address: 34:80:0d:2c:a4:9b
    mtu: 1500
    name: enp129s0f3
    subnets:
    - type: manual
    type: physical

# cloud-init schema -t network-config -c ./v1.yaml
Invalid network-config ./v1.yaml
Error: Cloud config schema errors: network.config.0.subnets.0.type: 'manual' is not one of ['dhcp4', 'dhcp', 'dhcp6', 'static', 'static6', 'ipv6_dhcpv6-stateful', 'ipv6_dhcpv6-stateless', 'ipv6_slaac'], network.config.1.subnets.0.type: 'manual' is not one of ['dhcp4', 'dhcp', 'dhcp6', 'static', 'static6', 'ipv6_dhcpv6-stateful', 'ipv6_dhcpv6-stateless', 'ipv6_slaac'], network.config.2.subnets.0.type: 'manual' is not one of ['dhcp4', 'dhcp', 'dhcp6', 'static', 'static6', 'ipv6_dhcpv6-stateful', 'ipv6_dhcpv6-stateless', 'ipv6_slaac']

Error: Invalid schema: network-config

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

@github-actions github-actions bot added the documentation This Pull Request changes documentation label Nov 14, 2024
@holmanb holmanb changed the title Issue #5769 fix: Add "manual" to allowed subnet types Nov 16, 2024
mathmarchand and others added 3 commits November 21, 2024 09:55
Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
xiaoge1001 and others added 8 commits November 21, 2024 09:57
…nical#5816)

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
…5856)

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
DeprecationWarning: Testing an element's truth value will
always return True in future versions

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
Warning:
PytestCollectionWarning: cannot collect test class
'TestUpdatePackageSources' because it has a __init__ constructor

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
Deprecation warning:
DeprecationWarning: Python 3.14 will, by default, filter extracted tar
archives and reject files or modify their metadata. Use the filter
argument to control this behavior.

Refs:

https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter
https://peps.python.org/pep-0706/

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
…ical#5856)

DeprecationWarning: Accessing jsonschema.__version__ is deprecated and will
be removed in a future release. Use importlib.metadata directly to query
for jsonschema's version.

canonicalGH-5174

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
…onical#5856)

Deprecated message:
DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated
and will be removed in a future release.
Call validator.evolve(schema=new_schema).iter_errors(...) instead.

Refs:
https://github.com/python-jsonschema/jsonschema/releases/tag/v4.0.0

canonicalGH-5175

Signed-off-by: Mathieu Marchand <mathieu.marchand@canonical.com>
thunderboltsid and others added 10 commits November 29, 2024 08:44
ntp and chrony configuration for rocky was missing. This leads
to ntp configuration via cloud-init not working for Rocky.

Also add thunderboltsid to github-cla-signers list
… as contributor (canonical#5874)

docs: Adjust arrow color in Mermaid diagrams for improved visibility

1. Changed the color of arrows in Mermaid diagrams to enhance
   visibility in both dark and light mode themes. This change ensures
   that the diagrams are readable regardless of the viewing mode. 
2. IMPORTANT: Changed the order in doc/rtd/conf.py file, this was done 
   because it was giving import errors on running build commands. 
3. Added "MaheshG11" to "tools/.github-cla-signers".

Fixes canonicalGH-5837
…al#5885)

Refactors the code in the file "tests/unittests/config/test_cc_timezone.py" 
using pytest. This helps remove dependance of this test on 
"tests/unittests/helpers.py:FileSystemMockingTestCase"

Fixes: part of canonicalGH-5760
It has been broken and has marginal value, so it is not worth
maintaining. Since it was a developer-facing option, this should
have no backwards compatibility concerns.

Fixes canonicalGH-5756
grub_dpkg was removed so that's one less event we should see
Copy link
Contributor

@aciba90 aciba90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay here. Assuming the canonical remote is called upstream in your repo, could you please perform a git pull --rebase upstream main on your branch and push?

There are some weird commits from main in the PR that obscure the review, many thanks.

holmanb and others added 9 commits November 29, 2024 08:44
Most RHEL systems use network manager to bring up manage network connections.
Network Manager uses route-metric for the default route
and route/plen[,gateway,metric] for the additional static routes,
please see
https://networkmanager.dev/docs/api/latest/nm-settings-nmcli.html
https://networkmanager.dev/docs/api/latest/nm-settings-keyfile.html

This changes ensures that cloud-init generates nmconnection files with
route metric settings that are compatible with RHEL and network manager.

Fixes: canonicalGH-5877

Signed-off-by: Amy Chen <xiachen@redhat.com>
Minimal Ubuntu images don't show full path
Tried to fix in aedb7f9 , but there are two events (start and stop)
per module
Bump the version in cloudinit/version.py to 24.4 and
update ChangeLog.
For post 2030 FIPS 140-3 compliance for key size transition as per NIST SP 800-131A Rev. 2
and NIST SP 800-57 Part 1 Rev. 5. 

Per @xnox
- Massage tutorial organization, wording, and format
- Create space for
alternative deployment methods (e.g. WSL) under "how-to"
Copy link
Contributor

@aciba90 aciba90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix and the unit test additions!

@aciba90 aciba90 merged commit 7104df9 into canonical:main Dec 12, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This Pull Request changes documentation
Projects
None yet
10 participants