File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ let vbd_cds_must_be_readonly = "VBD_CDS_MUST_BE_READONLY"
216216let disk_vbd_must_be_readwrite_for_hvm = " DISK_VBD_MUST_BE_READWRITE_FOR_HVM"
217217let host_cd_drive_empty = " HOST_CD_DRIVE_EMPTY"
218218let vdi_not_available = " VDI_NOT_AVAILABLE"
219+ let vdi_has_rrds = " VDI_HAS_RRDS"
219220let vdi_location_missing = " VDI_LOCATION_MISSING"
220221let vdi_content_id_missing = " VDI_CONTENT_ID_MISSING"
221222let vdi_missing = " VDI_MISSING"
Original file line number Diff line number Diff line change @@ -966,6 +966,8 @@ let _ =
966966 ~doc: " The operation could not proceed because necessary VDIs were already locked at the storage level." () ;
967967 error Api_errors. vdi_readonly [ " vdi" ]
968968 ~doc: " The operation required write access but this VDI is read-only" () ;
969+ error Api_errors. vdi_has_rrds [ " vdi" ]
970+ ~doc: " The operation cannot be performed because this VDI has rrd stats" () ;
969971 error Api_errors. vdi_too_small [ " vdi" ; " minimum size" ]
970972 ~doc: " The VDI is too small. Please resize it to at least the minimum size." () ;
971973 error Api_errors. vdi_not_sparse [ " vdi" ]
Original file line number Diff line number Diff line change @@ -128,13 +128,17 @@ let check_operation_error ~__context ?(sr_records=[]) ?(pbd_records=[]) ?(vbd_re
128128 | `forget ->
129129 if ha_enabled && List. mem record.Db_actions. vDI_type [ `ha_statefile ; `redo_log ]
130130 then Some (Api_errors. ha_is_enabled, [] )
131+ else if List. mem record.Db_actions. vDI_type [ `rrd ]
132+ then Some (Api_errors. vdi_has_rrds, [_ref])
131133 else None
132134 | `destroy ->
133135 if sr_type = " udev"
134136 then Some (Api_errors. vdi_is_a_physical_device, [_ref])
135137 else
136138 if is_tools_sr
137139 then Some (Api_errors. sr_operation_not_supported, [Ref. string_of sr])
140+ else if List. mem record.Db_actions. vDI_type [ `rrd ]
141+ then Some (Api_errors. vdi_has_rrds, [_ref])
138142 else
139143 if ha_enabled && List. mem record.Db_actions. vDI_type [ `ha_statefile ; `redo_log ]
140144 then Some (Api_errors. ha_is_enabled, [] )
You can’t perform that action at this time.
0 commit comments