Fail to check active controller on backup

Bug #1977547 reported by Adriano Oliveira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Adriano Oliveira

Bug Description

Brief Description
-----------------
Backup playbook failed on the task that checks if is the active controller:

TASK [backup/prepare-env : Check if it is the active controller]Thursday 02 June 2022 01:30:04 +0000 (0:00:00.018) 0:00:01.584 *********
fatal: [localhost]: FAILED! => changed=true

Severity
--------
Critical

Steps to Reproduce
------------------
Have a Starlingx installed with the max_cpu_config capability

Expected Behavior
-----------------
Backup should proceed successfully.

Actual Behavior
---------------
Backup fail in the above mentioned task.

Reproducibility
---------------
Reproducible

System Configuration
--------------------
AIO-SX

Branch/Pull Time/Commit
-----------------------
Starlingx master/2022-05-28_20-00-06

Last Pass
---------
Before max_cpu_capability introduced

Timestamp/Logs
--------------
TASK [backup/prepare-env : Check if it is the active controller]Thursday 02 June 2022 01:30:04 +0000 (0:00:00.018) 0:00:01.584 ********* fatal: [localhost]: FAILED! => changed=true

Test Activity
-------------
Other - executing backup and restore procedure for validation

Workaround
----------
Modify the playbook to search "Active" string (according to host-show output)

Changed in starlingx:
assignee: nobody → Adriano Oliveira (aoliveir)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/c/starlingx/ansible-playbooks/+/844620
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/82a34f131ef9667914f0d9ec8623111010ef3882
Submitter: "Zuul (22348)"
Branch: master

commit 82a34f131ef9667914f0d9ec8623111010ef3882
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"
    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

    Closes-bug: 1977547

    Signed-off-by: Adriano Oliveira <email address hidden>
    Change-Id: Iee5bd579558872f8e81624e208af37cd92037485

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.7.0 stx.update
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.