Comment 2 for bug 1943690

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

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

commit 02535937a26c7524207468efe66dc52dd72bb95f
Author: Mihnea Saracin <email address hidden>
Date: Wed Sep 15 12:06:27 2021 +0300

    Use upgraded kubelet on unlock after kubelet upgrade

    When unlocking after kubelet upgrade, there is a problem here:
    https://opendev.org/starlingx/config/src/commit/c784e1ca9a8bd82e86f889b7f621d2363b1393af/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py#L383
    the kube_host_upgrade status is no longer equal to
    KUBE_HOST_UPGRADING_KUBELET and the kubelet version is taken from
    the DB which is the old one.
    The kubelet value from the DB is updated when the k8s upgrade is
    complete. (i.e after doing: system kube-upgrade-complete)

    To fix this we added a new state to kube_host_upgrade.status
    defined as kubernetes.KUBE_HOST_UPGRADED_KUBELET. This state will
    indicate that the kubelet was upgraded for a certain host.

    When we complete the upgrade (i.e system kube-upgrade-complete)
    the per-host kube_host_upgrade.status values will be set to None
    so that they're blank in prep for the next k8s upgrade.

    Closes-Bug: 1943690
    Change-Id: Ifdb5c51649831deed76ab9a5370cd293f8a5784a
    Signed-off-by: Mihnea Saracin <email address hidden>