Subcloud collect fails if login prompt is the subcloud name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Shrikumar Sharma |
Bug Description
Brief Description
-------------------
collect uses the subcloud name to login but expects 'controller-0' as the login prompt.
The subcloud login prompt starts out as the subcloud name (say subcloud6) but switches to controller-0 late in the bootstrapping stage.
So if the subcloud bootstrapping stage fails and the login prompt never changes to controller-0 then collect from that subcloud will fail.
Severity:
-------------------
Major - collect is important in failure modes
Steps to Reproduce
-------------------
Set subcloud login prompt to the subcloud name and run collect -sc <subcloud name>
Expected Behavior
-------------------
collect from subcloud succeeds
Actual Behavior
-------------------
collect from subcloud fails
Reproducibility
-------------------
100% reproducible if the subcloud login prompt is not controller-0
System Configuration
-------------------
DC system
Branch/Pull Time/Commit
-------------------
Any with subcloud collect feature
Last Pass
-------------------
Test escape
Timestamp/Logs
-------------------
collect from subcloud fails
Alarms
------
Please indicate if there are any alarms observed.
If there are any alarms please list them here
Test Activity
-------------
Developer Testing
Workaround
-------------
Log into subcloud manually and run collect from there.
Changed in starlingx: | |
status: | New → In Progress |
tags: | added: stx.distcloud stx.tools |
Changed in starlingx: | |
importance: | Undecided → Low |
Reviewed: https:/ /review. opendev. org/c/starlingx /utilities/ +/815749 /opendev. org/starlingx/ utilities/ commit/ f12e28755de94c1 8e7a7d8eef9ef5b f24afe6afd
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit f12e28755de94c1 8e7a7d8eef9ef5b f24afe6afd
Author: Shrikumar Sharma <email address hidden>
Date: Wed Oct 27 16:46:59 2021 -0400
Fix collect to use the subcloud name also
The collect script uses the standard prompt with the
substring "controller-" within expect, when running
"collect -sc ${subcloud}".
When a subcloud is properly provisioned and configured
the active controller's login prompt is 'controller-0'
or 1.
However, if the subcloud bootstrapping stage fails and
the login prompt never changes to controller-# (like
controller-0, controller-1, etc) then collect from
that subcloud will fail.
Test Plan:
PASS: Verify single subcloud collect
PASS: Verify that collect works after manually modifying
PS1 on the subcloud.
PASS: Verify named subcloud collect (-sc -a -n <name>)
PASS: Verify collect from all subclouds
PASS: Verify Collect list of hosts
PASS: Verify collect from all hosts in the system
PASS: Verify subcloud and subclouds clean
PASS: Verify local host and hosts clean
Closes-Bug: 1948992 15f003ff4924299 b58513bc57f
Change-Id: I20523bce76bc3c
Signed-off-by: Shrikumar Sharma <email address hidden>