Fix timezone exception during kube_upgrade_state periodic audit
periodic task _audit_kube_upgrade_states to
automatically change the kube_upgrade state to *-failed
if the specific state is stuck 'upgrading-*' for more
than 2 cycles of _audit_kube_upgrade_states. This fixes
an exception in the calculation of timedelta when there
is timezone mismatch between datetime object (from the
sysinv database) and current offset-naive.
Test Plan:
PASS: Manually edit kube_upgrade state to upgrading-* after kube_upgrade
completion and wait for one hour and verify state transition to *-failed
based on updated_at time stamp
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/875501 /opendev. org/starlingx/ config/ commit/ d6c38e9a50c440a 296e0dc052554f6 740c3e7480
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit d6c38e9a50c440a 296e0dc052554f6 740c3e7480
Author: Sachin Gopala Krishna <email address hidden>
Date: Mon Feb 27 10:00:34 2023 -0500
Fix timezone exception during kube_upgrade_state periodic audit
periodic task _audit_ kube_upgrade_ states to kube_upgrade_ states. This fixes
automatically change the kube_upgrade state to *-failed
if the specific state is stuck 'upgrading-*' for more
than 2 cycles of _audit_
an exception in the calculation of timedelta when there
is timezone mismatch between datetime object (from the
sysinv database) and current offset-naive.
Test Plan:
PASS: Manually edit kube_upgrade state to upgrading-* after kube_upgrade
completion and wait for one hour and verify state transition to *-failed
based on updated_at time stamp
Closes-Bug: 2008889
Signed-off-by: Sachin Gopala Krishna <email address hidden> ff2da7e30b5a632 20105cc0bbf
Change-Id: Idbecf3d83f5de3