Repository navigation
feat(pro): deploy the ubuntu-pro charm instead of ubuntu-advantage - #1020
Merged
Merged
Conversation
The ubuntu-advantage charm is deprecated in favour of ubuntu-pro. Switch the deploy-pro plan to deploy ubuntu-pro from latest/stable, which publishes an ubuntu@24.04 build (amd64 only). The Juju application name and the Terraform resource address are kept as ubuntu-pro / juju_application.ubuntu_pro, so `sunbeam disable pro` still removes an application deployed with the old charm. There is no in-place migration: existing deployments must disable and re-enable pro to move to the new charm. The ubuntu-advantage-channel variable is renamed to ubuntu-pro-channel. The ubuntu-pro charm reports attach failures in the same "stderr: ... stdout: ..." format, so the error extraction is unchanged. Add unit tests for the blocked-status error paths and for the plan deploying ubuntu-pro with a channel default matching UBUNTU_PRO_CHANNEL. Jira: OPEN-4914 Assisted-By: Claude Code (Claude Opus 5.5) Partial-Bug: #2158218 Signed-off-by: Vítor Zeni <vitor.zeni@bairesdev.com>
vsz-work
marked this pull request as draft
November 9, 2026 17:53
vsz-work
marked this pull request as ready for review
November 10, 2026 14:13
Raven-182
approved these changes
Nov 10, 2026
Raven-182
left a comment
There was a problem hiding this comment.
LGTM, thanks. For the issue with timeout on first enable mentioned in the description, we should create a launchpad bug to track that
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
ubuntu-advantagecharm is deprecated in favour ofubuntu-pro. This PR switches theprofeature's Terraform plan so thatsunbeam enable prodeploysubuntu-profromlatest/stable. That channel publishes anubuntu@24.04build, amd64 only.Changes:
deploy-pro/main.tf: the charm is nowubuntu-pro. The Juju application name (ubuntu-pro) and the Terraform resource address (juju_application.ubuntu_pro) are unchanged. As a result,sunbeam disable prostill removes an application deployed with the old charm, because it destroys whatever is recorded in Terraform state.deploy-pro/variables.tf:ubuntu-advantage-channelis renamed toubuntu-pro-channel, and its default changes fromlatest/edgetolatest/stable. Nothing else referenced the old variable.feature.py: adds aUBUNTU_PRO_CHANNELconstant, which a test checks against the Terraform default. The charm reports attach failures in the sameFailed running command ... stderr: ... stdout: ...format as before, so the code that extracts the blocked-status error is unchanged.test_pro.py: new tests for the blocked-status error paths, which were previously untested, and for the plan deployingubuntu-prowith the expected channel default.There is no in-place migration. On an existing deployment with pro enabled, run
sunbeam disable proand thensunbeam enable proto move to the new charm. Operator docs and release notes for this are tracked separately in OPEN-4913. This change targets 2026.1 onwards and will not be backported to 2025.1 or earlier.Depends on #1023
sunbeam disable prois currently broken onmain,stable/2026.1andstable/2025.1: it never passes the requiredmachine_model_uuid, so Terraform refuses to run. That fix (OPEN-4916) has to land before this PR, or with it in the same release. Otherwise existing deployments have no way to move to the new charm.Partial-bug: #2158218
QA steps
Automated:
The manual steps below need a snap that also has the disable fix, e.g. this branch with # cherry-picked. With this branch alone, every
sunbeam disable prostep fails.New deployment (needs an Ubuntu Pro token):
sunbeam enable pro <token>, thenjuju status -m openstack-machines ubuntu-pro.ubuntu-proapplication uses charmubuntu-profromlatest/stable, with an active unit on every machine.sunbeam disable pro.ubuntu-proapplication and itsjuju-infointegration withsunbeam-machineare removed.sunbeam enable pro <invalid-token>.Existing deployment (old charm):
2026.1/edgesnap and runsunbeam enable pro <token>.ubuntu-proapplication runs charmubuntu-advantage.ubuntu-advantage. Nothing changes until pro is disabled.sunbeam disable pro.ubuntu-proapplication (old charm) and itsjuju-infointegration are removed.sunbeam enable pro <token>.ubuntu-proapplication now runs charmubuntu-pro(latest/stable, rev 45), and the machine is attached.Tested
On 2026-11-10, a single-node 2026.1 cluster in an LXD VM went through the existing-deployment steps above. It used a snap built from this branch with the disable fix cherry-picked:
2026.1/edge(rev 1165)ubuntu-advantagedeployed and attachedsunbeam disable prosunbeam enable proubuntu-prolatest/stablerev 45 on ubuntu@24.04, active and attached, within the 5-minute timeoutclean 2026.1/edge install with pro enabled, uses old charm
after snap refresh, still has old charm, no in-place migration
after pro disable, no ubuntu-pro app
after pro enable, new charm is listed
Known gaps, tracked under OPEN-4916 and not changed here:
tokenis set to empty, and disable deletes the application instead. The machine stays attached until the next enable, whose attach detaches first.sunbeam enable proon a fresh VM took more than 10 minutes, longer than the 5-minuteAPP_TIMEOUT. The re-enable above was quick because the machine was already attached. A first enable with the new charm on a fresh machine hasn't been measured yet.Links