Status: First execution document of Batch C. Runs after v1-do-doc-05-vault-init.md (admin-openrc valid; all charms active/idle including magnum). Runs before v1-do-doc-07-capi-bootstrap.md (CAPI workload cluster).
Replaces: runbooks/deprecated/04-magnum-domain.md (TODO-only placeholder).
Cross-references:
domain-setup action documentationMagnum needs a dedicated Keystone domain (magnum) and a service-trust user inside it. Magnum uses this domain to create per-cluster "trust" users at cluster-create time — those trust users are what cluster-internal services use to call back to OpenStack (e.g., OCCM, Cinder CSI). The magnum domain is conceptually a sandbox; the trust users have no privileges outside of it.
What this document does:
domain-setup on magnum/leader.magnum domain exists and is enabled.magnum_domain_admin (or charm-named equivalent) user exists in the magnum domain.What this document does NOT do:
capi-mgmt Keystone project / capo user / app credential — those live in admin_domain and are created in v1-do-doc-07 (CAPI bootstrap consumes them).| Decision | Choice | Notes |
|---|---|---|
| Trustee domain | magnum (separate from admin_domain) |
Charm default; per-cluster trust users go here |
| Trustee admin user name | Per charm — typically magnum_domain_admin |
Verified in §4.3 |
| Action invocation | juju run magnum/leader domain-setup --wait=10m |
Synchronous; 10-min timeout sufficient for testcloud |
| Verification | API-level (openstack domain show magnum, openstack user show ...) |
Direct charm-state inspection optional |
| Prereq | Verification | |
|---|---|---|
v1-do-doc-05-vault-init.md ✓ (Vault unsealed, all charms active/idle) |
juju status magnum shows active/idle |
|
| admin-openrc points at Caracal cloud and works | `( source $HOME/admin-openrc; openstack token issue ) | head -3` returns a token |
| Keystone reachable on its public VIP | Already confirmed by openstack token issue |
Shell context:
export REPO="$HOME/openstack-caracal-ipv4" cd "$REPO"
Confirm starting state:
echo "=== Magnum unit status ===" juju status magnum -m openstack echo "" echo "=== Domains currently in Keystone (before domain-setup) ===" ( source "$HOME/admin-openrc"; openstack domain list ) # Expect: at least 'default' and 'admin_domain'. 'magnum' should NOT appear yet # (unless this is a re-run, in which case it's already there — see §6 for re-run posture).
juju run magnum/leader domain-setup --wait=10m -m openstack
Expected output: the action returns within 1-3 minutes (well under the 10-min timeout). The result block should show status: completed and no error message.
echo "=== Action result inspection ==="
juju show-action-output --format yaml $(juju list-actions magnum -m openstack 2>/dev/null | tail -5 | awk '{print $1}' | head -1) 2>/dev/null || \
echo "(Use 'juju run --wait' synchronous mode — action result was visible in §4.1 output)"
Note on Juju 3.x action output: in Juju 3.x,
juju runreturns the action result synchronously to stdout. You don't generally need a follow-up query unless investigating a failure. If §4.1 output ended inRunning operation ... with 1 taskfollowed bydone, the action succeeded.
( source "$HOME/admin-openrc"
echo "=== magnum domain exists and is enabled ==="
openstack domain show magnum -f json | python3 -c "
import json, sys
d = json.load(sys.stdin)
print(f' name: {d.get(\"name\")}')
print(f' enabled: {d.get(\"enabled\")}')
print(f' id: {d.get(\"id\")}')
print(f' desc: {d.get(\"description\")}')
"
echo ""
echo "=== Users in magnum domain ==="
openstack user list --domain magnum
echo ""
echo "=== Projects in magnum domain (likely empty — trust projects are per-cluster) ==="
openstack project list --domain magnum
)
Expected:
magnum domain present, enabled: True.magnum_domain_admin (verify exact name in output).echo "=== Magnum unit status after domain-setup ===" juju status magnum -m openstack # Expect: magnum/0 still active/idle. The domain-setup action should not have moved it out of active. echo "" echo "=== Action history for magnum (last 5) ===" juju list-actions magnum -m openstack 2>/dev/null | tail -10
juju run magnum/leader domain-setup --wait=10m completed without erroropenstack domain show magnum returns enabled: Trueopenstack user list --domain magnum returns at least one user (the trustee admin)juju status magnum still shows magnum/0 in active/idleIf all checked, proceed to v1-do-doc-07-capi-bootstrap.md.
The domain-setup action is idempotent at the charm level — re-running it does not duplicate the domain or create extra users. The most common reason to re-run is if the charm was reconfigured or upgraded; the action re-ensures the domain state matches what the charm expects.
If §4.3 shows the magnum domain already exists from a prior run, the action will report completed with no work performed — that's the expected behavior.
| Aspect | Testcloud (v1) | Roosevelt |
|---|---|---|
| Domain name | magnum (charm default) |
Same |
| Trustee user creation | Charm action domain-setup |
Same — but Roosevelt may layer Vault PKI for trustee credentials |
| Action invocation | Manual juju run |
Can be wrapped in a deploy script with idempotency check |
| Verification depth | Domain + user check (this doc §4.3) | Plus Vault audit trail confirming the trustee was created with correct permissions |
| Date | Change | Reference |
|---|---|---|
| 2026-05-27 | Document created. Replaces placeholder runbook 04 (TODO-only). | Batch C drafting |