CP-314075: restore VDI.resize_online for online VDI resize - #7211
CP-314075: restore VDI.resize_online for online VDI resize#7211MarkSymsCtx wants to merge 2 commits into
Conversation
|
Blocking this functionality at the toolstack level terminates options for storage innovation. Whether this functionality is present is already controlled by the features published by the SM layer. |
Reinstate the VDI.resize_online API that was removed in 31b22cc (CA-262059), so that "xe vdi-resize online=true" can resize a VDI attached to a running VM. resize_online shares the offline resize storage path (SM vdi_resize); the online/offline distinction lives in xapi's allowed-operations checks, which permit resize_online on an attached VDI only when the SM backend advertises the VDI_RESIZE_ONLINE capability. It is then up to the backend to decide whether it can satisfy the request and to fail with an appropriate error if it cannot. - datamodel: mark resize_online as published again - message_forwarding: restore resize_online forwarding - xapi_vdi: resize_online implementation; revert resize live-permission change - tests: cover resize_online allowed/blocked by VDI_RESIZE_ONLINE feature and offline resize still blocked while attached Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Mark Syms <mark.syms@citrix.com>
| , "Online VDI resize is not supported by any of the storage backends." | ||
| ) | ||
| ] | ||
| ~lifecycle:[(Published, rel_rio, "")] |
There was a problem hiding this comment.
The lifecycle state machine should be changed to allow reintroduction of removed features instead of stating the feature has been present in the meantime
There was a problem hiding this comment.
OK, claude started with a revert I guess. What should it say now?
There was a problem hiding this comment.
Published needs to be allowed after a Removed state, which means adding Removed_s in
xen-api/ocaml/idl/datamodel_types.ml
Line 531 in ac93801
The comment above should also mention this. Then the generation code for some things like documentation may need tweaking as well, or maybe it's not trying to do anything and will just print the list of releases where the state is changed
Address PR review feedback: rather than rewriting the resize_online history to claim it was always present, extend the datamodel lifecycle automaton so a Removed object can be Published again (reintroduced). The resize_online lifecycle now records its true history (published at rio, removed at inverness) and appends a fresh Published transition for the reintroduction that re-enables online resize where the SR supports it. Add a matching success case to the lifecycle creation tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Mark Syms <mark.syms@citrix.com>
Reinstate the VDI.resize_online API that was removed in 31b22cc (CA-262059), so that "xe vdi-resize online=true" can resize a VDI attached to a running VM. resize_online shares the offline resize storage path (SM vdi_resize); the online/offline distinction lives in xapi's allowed-operations checks, which permit resize_online on an attached VDI only when the SM backend advertises the VDI_RESIZE_ONLINE capability. It is then up to the backend to decide whether it can satisfy the request and to fail with an appropriate error if it cannot.