AppFwk: Corner case for platform managed apps when restarting sysinv during application apply

Bug #2008014 reported by Igor Pires Soares
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Igor Pires Soares

Bug Description

Brief Description
-----------------
This affects apps that request to be in uploaded state. If sysinv is restarted during an app re-apply it will no longer try to achieve 'applied' state and the status will remain 'uploaded'.

Severity
--------
<Critical: System/Feature is not usable after the defect>

Manual intervention needed.

Steps to Reproduce
-----------------
Apply an app that has "desired_state: uploaded" on its metadata.yaml, request an apply again, restart sysinv-conductor while status is 'applying'.

Expected Behavior
-----------------
We expect it will automatically become applied again since the last state was 'applied'

Actual Behavior
-----------------
App will be reset to 'uploaded' and will stay that way.

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

System Configuration
-----------------
Any

Last Pass
-----------------
Suspect never.

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

Alarms
-----------------
N/A

Test Activity
-----------------
Log + code analysis.

Workaround
-----------------
Manually apply app.

Changed in starlingx:
status: New → In Progress
Changed in starlingx:
assignee: nobody → Igor Pires Soares (ipiresso)
Ghada Khalil (gkhalil)
tags: added: stx.apps
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/874164
Committed: https://opendev.org/starlingx/config/commit/a26ff567761926f8c3c42811d89023c82ae96112
Submitter: "Zuul (22348)"
Branch: master

commit a26ff567761926f8c3c42811d89023c82ae96112
Author: Igor Soares <email address hidden>
Date: Thu Feb 16 15:24:39 2023 -0500

    Promote apps desired state on application apply

    Promote application desired state from "uploaded" to "applied" during
    application apply and demote during application removal.

    If the original application desired state is "uploaded" the
    corresponding application metadata field on the database is updated
    to "applied" during the apply operation. Correspondingly, the desired
    state is reinstated to "uploaded" during removal.

    This ensures that applications will remain applied across sysinv
    restarts, fixing a bug that caused apps to return to uploaded state
    if the conductor was restarted during a reapply operation.

    Test Plan:
    PASS: build-pkgs
    PASS: build-image
    PASS: AIO-SX full deployment
    PASS: upload/apply/remove/delete platform-integ-apps
    PASS: upload/apply/remove/delete snmp
    PASS: upload/apply/remove/delete cert-manager with "desired_state"
    metadata set as "uploaded"
    PASS: restart sysinv-conductor during cert-manager apply/reapply operations

    Closes-Bug: 2008014
    Signed-off-by: Igor Soares <email address hidden>
    Change-Id: I6b64d3d3983a0571014168124cd61416779d598f

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