Skip to content

pro: replace deprecated cloud-init key ubuntu_advantage#2069

Draft
ogayot wants to merge 1 commit intocanonical:mainfrom
ogayot:deprecated-ubuntu-advantage
Draft

pro: replace deprecated cloud-init key ubuntu_advantage#2069
ogayot wants to merge 1 commit intocanonical:mainfrom
ogayot:deprecated-ubuntu-advantage

Conversation

@ogayot
Copy link
Member

@ogayot ogayot commented Aug 27, 2024

On cloud-init versions >= 24.1, having the ubuntu_advantage key leads to the following deprecation notice:

cc_ubuntu_pro.py[WARNING]: Deprecated configuraiton key(s) provided:
ubuntu_advantage. Expected "ubuntu_pro": will attempt to continue.

Let's use ubuntu_pro instead ; which should be available on 20.04.5, 22.04.5 and all the 24.04+ ISOs.

Marking as a draft before I figure out what we want to do for older ISOs + refresh.

On cloud-init versions >= 24.1, having the ubuntu_advantage key leads to
the following deprecation notice:

  > cc_ubuntu_pro.py[WARNING]: Deprecated configuraiton key(s) provided:
  > ubuntu_advantage. Expected "ubuntu_pro": will attempt to continue.

Let's use ubuntu_pro instead ; which should be available on 20.04.5,
22.04.5 and all the 24.04+ ISOs.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
@ogayot ogayot force-pushed the deprecated-ubuntu-advantage branch from d37de44 to 2f225ab Compare August 27, 2024 18:48
Copy link
Contributor

@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.

The ubuntu_pro support is available in cloud-init and ubuntu pro in Focal and later as of cloud-init version 24.1. Looks good to me on the initial approach.

python3 scripts/check-yaml-fields.py <(python3 scripts/check-yaml-fields.py $tmpdir/etc/cloud/cloud.cfg.d/99-installer.cfg datasource.None.userdata_raw) \
locale='"en_GB.UTF-8"' \
timezone='"Pacific/Guam"' \
ubuntu_advantage.token='"C1NWcZTHLteJXGVMM6YhvHDpGrhyy7"' \
Copy link
Contributor

Choose a reason for hiding this comment

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

Encoding a token publicly in a repo gave me pause, but Just confirmed that this token is, in fact, invalid/not real and cannot be used to attach.

# documentation.
return {
"ubuntu_advantage": {
"ubuntu_pro": {
Copy link
Contributor

Choose a reason for hiding this comment

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

@ogayot looks good to me. Moving to ubuntu_pro is supported on 20.04 and later for cloud-init version 24.1 which published to the archive in June.

There are two uploads under review that will make this valid as well for 16.04 and 18.04 if that becomes something you need to support, but that hasn't landed yet.

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