Skip to content

Commit 61ebc94

Browse files
committed
Add clustered migration sync for shared disks (SYNCING barrier)
Introduce TASK_STATUS_SYNCING and TASK_TYPES_TO_SYNC (GET_INSTANCE_INFO, DEPLOY_TRANSFER_DISKS, REPLICATE_DISKS) so multi-instance transfers with base_transfer_action.clustered=True wait for all peer tasks of the same type before leaving SYNCING for COMPLETED and advancing dependents. - clustered is set as len(instances) > 1 on transfer create - On task_completed: enter SYNCING when the barrier applies, then when every peer is SYNCING, run sync hooks (GET_INSTANCE_INFO: promote shareable on export disks, DEPLOY_TRANSFER_DISKS: shared-disk volumes_info, REPLICATE_DISKS: sync change_id) - ReplicateDisksTask: skip provider replicate for replicate_disk_data=False - On task error: abort peers stuck in SYNCING for the same task type
1 parent 3ce217f commit 61ebc94

File tree

17 files changed

+535
-11
lines changed

17 files changed

+535
-11
lines changed

coriolis/api-refs/api_samples/transfer/openstack-transfer-create-resp.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
}
5050
},
5151
"executions": [],
52-
"scenario": "replica"
52+
"scenario": "replica",
53+
"clustered": false
5354
}
5455
}

coriolis/api-refs/api_samples/transfer/openstack-transfer-get-resp.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"origin_minion_pool_id": null,
4343
"destination_minion_pool_id": null,
4444
"instance_osmorphing_minion_pool_mappings": {},
45+
"clustered": false,
4546
"executions": [
4647
{
4748
"created_at": "2019-07-11T10:06:47.000000",

coriolis/api-refs/api_samples/transfer/transfer-list-resp.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
"instances": {}
7575
},
7676
"id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22",
77-
"scenario": "replica"
77+
"scenario": "replica",
78+
"clustered": false
7879
}
7980
]
8081
}

coriolis/api-refs/api_samples/transfer/transfer-update-resp.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@
133133
"ubuntu-xenial": "echo 'anything you need'"
134134
}
135135
},
136-
"scenario": "replica"
136+
"scenario": "replica",
137+
"clustered": false
137138
}
138139
}
139140
}

coriolis/api-refs/source/parameters.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ connection_info_schema:
123123
in: body
124124
type: object
125125
required: false
126+
clustered:
127+
description: |
128+
Present on transfer responses. ``true`` when more than one instance is
129+
listed (multi-instance scheduling: sync barriers and shared-disk
130+
coordination). Set by the server at creation from ``instances``; not
131+
accepted on create.
132+
in: body
133+
type: boolean
134+
required: false
126135
deployment_cancel:
127136
description: |
128137
Object containing information about the type of deployment cancellation.

coriolis/api-refs/source/transfer.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Response
5151
- instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings
5252
- user_scripts : user_scripts
5353
- scenario: scenario_type
54+
- clustered : clustered
5455

5556
**Example of Transfer List Response**
5657

@@ -111,6 +112,7 @@ Response
111112
- instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings
112113
- user_scripts : user_scripts
113114
- scenario: scenario_type
115+
- clustered : clustered
114116

115117
**Example of Transfer Show Response**
116118

@@ -183,6 +185,7 @@ Response
183185
- instance_osmorphing_minion_pool_mappings : instance_osmorphing_minion_pool_mappings
184186
- user_scripts : user_scripts
185187
- scenario: scenario_type
188+
- clustered : clustered
186189

187190
**Example of Transfer Create Response**
188191

0 commit comments

Comments
 (0)