Delete process to apps that have charts disabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
David Barbosa Bastos |
Bug Description
Brief Description
-----------------
When deleting an application that has one chart or more disabled, the app framework was not able to correctly delete the disabled charts from the helm repository.
If, after deleting an app, an attempt was made to upload that same app, a failure would occur, informing that the charts were already in the helm repository.
Severity
--------
Minor
Steps to Reproduce
------------------
1 - system application-upload <path>/
2 - system application-delete dell-storage.tgz
3 - system application-upload <path>/
Expected Behavior
------------------
Deletes an app that has charts disabled and all charts are deleted from the helm repository correctly. After deleting and trying to upload the same app, no error occurs and the upload and apply process is completed successfully
Actual Behavior
----------------
The upload process fails
Reproducibility
---------------
100% reproducible
System Configuration
-------
AIO-SX
Branch/Pull Time/Commit
-------
SW_VERSION="23.09"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID=
SRC_BUILD_ID="1535"
Last Pass
---------
n/a
Timestamp/Logs
--------------
sysinv.log:
sysinv 2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
2023-11-29 10:32:46.633 56272 ERROR sysinv.
sysinv 2023-11-29 10:32:46.644 56454 WARNING wsme.api [req-a066af66-
Test Activity
-------------
[Sanity, Feature Testing]
Workaround
----------
Manually delete disabled charts from helm repository
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
importance: | Undecided → Low |
tags: | added: stx.10.0 stx.apps stx.config |
Changed in starlingx: | |
assignee: | nobody → David Barbosa Bastos (dbarbosa-wr) |
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/910680 /opendev. org/starlingx/ config/ commit/ c9b71ebd65c698f f8fa6fb28b477a8 4c823b8203
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit c9b71ebd65c698f f8fa6fb28b477a8 4c823b8203
Author: David Bastos <email address hidden>
Date: Thu Feb 29 21:42:30 2024 -0300
Fix delete process to apps that have charts disabled
When deleting an application that has one chart or more disabled,
the app framework was not able to correctly delete the disabled
charts from the helm repository.
If, after deleting an app, an attempt was made to upload that same
app, a failure would occur, informing that the charts were already
in the helm repository.
The correction consists of using the kustomization- orig.yaml file
instead of kustomization.yaml in the deletion process to list the
enabled and disabled charts.
Another fix was made in case an application has the status of tarball_ path
"upload failed" and an attempt is made to delete another app. This
caused a Python runtime error because the get_chart_
function tried to access the dictionary key and it wasn't there.
The solution was to check if the key for that chart exists and only
then try to access it. New logs are added to alert the user if the
chart does not exist.
Test Plan:
successfully .
PASS: Build-pkgs
PASS: Upload, apply, remove and delete dell-storage
PASS: Upload, apply, remove and delete oidc-auth-apps
PASS: upload, apply, remove and delete metrics-server
PASS: Deletes app that has charts disabled and all charts are
deleted from the helm repository correctly.
PASS: After deleting and trying to upload the same app, no error
occurs and the upload and apply process is completed
PASS: Deleting an app with another app with "upload failed"
status and no Python runtime error occurs
Closes-Bug: 2055697
Change-Id: I22de414e8780fe 3691d06bdd015e4 c927dcc10f0
Signed-off-by: David Bastos <email address hidden>