Skip to content

docs: document moving Ubuntu Pro from the ubuntu-advantage to the ubuntu-pro charm - #278

Open
vsz-work wants to merge 1 commit into
canonical:mainfrom
vsz-work:open-4913-pro-charm-no-upgrade-path
Open

vsz-work wants to merge 1 commit into
canonical:mainfrom
vsz-work:open-4913-pro-charm-no-upgrade-path

Conversation

@vsz-work

@vsz-work vsz-work commented Nov 16, 2026 •

Copy link
Copy Markdown

From 2026.1.1, sunbeam enable pro deploys the ubuntu-pro charm instead of the deprecated ubuntu-advantage. There is no in-place upgrade between the two charms. Deployments upgrading from 2026.1.0 must disable and then enable Ubuntu Pro to move over. This PR documents that requirement and the new detach behaviour of sunbeam disable pro.

how-to/features/ubuntu-pro.rst:

  • Overview: states which charm the feature deploys (ubuntu-advantage in 2026.1.0), and links to the new section.
  • Enabling Ubuntu Pro: enable fails with the pro attach error if a machine can't attach, and how to recover.
  • Disabling Ubuntu Pro:
    • Disable now detaches every machine from the subscription before removing the charm.
    • New subsection, "If disabling fails": the error format, and what to do for each unit status (agent lost; hook error, fixed with juju resolve; cause can't be fixed, with a manual pro detach and juju remove-application). Running enable again keeps Pro instead.
  • New section, "Moving from the ubuntu-advantage charm":
    • How to check which charm a deployment runs.
    • The required order: refresh the snap to 2026.1.1 first, then disable, check each machine is detached, enable, and check again. It links to "If disabling fails".
    • A note that machines have no Pro services (Livepatch, ESM) between the disable and enable steps.
    • A warning against running enable before disable on ubuntu-advantage: it replaces the charm without detaching or relating it, and a second enable recovers. The last step now checks that every node has an active ubuntu-pro unit, which catches this.

how-to/operations/cluster-upgrades.rst: a note that the cluster refresh commands don't replace ubuntu-advantage when upgrading from 2026.1.0 to 2026.1.1, linking to the new section.

tutorial/get-familiar-with-openstack.rst: fixes the enable example. sunbeam enable pro takes the token as an argument, and there is no --token option.

What was verified

On a single-node 2026.1 deployment in an LXD VM, Juju 3.6.29:

Behaviour documented How it was verified Result
Refreshing the snap leaves ubuntu-advantage in place 2026.1/edge rev 1165 with pro enabled, then refreshed to a build with the new charm Still ubuntu-advantage rev 147
sunbeam cluster refresh leaves it in place Full refresh sequence on the legacy cluster after the snap refresh The intra-channel step ran juju refresh ubuntu-pro with no manifest entry, which stays on ubuntu-advantage latest/edge rev 147, still Active "Attached". The new deploy-pro plan is copied into the plan directory but not applied
Disable then enable moves to ubuntu-pro Same VM after the refresh ubuntu-pro rev 45, active
An older snap's disable doesn't detach (step 1 warning) Disable with rev 1165 Charm removed, machine still attached
Disable detaches before removing the charm Build with #1028, new charm attached: false, detach before removal hooks
Disable detaches when the cluster still runs ubuntu-advantage 2026.1/edge enable → refresh to the #1028 build → disable attached: false
Disable fails, keeps the app, names the unit (agent lost) Stopped jujud-machine-0, then disable Failed after 600 s naming ubuntu-pro/3; app kept
Agent back → unit detaches → re-run succeeds Same run attached: false, re-run succeeded
Enable after a failed disable attaches again Same run, same token Reattached
Enable with an invalid token fails with the attach error; recover with enable or disable T3: bad token, then each recovery Enable failed with the attach error. Enable with a valid token attached; disable after a failed enable removed the app, with the machine detached
Hook error → juju resolve → re-run disable T4: ubuntu-advantage detach wrapped to fail Disable failed after 600 s with the unit in error (hook failed: "config-changed"), app kept, machine attached. Juju didn't retry by itself. After the cause was fixed, juju resolve detached the machine and a re-run of disable succeeded
Manual fallback: pro detach + remove-application --force + disable T5: same simulation, cause left in place; machine detached by hand The final disable skipped the Detach step and succeeded; app, relation and Terraform resources gone
Enable over ubuntu-advantage without disabling T2: legacy cluster after T1, sunbeam enable pro with no disable Breaks. The old unit ran only stop/remove (no detach). The new ubuntu-pro app has no juju-info relation and no units, and reports unknown, which enable accepts. Terraform: 1 added, 0 changed, 1 destroyed, so the app was replaced and the integration left alone. The machine stays attached with no charm managing it. Recovery: a second sunbeam enable pro created the relation. The new unit took over the attachment, and the machine is attached and managed by ubuntu-pro. The docs warn against this and give the recovery

Every behaviour the docs describe was run on a single-node deployment. The docs don't claim anything about the Pro dashboard or seat counts, because that wasn't checked.

Evidence

Trimmed excerpts from tests runs on 2026-11-16, one file per test, attached below:

The full logs aren't attached. t1-refresh.log contains the Kubernetes client credentials, and the debug logs include deployment details unrelated to Pro.

Docs checks

make html (no warnings), make spelling and make woke are clean.

Links

  • Code changes this documents:
    • #1020: feat(pro): deploy the ubuntu-pro charm instead of ubuntu-advantage
    • #1023: fix(pro): pass machine_model_uuid when disabling Ubuntu Pro
    • #1028: fix(pro): detach machines from Ubuntu Pro before removing the charm
  • Bug: LP#2158218

Jira card: OPEN-4913

@vsz-work
vsz-work force-pushed the open-4913-pro-charm-no-upgrade-path branch from 91bd488 to 8631416 Compare November 16, 2026 17:13
@vsz-work
vsz-work marked this pull request as ready for review November 16, 2026 17:32

@hmlanigan hmlanigan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

once approved this can be landed as it's targeted at main, not stable/2026.1

Comment thread docs/how-to/features/ubuntu-pro.rst Resolved
Comment thread docs/how-to/features/ubuntu-pro.rst Resolved
Comment thread docs/how-to/features/ubuntu-pro.rst Resolved
@vsz-work
vsz-work force-pushed the open-4913-pro-charm-no-upgrade-path branch from 8631416 to 207b4aa Compare November 18, 2026 13:15
@vsz-work

Copy link
Copy Markdown
Author

once approved this can be landed as it's targeted at main, not stable/2026.1

Thanks, I've removed the hold from the description.

@vsz-work
vsz-work requested a review from hmlanigan November 19, 2026 14:12
Comment thread docs/how-to/features/ubuntu-pro.rst Outdated
Comment on lines +30 to +34
The command deploys the ``ubuntu-pro`` charm and attaches every machine to the
subscription. It fails if a machine cannot attach, for example because the
token is not valid, and shows the error returned by the ``pro attach``
command. Run ``sunbeam enable pro`` again with a valid token, or disable Ubuntu
Pro.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
The command deploys the ``ubuntu-pro`` charm and attaches every machine to the
subscription. It fails if a machine cannot attach, for example because the
token is not valid, and shows the error returned by the ``pro attach``
command. Run ``sunbeam enable pro`` again with a valid token, or disable Ubuntu
Pro.
The command deploys the ``ubuntu-pro`` charm and attaches every machine to the
subscription.
.. _ubuntu-pro-enable-failed:
If enabling fails
~~~~~~~~~~~~~~~~~~
If the command fails because a machine cannot attach, for example because the
token is not valid, and shows the error returned by the ``pro attach``
command. Run ``sunbeam enable pro`` again with a valid token, or disable Ubuntu
Pro.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done, with the ubuntu-pro-enable-failed anchor.

juju status -m openstack-machines ubuntu-pro --format json | jq -r '.applications["ubuntu-pro"]["charm-name"]'

.. warning::
Do not run ``sunbeam enable pro`` on a deployment that still runs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thought: this sounds like a bug waiting to happen. Is there an appropriate error messages for users?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No, there isn't one today. sunbeam enable pro reports success. The only sign is that the ubuntu-pro application has no units and an unknown status, which is why the last migration step checks for active units. This is a bug: Terraform replaces the application but leaves the juju-info integration alone, and enable accepts an application with no units. Should we open a bug in snap-openstack so that enable refuses to run while ubuntu-advantage is deployed and tells the user to disable first? The warning stays in the docs until that fix lands.

…ntu-pro charm

From 2026.1.1, sunbeam enable pro deploys the ubuntu-pro charm instead of
ubuntu-advantage, and there is no in-place upgrade between them. Document
the disable-then-enable migration for deployments upgrading from
2026.1.0, and that a snap refresh or cluster refresh leaves
ubuntu-advantage in place. Warn against running enable before disable on
ubuntu-advantage, which leaves the machines attached to the subscription
with no charm managing them, and document how to recover.

Document that sunbeam disable pro now detaches every machine before it
removes the charm, and how to recover when the detach fails, including
retrying a failed hook with juju resolve. Document how enable reports a
failed attach.

Fix the tutorial enable example: the token is an argument, there is no
--token option.

Jira: OPEN-4913
Related-Bug: #2158218
Assisted-By: Claude Code (Claude Opus 5.5)
Signed-off-by: Vítor Zeni <vitor.zeni@bairesdev.com>
@vsz-work
vsz-work force-pushed the open-4913-pro-charm-no-upgrade-path branch from 207b4aa to 7ec7a74 Compare November 23, 2026 12:50
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