The current backup ansible code is using the raw "system host-show"
output to grep by "Controller-Active", however, this output is
formatted in a given way that it is prone to have line breaks.
As the field containing this info is open to have other infos, and,
recently, the max_cpu_config was added, this caused a line break in
the output (the field is the "capabilities").
Therefore, as this info is not in the database, since it is added
"on-the-fly" by sysinv, and the system command has the option
to format the output differently, using: "--column capabilities
--format value", the current logic can be kept since the output
comes as a whole string with the field value.
Test Plan:
PASS: Perform backup & restore on AIO-SX successfully
Reviewed: https:/ /review. opendev. org/c/starlingx /ansible- playbooks/ +/844620 /opendev. org/starlingx/ ansible- playbooks/ commit/ 82a34f131ef9667 914f0d9ec862311 1010ef3882
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 82a34f131ef9667 914f0d9ec862311 1010ef3882
Author: Adriano Oliveira <email address hidden>
Date: Fri Jun 3 12:22:43 2022 -0400
Fix active controller check on backup
The current backup ansible code is using the raw "system host-show" Active" , however, this output is
output to grep by "Controller-
formatted in a given way that it is prone to have line breaks.
As the field containing this info is open to have other infos, and,
recently, the max_cpu_config was added, this caused a line break in
the output (the field is the "capabilities").
Therefore, as this info is not in the database, since it is added
"on-the-fly" by sysinv, and the system command has the option
to format the output differently, using: "--column capabilities
--format value", the current logic can be kept since the output
comes as a whole string with the field value.
Test Plan:
PASS: Perform backup & restore on AIO-SX successfully
Closes-bug: 1977547
Signed-off-by: Adriano Oliveira <email address hidden> f8e81624e208af3 7cd92037485
Change-Id: Iee5bd579558872