Skip to content

fix(packaging): drop unsupported ConditionEnvironment from cloud-init units on systemd < 246#5312

Merged
blackboxsw merged 2 commits into
canonical:ubuntu/focalfrom
blackboxsw:ubuntu/focal
May 21, 2024
Merged

fix(packaging): drop unsupported ConditionEnvironment from cloud-init units on systemd < 246#5312
blackboxsw merged 2 commits into
canonical:ubuntu/focalfrom
blackboxsw:ubuntu/focal

Conversation

@blackboxsw
Copy link
Copy Markdown
Collaborator

Focal's systemd 245.4 doesn't have support for ConditionEnvironment keys in units, it was introduced in systemd 246. Drop these keys from cloud-init units/targets to avoid warnings from systemctl status and journalctl about systemd ignoring those keys.

rebase merge individual commits

primary funtional commit

    fix(packaging): drop unsupported ConditionEnvironment keys from units
    
    Focal is based on systemd 245.5 which doesn't support
    ConditionEnvironment keys in Units. This feature was introduced in
    systemd 246. As a result, journalctl and systemctl status cloud-init
    will show warnings about systemd ignoring this key in various cloud-init
    units. Apply a quilt patch for focal-only which will drop this ignored
    key from our units/targets.

Additional Context

Test Steps

lxc launch ubuntu-daily/focal test-f 
lxc exec test-f -- cloud-init status --wait
# See warning messages from systemd about unsupported config keys 
lxc exex test-f -- journalctl -b 0 | grep ConditionEnvironment

Checklist

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

Focal is based on systemd 245.5 which doesn't support
ConditionEnvironment keys in Units. This feature was introduced in
systemd 246. As a result, journalctl and systemctl status cloud-init
will show warnings about systemd ignoring this key in various cloud-init
units. Apply a quilt patch for focal-only which will drop this ignored
key from our units/targets.
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.

LGTM!

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