upgrade scripts are not invoked in expected order

Bug #1887985 reported by Andy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Adriano Oliveira

Bug Description

Brief Description
-----------------
A upgrade scripts with prefix "1xx" will be invoked before a scripts with prefix "2x".
For example:
115-exempt-admin-from-lockout.sh

will be invoked before:
25-coredns-configmap.sh
50-dcmanager-subcloud-status-migration.py
60-k8s-app-upgrade.sh
80-dc-cert-upgrade.py
95-apply-mandatory-psp-policies.py

Looks like the sorting is based on only the first digit.

Severity
--------
Minor

Steps to Reproduce
------------------
Add a upgrade script in controllerconfig packages, with prefix "1xx" (e.g, 115-exempt-admin-from-lockout.sh)

Do stx 4.0 to 5.0 upgrade

Check /var/log/platform.log.

Expected Behavior
------------------
The script with prefix "1xx" should be invoked after these with prefix "xx" where the first "x" is greater than 1.

Actual Behavior
----------------
The script with prefix "1xx' is invoked before these with prefix "xx" where the first "x" is greater than 1.

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

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

Branch/Pull Time/Commit
-----------------------
stx master

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

Timestamp/Logs
--------------
2020-07-17T01:39:52.000 controller-0 root: info 115-exempt-admin-from-lockout.sh: Setting ignore_lockout_failure_attempts o ption for admin to exempt it from fail auth lockout.
2020-07-17T01:39:58.000 controller-0 root: info 115-exempt-admin-from-lockout.sh: Set ignore_lockout_failure_attempts optio n for user admin: {"user": {"name": "admin", "links": {"self": "http://192.168.121.2:5000/v3/users/9a6154b9f59f4f92b0e1d52e 491033fb"}, "extra": {"email": "admin@localhost"}, "domain_id": "default", "enabled": true, "options": {"ignore_lockout_fai lure_attempts": true}, "id": "9a6154b9f59f4f92b0e1d52e491033fb", "email": "admin@localhost", "password_expires_at": null}}
2020-07-17T01:39:59.000 controller-0 root: info 25-coredns-configmap.sh: Migrating FROM release 20.04
2020-07-17T01:40:01.000 controller-0 root: info 60-k8s-app-upgrade.sh: Starting Kubernetes application updates from release 20.04 to 20.06 with action activate
2020-07-17T01:40:13.000 controller-0 root: info 60-k8s-app-upgrade.sh: Found application cert-manager, version 20.06-5 at / usr/local/share/applications/helm/cert-manager-20.06-5.tgz
2020-07-17T01:40:13.000 controller-0 root: info 60-k8s-app-upgrade.sh: cert-manager is a supported platform application.
2020-07-17T01:40:19.000 controller-0 root: info 60-k8s-app-upgrade.sh: cert-manager, version 1.0-0, is currently in the sta te: applied
2020-07-17T01:40:19.000 controller-0 root: info 60-k8s-app-upgrade.sh: Updating cert-manager, from version 1.0-0 to version 20.06-5 from /usr/local/share/applications/helm/cert-manager-20.06-5.tgz

Test Activity
-------------
Developer testing.

Workaround
----------
N/A

Ghada Khalil (gkhalil)
tags: added: stx.update
Revision history for this message
Frank Miller (sensfan22) wrote :

Marking stx.5.0 gating. Upgrades testing during development was successful but this issue should be addressed in stx.5.0.

Changed in starlingx:
status: New → Triaged
importance: Undecided → Medium
tags: added: stx.5.0
Changed in starlingx:
assignee: nobody → John Kung (john-kung)
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: John Kung (john-kung) → Adriano Oliveira (aoliveir)
Changed in starlingx:
status: Triaged → In Progress
description: updated
Revision history for this message
Adriano Oliveira (aoliveir) wrote :

Fix for this issue was tracked and merged as per the review: https://review.opendev.org/c/starlingx/config/+/773553

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/config/+/793460

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/config/+/793696

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/config/+/794611

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/config/+/794906

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

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/config/+/794611

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (f/centos8)
Download full text (147.3 KiB)

Reviewed: https://review.opendev.org/c/starlingx/config/+/794906
Committed: https://opendev.org/starlingx/config/commit/75758b37a5a23c8811355b67e2a430a1713cd85b
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 9e420d9513e5fafb1df4d29567bc299a9e04d58d
Author: Bin Qian <email address hidden>
Date: Mon May 31 14:45:52 2021 -0400

    Add more logging to run docker login

    Add error log for running docker login. The new log could
    help identify docker login failure.

    Closes-Bug: 1930310
    Change-Id: I8a709fb6665de8301fbe3022563499a92b2a0211
    Signed-off-by: Bin Qian <email address hidden>

commit 31c77439d2cea590dfcca13cfa646522665f8686
Author: albailey <email address hidden>
Date: Fri May 28 13:42:42 2021 -0500

    Fix controller-0 downgrade failing to kill ceph

    kill_ceph_storage_monitor tried to manipulate a pmon
    file that does not exist in an AIO-DX environment.

    We no longer invoke kill_ceph_storage_monitor in an
    AIO SX or DX env.

    This allows: "system host-downgrade controller-0"
    to proceed in an AIO-DX environment where that second
    controller (controller-0) was upgraded.

    Partial-Bug: 1929884
    Signed-off-by: albailey <email address hidden>
    Change-Id: I633853f75317736084feae96b5b849c601204c13

commit 0dc99eee608336fe01b58821ea404286371f1408
Author: albailey <email address hidden>
Date: Fri May 28 11:05:43 2021 -0500

    Fix file permissions failure during duplex upgrade abort

    When issuing a downgrade for controller-0 in a duplex upgrade
    abort and rollback scenario, the downgrade command was failing
    because the sysinv API does not have root permissions to set
    a file flag.
    The fix is to use RPC so the conductor can create the flag
    and allow the downgrade for controller-0 to get further.

    Partial-Bug: 1929884
    Signed-off-by: albailey <email address hidden>
    Change-Id: I913bcad73309fe887a12cbb016a518da93327947

commit 7ef3724dad173754e40b45538b1cc726a458cc1c
Author: Chen, Haochuan Z <email address hidden>
Date: Tue May 25 16:16:29 2021 +0800

    Fix bug rook-ceph provision with multi osd on one host

    Test case:
    1, deploy simplex system
    2, apply rook-ceph with below override value
    value.yaml
    cluster:
      storage:
        nodes:
        - name: controller-0
          devices:
          - name: sdb
          - name: sdc
    3, reboot

    Without this fix, only osd pod could launch successfully after boot
    as vg start with ceph could not correctly add in sysinv-database

    Closes-bug: 1929511

    Change-Id: Ia5be599cd168d13d2aab7b5e5890376c3c8a0019
    Signed-off-by: Chen, Haochuan Z <email address hidden>

commit 23505ba77d76114cf8a0bf833f9a5bcd05bc1dd1
Author: Angie Wang <email address hidden>
Date: Tue May 25 18:49:21 2021 -0400

    Fix issue in partition data migration script

    The created partition dictonary partition_map is not
    an ordered dict so we need to sort it by its key -
    device node when iterating it to adjust the device
    nodes/paths for user created extra partitions to ensure
    the number of device node...

tags: added: in-f-centos8
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on config (f/centos8)

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/config/+/793696

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/config/+/793460

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.