Debian: B&R: Home directory not being backed up

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

Bug Description

Brief Description
-----------------
Doing a backup of a 22.06 Debian AIO-SX and attempting the restore (with some workarounds)
it is determined that the 'home' directory is not being backed up.

Severity
--------
Minor

Steps to Reproduce
------------------
Install AIO-SX Debian (unlocked)
Perform a backup
ansible-playbook /usr/share/ansible/stx-ansible/playbooks/backup.yml -e "ansible_become_pass=<PASSWORD> admin_password=<PASSWORD>" -e "backup_user_local_registry=true"

Examine the contents of the backed up file, and note that the 'home' directory is just a symlink to /var/home and not the contents

Expected Behavior
------------------
The home directory contents should be backed up.
This is required for a restore to work

Actual Behavior
----------------
home directory is not backed up, therefore it cannot be restored

Reproducibility
---------------
100% (but only when other blockers are fixed. There are several other Debian B&R issues being resolved)

System Configuration
--------------------
Debian AIO-SX

Branch/Pull Time/Commit
-----------------------
July 3, 2022

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

Timestamp/Logs
--------------

2022-07-07 01:41:44,997 p=5242 u=sysadmin n=ansible | fatal: [localhost]: FAILED! => changed=true
  cmd: tar -C / --overwrite --wildcards -xpf /scratch/localhost_platform_backup_2022_07_03_14_46_51.tgz 'home/*'
  delta: '0:00:01.192716'
  end: '2022-07-07 01:41:44.963375'
  msg: non-zero return code
  rc: 2
  start: '2022-07-07 01:41:43.770659'
  stderr: |-
    tar: home/*: Not found in archive
    tar: Exiting with failure status due to previous errors
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

Test Activity
-------------
Developer Testing

Workaround
----------
There is none. Backup needs to include this data.
We 'might' support a scenario where restore just skips if no home directory is found, but we will still want to fix this backup issue.

Al Bailey (albailey1974)
Changed in starlingx:
assignee: nobody → Al Bailey (albailey1974)
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/+/850076
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/83db92c9408707c34addf93a81a01a828db25dbb
Submitter: "Zuul (22348)"
Branch: master

commit 83db92c9408707c34addf93a81a01a828db25dbb
Author: Al Bailey <email address hidden>
Date: Thu Jul 14 16:53:02 2022 +0000

    Debian: Backup and Restore fixes for home dir

    On Debian /home is a symlink to /var/home

    The following items are now fixed on Debian:
     - disk usage of /home would have always returned zero.
     - The backup of the /home directory would have only
    included a symlink, and none of the contents.
     - The restore would have failed due to not finding a
    valid /home subdirectory from a Debian backup.
     - The restore can now detect /var/home and extract it
    if it exists, otherwise extracting /home (ie: CentOS)

    Test Plan:
     PASS: Backup(Centos) / Restore(CentOS)
     PASS: Backup(Debian) / Restore(Debian)

    Closes-Bug: #1980980
    Signed-off-by: Al Bailey <email address hidden>
    Change-Id: I564c05822483f2b3fcd9f20320b0445a97d7f399

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