AppFwk: Auto update flag doesn't work for non platform managed apps

Bug #2009187 reported by Dan Voiculeasa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Dan Voiculeasa

Bug Description

Brief Description
-----------------
Take ptp for example which lacks platform_managed_app from metadata.yaml.

behavior:
  platform_managed_app: yes

When the new ptp version contains the auto update metadata it will not trigger the auto update after sysinv restart

upgrades:
  auto_update: true

Auto apply apps will not be called because it is gated by this lines:

https://opendev.org/starlingx/config/src/commit/67966ea4eb3ac5f5ee5ccc4941d5e41f9fe9ae1c/sysinv/sysinv/sysinv/sysinv/conductor/manager.py#L7052-L7054

We need to allow apps to be auto updated to newer versions, regardless if they are managed on not. This will enhance the patchback experience, allowing no manul intervention to update apps.

Severity
--------
Critical: Manual input needed on large systems.

Steps to Reproduce
------------------
Write down the steps to reproduce the issue

Expected Behavior
------------------
auto update apps.

Actual Behavior
----------------
Need manual intervention for updating apps.

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

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

Branch/Pull Time/Commit
-----------------------
3rd March 2023

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

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

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

Workaround
----------
manual update/ write a script for patches to detect and update.

Changed in starlingx:
assignee: nobody → Dan Voiculeasa (dvoicule)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

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

commit d8abc9e7ffac78ecbb7a862cb612fd2ec6671ad5
Author: Dan Voiculeasa <email address hidden>
Date: Fri Mar 3 14:45:55 2023 +0200

    AppFwk: Enable auto update for non platform managed apps

    We have a gap in design where we want apps to be auto updated if
    specific metadata is present in the app on the N+1 side. Metadata
    represented by [1].

    The gap in design is that the N version must also contain specific
    metadata to register the app as 'platform managed app'. Metadata
    represented by [2].

    Tests on AIO-SX:
    PASS: apply ptp-notification app in a patch, then restart sysinv
          observed the newer version of ptp-notification is auto-applied

    [1]: https://opendev.org/starlingx/app-security-profiles-operator/src/commit/31b3f77eeefdc0be4c9c1f53c4e72888313a8d0e/stx-security-profiles-operator-helm/stx-security-profiles-operator-helm/files/metadata.yaml#L6-L7
    [2]: https://opendev.org/starlingx/platform-armada-app/src/commit/4c765c35500da92d920d3fbf3c79b4cf02d4712b/stx-platform-helm/stx-platform-helm/files/metadata.yaml#L5-L6
    Closes-Bug: 2009187
    Signed-off-by: Dan Voiculeasa <email address hidden>
    Change-Id: Ia6f5646e78b8ed012e7dcb6ac7fa4c513f382bc2

Changed in starlingx:
status: In Progress → Fix Released
Frank Miller (sensfan22)
tags: added: stx.9.0 stx.apps
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/config/+/879532

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to config (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/config/+/879533

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on config (master)

Change abandoned by "Dan Voiculeasa <email address hidden>" on branch: master
Review: https://review.opendev.org/c/starlingx/config/+/879533
Reason: Title misleading, just possible optimization for speed depending on what is run on the system.
Can be revived later if the optimization makes sense.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

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

commit 2ed783970f6215a7de4f29f41ba74fcce9347a1f
Author: Dan Voiculeasa <email address hidden>
Date: Tue Apr 4 20:39:05 2023 +0300

    AppFwk: Remove log noise for external apps

    Each minute an audit will check for app updates. The location checked
    is a fixed read only location. There will be a log for external apps
    (stx-openstack) [1] repeating each minute:
      Failed to find an application tarball for <app_name>

    An external app is an app not bundled in the iso at
    /usr/local/share/applications/helm/.

    Disable this log for external apps.

    This is a follow-up to
    https://review.opendev.org/c/starlingx/config/+/876327

    Tests on AIO-SX:
    PASS: Deploy.
          platform-integ-apps is auto-applied
    PASS: Install external app.
          Before commit there was a false positive error log for
          external app.
          After commit there is no error log.
    PASS: Error log still present for bundled apps.
          (simulated by moving the one tarball)

    Closes-Bug: 2009187
    Signed-off-by: Dan Voiculeasa <email address hidden>
    Change-Id: I2d261e2032fa80103d65363f3a09f196107671af

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.