resize glance fails before controller-1 configured

drbdadm's '--assume-peer-has-space' parameter is a backend
option but the required '--' command line prefix is missing

Closes-Bug: #1788916

Change-Id: I0c149c2e8de7695e9927658e7fe679f333bdda4a
Signed-off-by: Daniel Badea <daniel.badea@windriver.com>
This commit is contained in:
Daniel Badea 2018-08-27 13:39:58 +00:00
parent a05197752e
commit 03cdeb2f9b

View File

@ -7283,12 +7283,11 @@ class ConductorManager(service.PeriodicService):
if not os.path.isfile(CFS_DRBDADM_RECONFIGURED):
progress = "drbdadm resize all"
cmd = ["drbdadm", "resize", "all"]
if standby_host:
stdout, __ = cutils.execute(*cmd, attempts=retry_attempts, run_as_root=True)
cmd = ["drbdadm", "resize", "all"]
else:
cmd = cmd + ['--assume-peer-has-space']
stdout, __ = cutils.execute(*cmd, attempts=retry_attempts, run_as_root=True)
cmd = ["drbdadm", "--", "--assume-peer-has-space", "resize", "all"]
stdout, __ = cutils.execute(*cmd, attempts=retry_attempts, run_as_root=True)
LOG.info("Performed %s" % progress)
cutils.touch(CFS_DRBDADM_RECONFIGURED)