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: nocloud no fail when network-config absent #5580

Conversation

blackboxsw
Copy link
Collaborator

Proposed Commit Message

Commit 5322dca2 introduced an assumption to read_seeded that
network-config must always be present for NoCloud datasource.
Since it is still considered and optional supplemental configuration
allow the read_seeed calls to succeed in the absence of network-config.

Avoids failures seen in tests/integration-tests/datasources/test_nocloud.py::
  test_nocloud_seedfrom_vendordata

Additional Context

Test Steps

Failing integration test without this changeset

CLOUD_INIT_KEEP_INSTANCE=1 CLOUD_INIT_CLOUD_INIT_SOURCE=ppa:cloud-init-dev/daily CLOUD_INIT_OS_IMAGE=oracular CLOUD_INIT_PLATFORM=lxd_container tox -e integration-tests -- tests/integration_tests/datasources/test_nocloud.py::test_nocloud_seedfrom_vendordata

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>)

Copy link
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

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

One nitpick: "Error in network-config response" may make users think that something is wrong, when it is not. "No network-config provided" may make more sense to an end user.

Thanks @blackboxsw!

Commit 5322dca introduced an assumption to read_seeded that
network-config must always be present for NoCloud datasource.
Since it is still considered and optional supplemental configuration
allow the read_seeed calls to succeed in the absence of network-config.

Avoids failures seen in tests/integration-tests/datasources/test_nocloud.py::
  test_nocloud_seedfrom_vendordata
@blackboxsw blackboxsw force-pushed the fix-nocloud-dont-require-network-config branch from 3eb7d91 to c04e0b5 Compare August 3, 2024 06:28
@blackboxsw blackboxsw merged commit b7b11bc into canonical:main Aug 3, 2024
20 of 22 checks passed
holmanb pushed a commit that referenced this pull request Aug 6, 2024
Commit 5322dca introduced an assumption to read_seeded that
network-config must always be present for NoCloud datasource.
Since it is still considered and optional supplemental configuration
allow the read_seeed calls to succeed in the absence of network-config.

Avoids failures seen in tests/integration-tests/datasources/test_nocloud.py::
  test_nocloud_seedfrom_vendordata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants