Multi-node MAAS validation command fails, controller name is hardcoded

Bug #2066412 reported by Chris Johnston
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
Fix Committed
High
Chi Wai CHAN

Bug Description

It appears as though the controller name used for copying validation results from tempest to the local machine uses a hardcoded controller name [1][2], which can fail on a mutli-node MAAS install which uses the provided `--name` + `-controller`.

$ sunbeam validation run refstack --output ./refstack-validation.log
Totals
======
Ran: 179 tests in 534.3792 sec.
 - Passed: 160
 - Skipped: 17
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 2
Sum of execute time for each test: 1073.1345 sec.
⠙ Copying /var/lib/tempest/workspace/tempest-validation.log from tempest (tempest) to ./refstack-validation.log ...ERROR controller sunbeam-controller not found
Error: Command '['juju', 'scp', '--model', 'sunbeam-controller:openstack', '--container', 'tempest', 'tempest/0:/var/lib/tempest/workspace/tempest-validation.log', './refstack-validation.log']' returned non-zero exit status
2.

$ juju list-controllers
Use --refresh option with this command to see the latest information.

Controller Model User Access Cloud/Region Models Nodes HA Version
sunbeam01-controller* - admin superuser sunbeam01/default 3 5 none 3.4.2

If I manually change [2] to use the correct name of the controller, the copy is successful.

[1] https://github.com/canonical/snap-openstack/blob/main/sunbeam-python/sunbeam/plugins/validation/plugin.py#L397
[2] https://github.com/canonical/snap-openstack/blob/main/sunbeam-python/sunbeam/jobs/juju.py#L49

Eric Chen (eric-chen)
tags: added: soleng-264
Changed in snap-openstack:
status: New → Triaged
tags: added: open-2189
Changed in snap-openstack:
importance: Undecided → High
Chi Wai CHAN (raychan96)
Changed in snap-openstack:
assignee: nobody → Chi Wai CHAN (raychan96)
status: Triaged → In Progress
Revision history for this message
Eric Chen (eric-chen) wrote :
Changed in snap-openstack:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.