commit 42539e2aca3dafb0436bf037ca42717060d59d45
Author: Alex Kavanagh <email address hidden>
Date: Fri May 19 18:45:03 2023 +0100
Fix status during db-router-relation-departed
The functions get_cluster_instance_mode() and
get_cluster_status_text() should be able to return None if they can't
access the relevant status, but it's possible that keys may exist in the
status and this causes KeyErrors. This patch makes the functions more
robust such that they return None if the items don't exist. This only
affects reporting on the status line, rather than functionality in the
charm.
Change-Id: Ie63438cc8801224b0608203f7c935c430ef46045
Closes-Bug: #2020216
(cherry picked from commit 2af9b1b4e933751b2ff794a035a6b603067ca0a9)
Reviewed: https:/ /review. opendev. org/c/openstack /charm- mysql-innodb- cluster/ +/885020 /opendev. org/openstack/ charm-mysql- innodb- cluster/ commit/ 42539e2aca3dafb 0436bf037ca4271 7060d59d45
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/jammy
commit 42539e2aca3dafb 0436bf037ca4271 7060d59d45
Author: Alex Kavanagh <email address hidden>
Date: Fri May 19 18:45:03 2023 +0100
Fix status during db-router- relation- departed
The functions get_cluster_ instance_ mode() and cluster_ status_ text() should be able to return None if they can't
get_
access the relevant status, but it's possible that keys may exist in the
status and this causes KeyErrors. This patch makes the functions more
robust such that they return None if the items don't exist. This only
affects reporting on the status line, rather than functionality in the
charm.
Change-Id: Ie63438cc880122 4b0608203f7c935 c430ef46045 b2ff794a035a6b6 03067ca0a9)
Closes-Bug: #2020216
(cherry picked from commit 2af9b1b4e933751