commit 114fb0805139224d2f281b959a187c80c6ede782
Author: Alex Kavanagh <email address hidden>
Date: Mon Jun 28 20:01:40 2021 +0100
Ensure update config function can handle new headers
The linked bug occurred due to a new header for the config file being in
the upgraded charm, but not in the previous version of the charm. As
the config file is read, updated, and then written, new headings in the
INI file would crash the charm code with a KeyError.
This patch just sets the header and parameter if it is missing.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- mysql-router/ +/798372 /opendev. org/openstack/ charm-mysql- router/ commit/ 114fb0805139224 d2f281b959a187c 80c6ede782
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 114fb0805139224 d2f281b959a187c 80c6ede782
Author: Alex Kavanagh <email address hidden>
Date: Mon Jun 28 20:01:40 2021 +0100
Ensure update config function can handle new headers
The linked bug occurred due to a new header for the config file being in
the upgraded charm, but not in the previous version of the charm. As
the config file is read, updated, and then written, new headings in the
INI file would crash the charm code with a KeyError.
This patch just sets the header and parameter if it is missing.
Closes-Bug: #1927981 144eade5caa5061 1b802cba28a
Change-Id: I18a6a4143ee0a1