Skip to content

tests: specialize lxd_discovery test for lxd_vm vendordata#1106

Merged
TheRealFalcon merged 1 commit into
canonical:mainfrom
blackboxsw:lxd-test-bionic
Nov 11, 2021
Merged

tests: specialize lxd_discovery test for lxd_vm vendordata#1106
TheRealFalcon merged 1 commit into
canonical:mainfrom
blackboxsw:lxd-test-bionic

Conversation

@blackboxsw
Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw commented Nov 11, 2021

Proposed Commit Message

On Bionic and Xenial, pycloudlib sets user.vendor-data config in lxd
to ensure that lxd-agent is setup on those images.

Adapt the lxd_discovery integration test to assert the appropriate
user.vendor-data config key exists if we are on xenial or bionic.

Also add assertions that /var/lib/cloud/nocloud-net/meta-data still
exists in the images because we want NoCloud to be a viable fallback
datasource if LXD config security.lxddev = false or LXD datasource
discovery encountered an unexpected error.

Additional Context

pycloudlib has special vendor-data treatment on Xenial and Bionic

Test Steps

.tox/integration-tests/bin/pytest  tests/integration_tests/datasources/test_lxd_discovery.py
## or ##
CLOUD_INIT_SOURCE=lxd_vm .tox/integration-tests/bin/pytest  tests/integration_tests/datasources/test_lxd_discovery.py

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

On Bionic and Xenial, pycloudlib sets user.vendor-data config in lxd
to ensure that lxd-agent is setup on those images.

Adapt the lxd_discovery integration test to assert the appropriate
user.vendor-data config key exists if we are on xenial or bionic.

Also add assertions that /var/lib/cloud/nocloud-net/meta-data still
exists in the images because we want NoCloud to be a viable fallback
datasource if LXD config security.lxddev = false or LXD datasource
discovery encountered an unexpected error.
Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

Verified LXD VM and LXD containers.

@TheRealFalcon TheRealFalcon merged commit 918d69a into canonical:main Nov 11, 2021
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