Use correct SST password in backup action

The backup action currently retrieves the sst-password from the charm
configuration exclusively, instead of the leader settings where it is
usually stored when auto-generated.

Always retrieve the correct SST password using the
percona_utils._get_password function.

Change-Id: I06d36c13ecc48a942e559d09d94e7813a2254479
This commit is contained in:
Trent Lloyd 2018-06-22 12:57:26 +08:00
parent 1c4d991232
commit f19a766d43
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,6 @@ from charmhelpers.core.hookenv import (
action_get, action_get,
action_set, action_set,
action_fail, action_fail,
config,
) )
from charmhelpers.core.host import ( from charmhelpers.core.host import (
@ -24,6 +23,7 @@ from percona_utils import (
pause_unit_helper, pause_unit_helper,
resume_unit_helper, resume_unit_helper,
register_configs, register_configs,
_get_password,
) )
from percona_hooks import config_changed from percona_hooks import config_changed
@ -51,7 +51,7 @@ def backup(args):
basedir = (action_get("basedir")).lower() basedir = (action_get("basedir")).lower()
compress = action_get("compress") compress = action_get("compress")
incremental = action_get("incremental") incremental = action_get("incremental")
sstpw = config("sst-password") sstpw = _get_password("sst-password")
optionlist = [] optionlist = []
# innobackupex will not create recursive dirs that do not already exist, # innobackupex will not create recursive dirs that do not already exist,