-
Notifications
You must be signed in to change notification settings - Fork 296
CA-408230: Enable destroy op for HA statefile VDI after HA is disabled #6424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The destroy operation is missing in the allowed operations for HA statefile VDI after HA is disable. It is because when update_allowed_operations for the VDI, it is found that ha_disable_in_progress is true. Xapi_ha.disable_internal will also be called when HA is not enabled successfully, in that case, ha_enable_in_progress is true. This fix removes `ha_enable or `ha_disable from pool's current operations to allow update_allowed_operations to enable destory operation for the VDI. Signed-off-by: Gang Ji <[email protected]>
|
Ring3 BST+BVT passed: 215961 |
lindig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is difficult to review; the change is small but there is a lot of context. When was the current operation previously removed?
It will be removed "automatically" after the operation is done: Which is a little late for us in this case. |
| Error (Api_errors.ha_is_enabled, []) | ||
| else if | ||
| List.mem record.Db_actions.vDI_type [`ha_statefile; `metadata] | ||
| List.mem record.Db_actions.vDI_type [`ha_statefile; `redo_log] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between metadata and redo_log here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix here don't require the understanding of the difference between the two types, the "metadata vdi for HA" is created of type `redo_type, not as its name suggests:
24 let create ~__context ~sr =
25 Helpers.call_api_functions ~__context (fun rpc session_id ->
26 Client.VDI.create ~rpc ~session_id ~name_label:"Metadata for HA"
27 ~name_description:"Used for master failover" ~sR:sr
28 ~virtual_size:Redo_log.minimum_vdi_size ~_type:`redo_log ~sharable:true
29 ~read_only:false ~other_config:[] ~xenstore_data:[]
30 ~sm_config:Redo_log.redo_log_sm_config ~tags:[]
31 )
32
"ocaml/xapi/xha_metadata_vdi.ml" 89 lines --1%--
|
Can you change the title of the second commit? It doesn't look like a fixup, but a genuine fix. |
As xha_metadata_vdi is of type `redo_log. This is why the destroy operation was not missing for the HA metadata VDI after HA is disabled. Signed-off-by: Gang Ji <[email protected]>
ebf9d9e to
f19f381
Compare
No description provided.