Skip to content

Conversation

@goldberl
Copy link
Contributor

@goldberl goldberl commented Jan 5, 2026

Proposed Commit Message

fix: Pass interface string to get_newest_lease()

In DataSourceCloudStack.py, get_newest_lease() is currently being
passed a Distro object, causing a Python type error. This PR
changes the Distro object to the interface string to fix this error.

Additional Context

In a CloudStack environment, when launching a Noble instance cloud-init was failing with the following error:

Running invalid command: ['dhcpcd', '--dumplease', '--ipv4only', <cloudinit.distros.ubuntu.Distro object at 0x7315e34d1df0>]

This error does not show up on Jammy, only Noble.

To fix this type error, the argument passed to get_newest_lease() in DataSourceCloudStack.py was changed from a Distro object to a string.

Test Steps

  1. Set up a CloudStack environment and launch a Noble instance on it
  2. See cloud-init logs

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

@holmanb holmanb self-assigned this Jan 6, 2026
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.

Thanks @goldberl!

@holmanb holmanb merged commit e02b739 into canonical:main Jan 6, 2026
20 checks passed
holmanb pushed a commit that referenced this pull request Feb 5, 2026
In DataSourceCloudStack.py, get_newest_lease() is currently being
passed a Distro object, causing a Python type error. This PR
changes the Distro object to the interface string to fix this error.
@goldberl goldberl deleted the fix/cloudstack-dhcpcd-arg branch February 10, 2026 19:53
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