k8s upgrade fails if bootstrap config file not present

Bug #2009619 reported by Chris Friesen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Chris Friesen

Bug Description

After upgrade from an earlier release, an attempt to upgrade K8s failed:

system kube-host-upgrade controller-1 control-plane

Error:
sysinv 2023-03-06 19:21:21.461 450139 INFO sysinv.common.rest_api [-] GET cmd:http://192.168.204.2:5491/v1/is_available hdr:None payload:None
sysinv 2023-03-06 19:21:21.680 450139 INFO sysinv.api.controllers.v1.host [-] Upgrading kubernetes control plane on host controller-1
sysinv 2023-03-06 19:21:21.701 448902 ERROR sysinv.conductor.manager [-] Problem reading from /opt/platform/config/22.12/last_kube_extra_config_bootstrap.yaml: FileNotFoundError: [Errno 2] No such file or directory: '/opt/platform/config/22.12/last_kube_extra_config_bootstrap.yaml'

The problem is that if we upgrade from an early enough release the last_kube_extra_config_bootstrap.yaml isn't going to be present. In this case the correct action is to just ignore the missing file rather than failing the K8s upgrade.

Chris Friesen (cbf123)
Changed in starlingx:
assignee: nobody → Chris Friesen (cbf123)
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/+/876760

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/+/876760
Committed: https://opendev.org/starlingx/config/commit/5f44f4a4a23a8161a60ab08d961d453578b3c3fa
Submitter: "Zuul (22348)"
Branch: master

commit 5f44f4a4a23a8161a60ab08d961d453578b3c3fa
Author: Chris Friesen <email address hidden>
Date: Tue Mar 7 10:15:30 2023 -0600

    sysinv: ignore bootstrap config file if missing

    In commit cf94bebd9 we added a routine to edit the saved bootstrap
    config file. Originally this was fine since the file was guaranteed
    to exist.

    However, we now want to be able to do a "skip version" upgrade from
    earlier releases where the bootstrap config file won't exist. In this
    case we should just ignore the missing file.

    Accordingly, catch the specific error case and emit an informational
    log rather than failing the K8s upgrade.

    Closes-Bug: 2009619

    Change-Id: I103f9b769a4803f85624a8fa4014ae11fa4cf227
    Signed-off-by: Chris Friesen <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Bruce Jones (bejones)
tags: added: stx.9.0 stx.config
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
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.