Failed to run backup ansible-playbook on subcloud

Bug #1905664 reported by Sunjae Kim
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Unassigned

Bug Description

Brief Description
-----------------
Backing up on subcloud fails with following log:

$ ansible-playbook /usr/share/ansible/stx-ansible/playbooks/backup.yml -e "ansible_become_pass=XXX admin_password=XXX"

~~ snipped~~
2020-11-26 11:56:45,674 p=3980323 u=sysadmin | TASK [backup/backup-system : Backup ldap db] **********************************************************************************************************************************************************
2020-11-26 11:56:45,834 p=3980323 u=sysadmin | fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["slapcat", "-d", "0", "-F", "/etc/openldap/schema", "-l", "/opt/backups/ansible.inJSvM/ldap/ldap.db"], "delta": "0:00:00.018562", "end": "2020-11-26 11:56:45.816511", "msg": "non-zero return code", "rc": 1, "start": "2020-11-26 11:56:45.797949", "stderr": "slapcat: bad configuration directory!", "stderr_lines": ["slapcat: bad configuration directory!"], "stdout": "", "stdout_lines": []}
2020-11-26 11:56:45,841 p=3980323 u=sysadmin | TASK [backup/backup-system : Remove the temp dir] *****************************************************************************************************************************************************
2020-11-26 11:56:45,988 p=3980323 u=sysadmin | changed: [localhost]
2020-11-26 11:56:45,993 p=3980323 u=sysadmin | TASK [backup/backup-system : Remove the backup in progress flag file] *********************************************************************************************************************************
2020-11-26 11:56:46,133 p=3980323 u=sysadmin | changed: [localhost]
2020-11-26 11:56:46,138 p=3980323 u=sysadmin | TASK [backup/backup-system : Clear backup_in_progress alarm] ******************************************************************************************************************************************
2020-11-26 11:56:46,251 p=3980323 u=sysadmin | changed: [localhost]
2020-11-26 11:56:46,256 p=3980323 u=sysadmin | TASK [backup/backup-system : Fail if alarm script throws an exception] ********************************************************************************************************************************
2020-11-26 11:56:46,270 p=3980323 u=sysadmin | PLAY RECAP ********************************************************************************************************************************************************************************************
2020-11-26 11:56:46,271 p=3980323 u=sysadmin | localhost : ok=38 changed=27 unreachable=0 failed=1

---

ldap db back up fails because of none config ldif file.
$ sudo slapcat -d 1 -F /etc/openldap/schema -l ~/ldap.db
Password:
5fbf3501 slapcat init: initiated tool.
5fbf3501 slap_sasl_init: initialized!
5fbf3501 bdb_back_initialize: initialize BDB backend
5fbf3501 bdb_back_initialize: Berkeley DB 5.3.21: (May 11, 2012)
5fbf3501 hdb_back_initialize: initialize HDB backend
5fbf3501 hdb_back_initialize: Berkeley DB 5.3.21: (May 11, 2012)
5fbf3501 mdb_back_initialize: initialize MDB backend
5fbf3501 mdb_back_initialize: LMDB 0.9.18: (February 5, 2016)
5fbf3501 backend_startup_one: starting "cn=config"
5fbf3501 ldif_read_file: no entry file "/etc/openldap/schema/cn=config.ldif"
5fbf3501 send_ldap_result: conn=-1 op=0 p=0
slapcat: bad configuration directory!

Severity
--------
Minor

Steps to Reproduce
------------------
1. Run "ansible-playbook /usr/share/ansible/stx-ansible/playbooks/backup.yml -e "ansible_become_pass=XXX admin_password=XXX" ON an controller on sub-cloud

Expected Behavior
------------------
Completed backing up without any failures

Actual Behavior
----------------
Failed on "Backup ldap db" task and not generated backup tar file

Reproducibility
---------------
100% reproducible

System Configuration
--------------------
Distributed Cloud
-. Central Could - AIO duplex
-. Sub Cloud - Standard with dedicated storages

Branch/Pull Time/Commit
-----------------------
StarlingX r4.0.1

Last Pass
---------
N/A, I have not tried to backup before.

Timestamp/Logs
--------------
2020-11-26 11:56:45,834 p=3980323 u=sysadmin | fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["slapcat", "-d", "0", "-F", "/etc/openldap/schema", "-l", "/opt/backups/ansible.inJSvM/ldap/ldap.db"], "delta": "0:00:00.018562", "end": "2020-11-26 11:56:45.816511", "msg": "non-zero return code", "rc": 1, "start": "2020-11-26 11:56:45.797949", "stderr": "slapcat: bad configuration directory!", "stderr_lines": ["slapcat: bad configuration directory!"], "stdout": "", "stdout_lines": []}

Test Activity
-------------
Feature Testing

Workaround
----------
No Idea but I think LDAP runs on not sub-cloud but central cloud so ldap db back up should be executed only on central cloud if the system is configured as distributed cloud.

Revision history for this message
Sunjae Kim (sunjae-kim) wrote :
Sunjae Kim (sunjae-kim)
information type: Public → Public Security
information type: Public Security → Public
Ghada Khalil (gkhalil)
tags: added: stx.distcloud stx.update
Revision history for this message
Ghada Khalil (gkhalil) wrote :

screening: marking as low priority due to lack of activity

Changed in starlingx:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
John Kung (john-kung) wrote :
Changed in starlingx:
status: Triaged → Fix Released
tags: added: stx.9.0
tags: added: stx.8.0
removed: stx.9.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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