Skip to content

Commit

Permalink
Constrain patronictl
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirp committed Sep 2, 2023
1 parent 966bfbc commit 9c1cb47
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def _on_restore_action(self, event):
logger.info("Removing previous cluster information")
return_code, _, stderr = self._execute_command(
[
"charmed-postgresql.patronictl",
"charmed-postgresql.constrained=patronictl",
"-c",
f"{PATRONI_CONF_PATH}/patroni.yaml",
"remove",
Expand Down
2 changes: 1 addition & 1 deletion src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# Snap constants.
PGBACKREST_EXECUTABLE = "charmed-postgresql.constrained-pgbackrest"
POSTGRESQL_SNAP_NAME = "charmed-postgresql"
SNAP_PACKAGES = [(POSTGRESQL_SNAP_NAME, {"revision": "71"})]
SNAP_PACKAGES = [(POSTGRESQL_SNAP_NAME, {"revision": "72"})]

SNAP_COMMON_PATH = "/var/snap/charmed-postgresql/common"
SNAP_CURRENT_PATH = "/var/snap/charmed-postgresql/current"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ def test_on_restore_action(
)
_execute_command.assert_called_once_with(
[
"charmed-postgresql.patronictl",
"charmed-postgresql.constrained=patronictl",
"-c",
"/var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml",
"remove",
Expand Down

0 comments on commit 9c1cb47

Please sign in to comment.