The prepare_prestage_packages playbook needs to force fail after executing cleanup task

Bug #1962669 reported by Tee Ngo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Tee Ngo

Bug Description

Brief Description
-----------------
A task to force fail after performing cleanup in rescue block was omitted in the commit https://review.opendev.org/c/starlingx/ansible-playbooks/+/831208. As a result, the caller (dcmanager) incorrectly proceeds to the next phase of prestage.

Severity
--------
Major

Steps to Reproduce
------------------
Induce a failure in prestage-preparation step by setting up prestage for upgrade environment without the required package feed directory.

Perform subcloud prestage by running the command: dcmanager subcloud prestage

Expected Behavior
------------------
The prepare-prestage-packages.sh script would fail due to missing release feed causing the prepare_prestage_packages.yml playbook to fail which in turn would cause dcmanager to fail the subcloud prestage operation.

Actual Behavior
----------------
The playbook failed and correct error messages were logged as expected. However, the return code was 0 (success) which caused dcmanager to proceed to the next phase and eventually fail for a different reason.

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

System Configuration
--------------------
Distributed Cloud

Branch/Pull Time/Commit
-----------------------
March 1, 2022 master load

Last Pass
---------
First time testing this error case with dcmanager

Timestamp/Logs
--------------
N/A

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

Workaround
----------
None

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

commit e849974678fc28c10414e3e57e14240b6bae3665
Author: Tee Ngo <email address hidden>
Date: Tue Mar 1 22:52:16 2022 -0500

    Force playbook to fail after cleanup in rescue block

    Add a task to fail the play after performing cleanup in
    rescue block. It was omitted from the previous commit
    (d4662e539b068459a807514745ef2e9e6be6615b). This code flaw
    caused the caller of the playbook (dcmanager) to erroneously
    proceed to the next phase of prestage and eventually fail at
    a different location.

    Test Plan:
      1. Induce a failure in prestage-prepare step by temporarily
         renaming the release feed directory.
      2. Execute the prepare_prestage_packages.yml playbook manually.
         Verify that the playbook fails with non-zero return code.
      3. Execute dcmanager subcloud prestage command and verify that
         dcmanager fails the prestage operation during prestage-prepare
         step, not during preparing-packages step.

    Closes-Bug: 1962669
    Change-Id: Iaf06bb3228cdbe2e0e2118d20765919fcf6a8aa2
    Signed-off-by: Tee Ngo <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Tee Ngo (teewrs)
importance: Undecided → Medium
tags: added: stx.7.0 stx.distcloud
Revision history for this message
Ghada Khalil (gkhalil) wrote :

screening: stx.7.0 / medium - related to new feature development: https://storyboard.openstack.org/#!/story/2009799

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.