Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion coriolis/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@

EXECUTION_TYPE_TO_ACTION_LOCK_NAME_FORMAT_MAP = {
EXECUTION_TYPE_TRANSFER_EXECUTION: TRANSFER_LOCK_NAME_FORMAT,
EXECUTION_TYPE_DEPLOYMENT: TRANSFER_LOCK_NAME_FORMAT,
EXECUTION_TYPE_DEPLOYMENT: DEPLOYMENT_LOCK_NAME_FORMAT,
EXECUTION_TYPE_TRANSFER_UPDATE: TRANSFER_LOCK_NAME_FORMAT,
EXECUTION_TYPE_TRANSFER_DISKS_DELETE: TRANSFER_LOCK_NAME_FORMAT,
EXECUTION_TYPE_MINION_POOL_MAINTENANCE: MINION_POOL_LOCK_NAME_FORMAT,
Expand Down
10 changes: 2 additions & 8 deletions coriolis/deployer_manager/rpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _wait_for_pending_deployment_status_change(self, deployment_id):
LOG.info(
f"Deployment '{deployment_id}' is still '{deployment_status}'")
i += 1
time.sleep(5)
time.sleep(1)

raise exception.InvalidDeploymentState(
f"Timed out waiting for deployment '{deployment_id}' to be out of "
Expand Down Expand Up @@ -120,20 +120,14 @@ def _check_deployer_status(self, deployment_id):
self._admin_ctx, deployment_id, str(ex))

def _loop(self):
greenthreads = []
while True:
try:
deployments = self._rpc_conductor_client.get_deployments(
self._admin_ctx, include_tasks=False,
include_task_info=False)
for d in deployments:
if d['last_execution_status'] == PENDING_STATUS:
greenthreads.append(
eventlet.spawn(
self._check_deployer_status, d['id']))

for gt in greenthreads:
gt.wait()
self._check_deployer_status(d['id'])
except Exception:
LOG.warning(
f"Deployer manager failed to list pending deployments. "
Expand Down