AppFwk: Corner case for platform managed apps when restarting sysinv during application apply
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) |
tags: | added: stx.apps |
Changed in starlingx: | |
importance: | Undecided → Medium |
tags: | added: stx.9.0 |
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/874164 /opendev. org/starlingx/ config/ commit/ a26ff567761926f 8c3c42811d89023 c82ae96112
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit a26ff567761926f 8c3c42811d89023 c82ae96112
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: apply/remove/ delete platform-integ-apps apply/remove/ delete snmp apply/remove/ delete cert-manager with "desired_state"
PASS: build-pkgs
PASS: build-image
PASS: AIO-SX full deployment
PASS: upload/
PASS: upload/
PASS: upload/
metadata set as "uploaded"
PASS: restart sysinv-conductor during cert-manager apply/reapply operations
Closes-Bug: 2008014 71014168124cd61 416779d598f
Signed-off-by: Igor Soares <email address hidden>
Change-Id: I6b64d3d3983a05