Skip to content

testing: stop universally overwriting /etc/cloud/cloud.cfg.d#1237

Merged
TheRealFalcon merged 1 commit into
canonical:mainfrom
TheRealFalcon:remove-mount
Feb 3, 2022
Merged

testing: stop universally overwriting /etc/cloud/cloud.cfg.d#1237
TheRealFalcon merged 1 commit into
canonical:mainfrom
TheRealFalcon:remove-mount

Conversation

@TheRealFalcon
Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon commented Feb 3, 2022

Proposed Commit Message

testing: stop universally overwriting /etc/cloud/cloud.cfg.d

As part of IN_PLACE testing, /etc/cloud/cloud.cfg.d get overwritten by
what's in the source tree. This can cause problems when the directory is
mounted in, because tests need the ability to modify files in
/etc/cloud. Attempting to 'lxc file push'  instead will fail on LXD VMs
because the LXD agent isn't available yet.

If such functionality is desired, one can temporarily use the
'lxd_setup' mark while writing a test and push the files manually.

Additional Context

#1234

As part of IN_PLACE testing, /etc/cloud/cloud.cfg.d get overwritten by
what's in the source tree. This can cause problems when the directory is
mounted in, because tests need the ability to modify files in
/etc/cloud. Attempting to 'lxc file push'  instead will fail on LXD VMs
because the LXD agent isn't available yet.

If such functionality is desired, one can temporarily use the
'lxd_setup' mark while writing a test and push the files manually.
@TheRealFalcon TheRealFalcon added wip Work in progress, do not land and removed wip Work in progress, do not land labels Feb 3, 2022
Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

This is fine as we only risk exposure for not seeing unreleased changes to ./config/ in our jenkins git jobs which set CLOUD_INIT_SOURCE=IN_PLACE. This currently would affect the cc_keyboard tests failing since we changed that on Jan 22 and don't have an SRU yet that released those config changes.

@holmanb
Copy link
Copy Markdown
Member

holmanb commented Feb 3, 2022

LGTM. For what it's worth, a quick spot check shows that the overwritten files in a test instance currently match files deployed in a bionic image, so I wouldn't expect that to cause a behavior change in cloud-init.

@TheRealFalcon TheRealFalcon merged commit aa47ec0 into canonical:main Feb 3, 2022
@TheRealFalcon TheRealFalcon deleted the remove-mount branch February 3, 2022 22:05
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.

3 participants