From e052d9c86073afb669d6388521b3961e945ea555 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Tue, 20 Nov 2018 12:46:08 -0500 Subject: [PATCH] Cinder-volumes Volume Group Resize Procedure Failed When the disk partition for the cinder-volumes VG is increased on the newly standby controller after controller swact, drbd sync starts before cinder-volumes VG is extended. When drbd sync starts, the drbd is in "SyncSource" state. But the code waits for drbd to be in "Connected" state. If that doesn't happen within 5 seconds, it will fail and won't continue to extend cinder-volumes VG. The solution is to allow cinder-volumes VG extension while drbd is in either "Connected" or "SyncSource" state. Change-Id: Ib164ce5fb433789d0806ac8d4faae9d675695b65 Closes-bug: 1803772 Signed-off-by: Wei Zhou --- sysinv/sysinv/sysinv/sysinv/conductor/manager.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 66dc4224b9..7f6e5f56fd 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -7556,11 +7556,19 @@ class ConductorManager(service.PeriodicService): cmd = [] try: if delayed: - # Wait for drbd connect cmd = ["drbdadm", "cstate", constants.CINDER_LVM_DRBD_RESOURCE] stdout, __ = cutils.execute(*cmd, run_as_root=True) if utils.get_system_mode(self.dbapi) != constants.SYSTEM_MODE_SIMPLEX: - if "Connected" not in stdout: + # Wait for drbd connect. + # It is possible that drbd is already in sync state + # (e.g. When the disk partition for the cinder-volumes is + # increased on the newly standby controller after controller + # swact), so we check for drbd "Connected" and "SyncSource". + # It is also possible that drbd is in "PausedSyncS" if we are + # doing serial syncing and another FS is syncing. + if ("Connected" not in stdout and + "SyncSource" not in stdout and + "PausedSyncS" not in stdout): return constants.CINDER_RESIZE_FAILURE else: # For simplex we just need to have drbd up @@ -7568,7 +7576,7 @@ class ConductorManager(service.PeriodicService): return constants.CINDER_RESIZE_FAILURE # Force a drbd resize on AIO SX as peer is not configured. - # DDRBD resize is automatic when both peers are connected. + # DRBD resize is automatic when both peers are connected. if utils.get_system_mode(self.dbapi) == constants.SYSTEM_MODE_SIMPLEX: # get the commands executed by 'drbdadm resize' and append some options cmd = ["drbdadm", "--dry-run", "resize", constants.CINDER_LVM_DRBD_RESOURCE]