Skip to content

Conversation

@blackboxsw
Copy link
Collaborator

@blackboxsw blackboxsw commented Dec 19, 2025

  • I have signed the CLA: https://ubuntu.com/legal/contributors
  • I have included a comprehensive commit message using the guide below
  • I have added unit tests to cover the new behavior under tests/unittests/
    • Test files should map to source files i.e. a source file cloudinit/example.py should be tested by tests/unittests/test_example.py
    • Run unit tests with tox -e py3
  • I have kept the change small, avoiding unnecessary whitespace or non-functional changes.

Proposed Commit Messages

* tests: add MAAS test for kernel reading datasource from kernel command line

* chore: drop ds-identify support for MAAS

Fixes PALS-1837

Additional Context

Test Steps

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

@blackboxsw blackboxsw requested a review from holmanb December 19, 2025 23:35
@github-actions
Copy link

github-actions bot commented Jan 3, 2026

Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close.

If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging blackboxsw, and he will ensure that someone takes a look soon.

(If the pull request is closed and you would like to continue working on it, please do tag blackboxsw to reopen it.)

@github-actions github-actions bot added the stale-pr Pull request is stale; will be auto-closed soon label Jan 3, 2026
@holmanb holmanb changed the title PALS-1837 drop dscheck maas chore: drop dscheck maas Jan 5, 2026
@holmanb holmanb removed the stale-pr Pull request is stale; will be auto-closed soon label Jan 5, 2026
SHELL_MOCK_TMPL = """\
%(name)s() {
local out='%(out)s' err='%(err)s' r='%(ret)s' RET='%(RET)s'
%(DI_VARS)s
Copy link
Member

@holmanb holmanb Jan 5, 2026

Choose a reason for hiding this comment

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

This might work, but it lays a trap for future developers.

This injects a global variable into the script by way of a mocked function.

What happens if no mock is provided?

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can make use of the file sourced in get_environment instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Per your suggestion, kooks like we can write into ds-identify-env file directly. I provided a mechanism to set that to /ds_identify-env and write it with files to allow sourcing env vars we want to leverage during main() invocation.

@holmanb holmanb self-assigned this Jan 5, 2026
@blackboxsw blackboxsw force-pushed the PALS-1837-drop-dscheck-maas branch from 5f0ebe1 to 5a29b59 Compare January 6, 2026 00:07
@blackboxsw blackboxsw requested a review from holmanb January 6, 2026 00:08
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.

I wouldn't put an internal jira ticket in the commit history - it isn't generally useful. Linking to it from the PR description is fine. I would also modify the commit message to indicate that the current code is broken - as it is this reads as if ds-identify is loosing MAAS support, which it isn't.

Once the commit message is updated this looks good to me!

"DEBUG_LEVEL=2",
"DI_LOG=stderr",
"PATH_ROOT='%s'" % rootd,
"PATH_DI_ENV='%s/ds-identify-env'" % rootd,
Copy link
Member

Choose a reason for hiding this comment

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

nice, that's slick!

@blackboxsw blackboxsw merged commit a19f958 into canonical:main Jan 6, 2026
20 checks passed
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