Merge "Unsuccessful controller fs resizing without error indication"

This commit is contained in:
Zuul 2019-01-17 18:32:21 +00:00 committed by Gerrit Code Review
commit cd502b9130
1 changed files with 36 additions and 30 deletions

View File

@ -7586,6 +7586,7 @@ class ConductorManager(service.PeriodicService):
progress = "" progress = ""
retry_attempts = 3 retry_attempts = 3
rc = False
with open(os.devnull, "w"): with open(os.devnull, "w"):
try: try:
if standby_host: if standby_host:
@ -7615,6 +7616,7 @@ class ConductorManager(service.PeriodicService):
drbd_fs_updated = self._drbd_fs_updated(context) drbd_fs_updated = self._drbd_fs_updated(context)
if drbd_fs_updated: if drbd_fs_updated:
while(loop_timeout <= 5): while(loop_timeout <= 5):
if constants.DRBD_PGSQL in drbd_fs_updated:
if (not pgsql_resized and if (not pgsql_resized and
(not standby_host or (standby_host and (not standby_host or (standby_host and
constants.DRBD_PGSQL in self._drbd_fs_sync()))): constants.DRBD_PGSQL in self._drbd_fs_sync()))):
@ -7625,6 +7627,7 @@ class ConductorManager(service.PeriodicService):
LOG.info("Performed %s" % progress) LOG.info("Performed %s" % progress)
pgsql_resized = True pgsql_resized = True
if constants.DRBD_CGCS in drbd_fs_updated:
if (not cgcs_resized and if (not cgcs_resized and
(not standby_host or (standby_host and (not standby_host or (standby_host and
constants.DRBD_CGCS in self._drbd_fs_sync()))): constants.DRBD_CGCS in self._drbd_fs_sync()))):
@ -7635,6 +7638,7 @@ class ConductorManager(service.PeriodicService):
LOG.info("Performed %s" % progress) LOG.info("Performed %s" % progress)
cgcs_resized = True cgcs_resized = True
if constants.DRBD_EXTENSION in drbd_fs_updated:
if (not extension_resized and if (not extension_resized and
(not standby_host or (standby_host and (not standby_host or (standby_host and
constants.DRBD_EXTENSION in self._drbd_fs_sync()))): constants.DRBD_EXTENSION in self._drbd_fs_sync()))):
@ -7697,12 +7701,14 @@ class ConductorManager(service.PeriodicService):
all_resized = False all_resized = False
if all_resized: if all_resized:
LOG.info("resizing filesystems completed")
rc = True
break break
loop_timeout += 1 loop_timeout += 1
time.sleep(1) time.sleep(1)
else:
LOG.info("resizing filesystems completed") LOG.warn("resizing filesystems not completed")
except exception.ProcessExecutionError as ex: except exception.ProcessExecutionError as ex:
LOG.warn("Failed to perform storage resizing (cmd: '%(cmd)s', " LOG.warn("Failed to perform storage resizing (cmd: '%(cmd)s', "
@ -7711,7 +7717,7 @@ class ConductorManager(service.PeriodicService):
{"cmd": " ".join(cmd), "stdout": ex.stdout, {"cmd": " ".join(cmd), "stdout": ex.stdout,
"stderr": ex.stderr, "rc": ex.exit_code}) "stderr": ex.stderr, "rc": ex.exit_code})
return True return rc
# Retry in case of errors or racing issues with rmon autoextend. Rmon is pooling at # Retry in case of errors or racing issues with rmon autoextend. Rmon is pooling at
# 10s intervals and autoextend is fast. Therefore retrying a few times and waiting # 10s intervals and autoextend is fast. Therefore retrying a few times and waiting