B&R: Error trying to find files using wildcards

Bug #1980162 reported by Hugo Nicodemos Brito
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Hugo Nicodemos Brito

Bug Description

Brief Description
-----------------
Some tasks use wildcards to extract files when performing the restore-platform playbook but without the --wildcards parameter the command break.

Severity
--------
<Minor: System/Feature is usable with minor issue>

Steps to Reproduce
------------------
Run restore-platform playbook

Expected Behavior
------------------
restore-platform playbook runs completely.

Actual Behavior
----------------
restore-platform breaks not finding the archive with wildcards in command.

Reproducibility
---------------
<Reproducible>
100% reproducible

System Configuration
--------------------
<One node system, Two node system, Multi-node system, Dedicated storage, https, IPv4, IPv6 etc.>

Branch/Pull Time/Commit
-----------------------
Master

Last Pass
---------
N/A

Timestamp/Logs
--------------
TASK [bootstrap/apply-manifest : Prefetch all hieradata] ******************************************************************************************************************************************************
Tuesday 28 June 2022 10:08:50 +0000 (0:00:00.019) 0:00:53.973 **********
fatal: [localhost]: FAILED! => changed=true
  cmd:
  - tar
  - -C
  - /tmp/hieradata
  - -xpf
  - /scratch/localhost_platform_backup_2022_06_28_10_48_58.tgz
  - --transform=s,.*/,,
  - opt/platform/puppet/22.06/hieradata/*.yaml
  delta: '0:00:00.111843'
  end: '2022-06-28 10:08:50.581397'
  msg: non-zero return code
  rc: 2
  start: '2022-06-28 10:08:50.469554'
  stderr: |-
    tar: Pattern matching characters used in file names
    tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
    tar: opt/platform/puppet/22.06/hieradata/*.yaml: Not found in archive
    tar: Exiting with failure status due to previous errors
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

Test Activity
-------------
Backup and Restore

Workaround
----------
N/A

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

commit 69031610207bf3bb8ee099df92a73ee9928bbeb6
Author: Hugo Brito <email address hidden>
Date: Tue Jun 28 20:59:03 2022 -0300

    B&R: Add wildcards parameter on tar commands

    The restore-platform playbook extracts some files using
    pattern matching characters in the file names, on centOS
    the command work as it is, but on Debian is necessary to
    use the --wildcards option to enable the pattern matching,
    or it will raise an exception (see bug). Adding the option
    has no effect on the behavior in centOS.

    Test Plan:
    PASS: Perform platform restore Debian
    PASS: Perform platform restore CentOS

    Closes-bug: 1980162

    Signed-off-by: Hugo Brito <email address hidden>
    Change-Id: Ifb58053d342d0a0c60c233659f579590ac6d2dc9

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