Skip to content

Commit 6f3e392

Browse files
committed
Fix transfer schedules not being able to delete after deployment execution
When a schedule with `auto_deploy` enabled triggers the transfer and pending deployment using a user trust that's registered in the schedule information. After a deployment finishes, the trust_id is always deleted, making it impossible for the user to delete an auto_deploy-enabled transfer schedule. This patch makes sure that a transfer schedule can be deleted, even though its trust_id fails to delete.
1 parent 6d5c21e commit 6f3e392

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

coriolis/conductor/rpc/server.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3380,7 +3380,13 @@ def _cleanup_schedule_resources(self, ctxt, schedule):
33803380
if schedule.trust_id:
33813381
tmp_trust = context.get_admin_context(
33823382
trust_id=schedule.trust_id)
3383-
keystone.delete_trust(tmp_trust)
3383+
try:
3384+
keystone.delete_trust(tmp_trust)
3385+
except Exception:
3386+
LOG.warning(
3387+
f"Failed to delete schedule's trust_id. Trust might "
3388+
f"already be deleted. Error was: "
3389+
f"{utils.get_exception_details()}")
33843390

33853391
@schedule_synchronized
33863392
def delete_transfer_schedule(self, ctxt, transfer_id, schedule_id):

0 commit comments

Comments
 (0)