Skip to content

Conversation

@jayendra13
Copy link

@jayendra13 jayendra13 commented Feb 4, 2026

When a non-root user runs cloud-init schema --config-file <file>, the command was attempting to load the datasource from /var/lib/cloud/instance/obj.pkl, causing a confusing permission warning even though the datasource isn't needed for validating user-provided config files.

Skip datasource loading when --config-file is provided since we're only validating the file's YAML syntax and schema, not system instance data.

Fixes: #6592

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

When a non-root user runs `cloud-init schema --config-file <file>`,
the command was attempting to load the datasource from
/var/lib/cloud/instance/obj.pkl, causing a confusing permission
warning even though the datasource isn't needed for validating
user-provided config files.

Skip datasource loading when --config-file is provided since we're
only validating the file's YAML syntax and schema, not system
instance data.

Fixes: canonical#6592
@holmanb holmanb self-assigned this Feb 4, 2026
@jayendra13
Copy link
Author

#6592 (comment)
CLA signing somehow not working, where can I get help for it ?

@jayendra13 jayendra13 marked this pull request as ready for review February 5, 2026 16:13
@jayendra13
Copy link
Author

@holmanb it should work now, after CLA signing.

@holmanb
Copy link
Member

holmanb commented Feb 11, 2026

Skip datasource loading when --config-file is provided since we're only validating the file's YAML syntax and schema, not system instance data.

@blackboxsw do you know if this command is supposed to be able to validate jinja-based configs? If not, I'm unsure why loading these files would be needed.

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.

cloud-init schema should not require sudo

2 participants