Subcloud Backup operation failed - backup_user_local_registry and backup_registry_filesystem always set to TRUE

Bug #1989614 reported by Thiago Paiva Brito
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Thiago Paiva Brito

Bug Description

*+Brief Description+*

Subcloud backup operation failed, because of two variables backup_user_local_registry & backup_registry_filesystem is always set to TRUE, not work even if you provide override files.

I get following error when I execute subcloud backup:
{code:java}
dcmanager subcloud-backup create subcloud6
dcmanager subcloud-backup create --subcloud subcloud6 --backup-values test_overrides.yml

cat test_overrides.yml
backup_registry_filesystem: true
backup_user_local_registry: false

sudo cat /var/opt/dc/ansible/subcloud6_backup_values.yml
---
central_backup_dir: "/opt/dc-vault/backups"
backup_registry_filesystem: true
ansible_ssh_pass: "<password>"
backup_user_local_registry: false
admin_password: "<password>"
ansible_become_pass: "<password>"
local: false {code}
{code:java}
stdout: |2-

    PLAY [all] *********************************************************************

    TASK [backup/validate-input : Check if image backup options are defined and mutually exclusive] ***
    Tuesday 13 September 2022 20:53:45 +0000 (0:00:00.066) 0:00:00.066 *****
    fatal: [localhost]: FAILED! =>
      msg: |-
        The conditional check 'backup_user_local_registry is defined and backup_registry_filesystem is defined and backup_user_local_registry|bool is true and backup_registry_filesystem|bool is true
        ' failed. The error was: template error while templating string: no test named 'true'. String: {% if backup_user_local_registry is defined and backup_registry_filesystem is defined and backup_user_local_registry|bool is true and backup_registry_filesystem|bool is true
         %} True {% else %} False {% endif %}

        The error appears to have been in '/usr/share/ansible/stx-ansible/playbooks/roles/backup/validate-input/tasks/main.yml': line 8, column 3, but may
        be elsewhere in the file depending on the exact syntax problem.
{code}
*+Severity+*

Provide the severity of the defect.

Critical: Unable to backup subcloud

*+Steps to Reproduce+*

dcmanager subcloud-backup create subcloud6

*+Expected Behavior+*

Backup operation successful
*+Actual Behavior+*

Backup operation failed
*+Reproducibility+*

Reproducible

*+System Configuration+*

DC system with subcloud

*+Load info (eg: 2022-03-10_20-00-07)+*

DEV LOAD

*+Last Pass+*

New feature

*+Timestamp/Logs+*

*+Alarms+*
{code:java}
dcmanager subcloud list
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+
| id | name | management | availability | deploy status | sync | backup status | backup datetime |
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+
| 1 | subcloud6 | managed | online | complete | in-sync | failed | None |
| 2 | subcloud8 | managed | online | complete | in-sync | None | None |
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+
[sysadmin@controller-0 ~(keystone_admin)]$ fm alarm-list
+----------+-------------------------------------------------------------------+--------------------+----------+--------------+
| Alarm ID | Reason Text | Entity ID | Severity | Time Stamp |
+----------+-------------------------------------------------------------------+--------------------+----------+--------------+
| 280.003 | Subcloud Backup Failure (subcloud=subcloud6) | subcloud=subcloud6 | minor | 2022-09-13T2 |
| | | | | 1:55:17. |
| | | | | 022415 |
| | | | | |
| 200.006 | compute-0 'sm-eru' process has failed. Auto recovery in progress. | host=compute-0. | minor | 2022-09-13T1 |
| | | process=sm-eru | | 7:32:48. |
| | | | | 075530 |
| | | | | |
+----------+-------------------------------------------------------------------+--------------------+----------+--------------+
{code}
*+Test Activity+*

Feature Testing

*+Workaround+*

No workaround

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)
Changed in starlingx:
status: New → In Progress
Changed in starlingx:
assignee: nobody → Thiago Paiva Brito (outbrito)
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/+/857764
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/f24c6a479b2a5062d4912a2021ae519936ada64d
Submitter: "Zuul (22348)"
Branch: master

commit f24c6a479b2a5062d4912a2021ae519936ada64d
Author: Thiago Brito <email address hidden>
Date: Wed Sep 14 17:05:37 2022 -0300

    CentOS: Fix template error on check backup options

    Fixing the template error while templating string: no test named 'true'
    when running the new "Check if image backup options are defined and
    mutually exclusive" task on CentOS.

    TEST PLAN
    PASS validated on CentOS
    PASS validated on Debian

    Closes-Bug: 1989614
    Signed-off-by: Thiago Brito <email address hidden>
    Change-Id: Id02d9f3196647750d5838b14a84af1a65c60cab6

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