Prestage playbook failed due to non-release type directories in /opt/platform-backup

Bug #2024492 reported by Li Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
In Progress
Undecided
Unassigned

Bug Description

Brief Description
-----------------
The prestage playbook failed in cleanup task because there's a 'lost+found' directory in /opt/platform-backup. Manually removing /opt/platform-backup/lost+found fixes the issue. However, we may need to account for this, because lost+found can get created by fsck: https://www.baeldung.com/linux/lost-found-directory, Non-release type directories have to be filtered out in cleanup task.

Severity
--------
Minor

Steps to Reproduce
------------------
Create a non-release type of directory under /opt/platform-backup, and then running prestage.

Expected Behavior
------------------
Prestage succeeds

Actual Behavior
----------------
Prestage failed in cleanup task

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

System Configuration
--------------------
DC

Branch/Pull Time/Commit
-----------------------
22.12 + commits from feature - "Subcloud install or restore of previous release - 22.12"

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

Timestamp/Logs
--------------
TASK [prestage/prepare-env : Clean up old release(s) (lower than 21.12) prestage data] ***
Wednesday 14 June 2023 12:30:11 +0000 (0:00:00.752) 0:00:09.963 ********
fatal: [subcloud6]: FAILED! =>
  msg: |-
    The conditional check 'item.path.split('/')[-1] is version(minimum_supported_release_version_for_prestage, "<")' failed. The error was: Version comparison: '<' not supported between instances of 'str' and 'int'

    The error appears to be in '/usr/share/ansible/stx-ansible/playbooks/roles/prestage/prepare-env/tasks/cleanup_prestage_dir.yml': line 90, column 3, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

    - name: Clean up old release(s) (lower than {{ minimum_supported_release_version_for_prestage }}) prestage data
      ^ here
    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
----------
Manually removing the non-release type of directories from /opt/platform-backup.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)
Changed in starlingx:
status: New → In Progress
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.