Repository navigation
Conversation
91bd488 to
8631416
Compare
hmlanigan
left a comment
There was a problem hiding this comment.
once approved this can be landed as it's targeted at main, not stable/2026.1
8631416 to
207b4aa
Compare
Thanks, I've removed the hold from the description. |
| 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. |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
thought: this sounds like a bug waiting to happen. Is there an appropriate error messages for users?
There was a problem hiding this comment.
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>
207b4aa to
7ec7a74
Compare
From 2026.1.1,
sunbeam enable prodeploys theubuntu-procharm instead of the deprecatedubuntu-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 ofsunbeam disable pro.how-to/features/ubuntu-pro.rst:ubuntu-advantagein 2026.1.0), and links to the new section.pro attacherror if a machine can't attach, and how to recover.juju resolve; cause can't be fixed, with a manualpro detachandjuju remove-application). Running enable again keeps Pro instead.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 activeubuntu-prounit, which catches this.how-to/operations/cluster-upgrades.rst: a note that the cluster refresh commands don't replaceubuntu-advantagewhen 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 protakes the token as an argument, and there is no--tokenoption.What was verified
On a single-node 2026.1 deployment in an LXD VM, Juju 3.6.29:
ubuntu-advantagein place2026.1/edgerev 1165 with pro enabled, then refreshed to a build with the new charmubuntu-advantagerev 147sunbeam cluster refreshleaves it in placejuju refresh ubuntu-prowith no manifest entry, which stays onubuntu-advantagelatest/edgerev 147, still Active "Attached". The newdeploy-proplan is copied into the plan directory but not appliedubuntu-proubuntu-prorev 45, activeattached: false, detach before removal hooksubuntu-advantage2026.1/edgeenable → refresh to the #1028 build → disableattached: falsejujud-machine-0, then disableubuntu-pro/3; app keptattached: false, re-run succeededjuju resolve→ re-run disableubuntu-advantage detachwrapped to failerror(hook failed: "config-changed"), app kept, machine attached. Juju didn't retry by itself. After the cause was fixed,juju resolvedetached the machine and a re-run of disable succeededpro detach+remove-application --force+ disableubuntu-advantagewithout disablingsunbeam enable prowith no disablestop/remove(no detach). The newubuntu-proapp has nojuju-inforelation and no units, and reportsunknown, 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 secondsunbeam enable procreated the relation. The new unit took over the attachment, and the machine is attached and managed byubuntu-pro. The docs warn against this and give the recoveryEvery 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:
t1-cluster-refresh.pr.txt: the app before and after, and the pro lines ofsunbeam -v cluster refresh.t2-enable-without-disable.pr.txt: the enable that replaced the charm (1 added, 0 changed, 1 destroyed, appunknown). Then the recovery enable (1 added), the unit log (the old unit removed without detaching, the new unit detaching and attaching again), andjuju status --relations.t3-invalid-token.pr.txt: the enable error.t4-hook-error-resolve.pr.txt: the disable error, and the unit status before and afterjuju resolve.t5-manual-fallback.pr.txt: the final disable skipping the detach step.The full logs aren't attached.
t1-refresh.logcontains the Kubernetes client credentials, and the debug logs include deployment details unrelated to Pro.Docs checks
make html(no warnings),make spellingandmake wokeare clean.Links
feat(pro): deploy the ubuntu-pro charm instead of ubuntu-advantagefix(pro): pass machine_model_uuid when disabling Ubuntu Profix(pro): detach machines from Ubuntu Pro before removing the charmJira card: OPEN-4913