Backups taken after Sept 15 are failing to be restored

Bug #1990171 reported by Al Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Al Bailey

Bug Description

Brief Description
-----------------
When invoking the 'backup' operation of a backup/restore after Sept 15, it no longer
contains /opt/platform/config/<ver>/resolv.conf and causes the restore to fail

Severity
--------
Minor

Steps to Reproduce
------------------
Boot an AIO-SX load that is built with code merged after Sept 15, 2022
namely this commit
https://review.opendev.org/c/starlingx/config/+/856562

Run a backup
ansible-playbook -v /usr/share/ansible/stx-ansible/playbooks/backup.yml -e "backup_registry_filesystem=true"

Boot the fresh ISO, and attempt a restore

ansible-playbook /usr/share/ansible/stx-ansible/playbooks/restore_platform.yml -vvv \
-e "initial_backup_dir=/home/sysadmin" \
-e "backup_filename=localhost_platform_backup.tgz" \
-e "registry_backup_filename=localhost_image_registry_backup.tgz"

Expected Behavior
------------------
It should succeed

Actual Behavior
----------------
It fails with a resolv.conf error

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

System Configuration
--------------------
AIO-SX (Debian)

Branch/Pull Time/Commit
-----------------------
Sept 18, 2022

Last Pass
---------
Sept 14, 2022

Timestamp/Logs
--------------
TASK [restore-platform/restore-more-data : Restore resolv.conf in config permdir (/opt/platform/config/...)] ********************************************************
Sunday 18 September 2022 18:19:24 +0000 (0:00:00.702) 0:32:42.299 ******
fatal: [localhost]: FAILED! => changed=true
  cmd:
  - tar
  - -C
  - /opt/platform/config/22.12
  - -xpf
  - /opt/platform-backup/localhost_platform_backup.tgz
  - --overwrite
  - --transform=s,.*/,,
  - opt/platform/config/22.12/resolv.conf
  delta: '0:00:00.153427'
  end: '2022-09-18 18:19:25.312428'
  msg: non-zero return code
  rc: 2
  start: '2022-09-18 18:19:25.159001'
  stderr: |-
    tar: opt/platform/config/22.12/resolv.conf: Not found in archive
    tar: Exiting with failure status due to previous errors
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

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

Workaround
----------
None. The file no longer exists at that location.
The restore code needs to remove the requirement of restoring that file, since it is no longer used

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/+/858406
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/514858c870caeaa7ad518839bbac3aac262293c0
Submitter: "Zuul (22348)"
Branch: master

commit 514858c870caeaa7ad518839bbac3aac262293c0
Author: Al Bailey <email address hidden>
Date: Mon Sep 19 15:49:06 2022 +0000

    Fix platform restore to handle missing resolv.conf

    The resolv.conf file is no longer written to:
     /opt/platform/config/<ver>/resolv.conf

    It was removed from that location by:
    https://review.opendev.org/c/starlingx/config/+/856562

    Any backup taken after that commit merged will not
    contain the resolv.conf in that location, and any restore
    would fail.

    The resolv.conf is no longer needed at that location,
    so updating the restore code to no longer try to restore it
    from there.

    Test Plan:
      PASS - Perform a Backup / Restore of AIO-SX Debian

    Closes-Bug: #1990171

    Signed-off-by: Al Bailey <email address hidden>
    Change-Id: Id9a091d9b8d2e5e3422f8483e7dff15833efdcaa

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