Skip to content

Commit c92fdbc

Browse files
committed
Fix comment and remove unneeded else block
1 parent 4b7a534 commit c92fdbc

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/charm.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,6 @@ def _on_peer_relation_changed(self, event: RelationChangedEvent) -> None:
186186
# one at a time.
187187
if self.unit.is_leader():
188188
self._add_members(event)
189-
else:
190-
# Update the Patroni configuration in this unit to use new passwords when they change.
191-
# The config is reloaded later in `update_cluster_members` if the member has already
192-
# started, or it is loaded the first time Patroni starts.
193-
self._patroni.render_patroni_yml_file()
194189

195190
# Don't update this member before it's part of the members list.
196191
if self._endpoint not in self._endpoints:
@@ -506,7 +501,7 @@ def _on_set_password(self, event: ActionEvent) -> None:
506501
self._set_secret("app", f"{username}-password", password)
507502

508503
# Update and reload Patroni configuration in this unit to use the new password.
509-
# Other units Patroni configuration will be
504+
# Other units Patroni configuration will be reloaded in the peer relation changed event.
510505
self._patroni.render_patroni_yml_file()
511506
self._patroni.reload_patroni_configuration()
512507

tests/integration/test_password_rotation.py

Whitespace-only changes.

0 commit comments

Comments
 (0)