Restore backup failing due to regex not properly scaped
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Thiago Paiva Brito |
Bug Description
Brief Description
-----------------
After the merge of [1], the restore playbook fails with a message saying "We could be wrong, but this one looks like it might be an issue with missing quotes" at either L243 or L265. This is due to backslash not properly scaped for yaml syntax.
[1]https:/
Severity
--------
Critical: System/Feature is not usable due to the defect
Steps to Reproduce
------------------
Run the restore playbook with a valid backup archive
Expected Behavior
------------------
Restore playbook fails at either "Check if there is openldap (CentOS) configuration on backup" or "Check if there is ldap configuration on backup"
Actual Behavior
----------------
Restore playbook executes to the end
Reproducibility
---------------
3/3
System Configuration
-------
All systems
Branch/Pull Time/Commit
-------
2022-08-03
Last Pass
---------
2022-08-02
Timestamp/Logs
--------------
2022-08-02 18:51:54,512 p=10813 u=sysadmin | ERROR! Syntax Error while loading YAML.
found unknown escape character
The error appears to have been in '/usr/share/
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Check if there is openldap (CentOS) configuration on backup
shell: "tar -tf {{ restore_data_file }} | grep -E 'etc\/openldap\
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
Test Activity
-------------
Feature Testing
Workaround
----------
Change the playbook and re-run backup
Changed in starlingx: | |
assignee: | nobody → Thiago Paiva Brito (outbrito) |
Changed in starlingx: | |
importance: | Undecided → Medium |
tags: | added: stx.8.0 stx.update |
Fix proposed to branch: master /review. opendev. org/c/starlingx /ansible- playbooks/ +/852020
Review: https:/