Skip to content

CP-314075: restore VDI.resize_online for online VDI resize - #7211

Open
MarkSymsCtx wants to merge 2 commits into
xapi-project:masterfrom
MarkSymsCtx:CP-314075
Open

CP-314075: restore VDI.resize_online for online VDI resize#7211
MarkSymsCtx wants to merge 2 commits into
xapi-project:masterfrom
MarkSymsCtx:CP-314075

Conversation

@MarkSymsCtx

Copy link
Copy Markdown
Contributor

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

@MarkSymsCtx

Copy link
Copy Markdown
Contributor Author

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>
Comment thread ocaml/idl/datamodel.ml Outdated
, "Online VDI resize is not supported by any of the storage backends."
)
]
~lifecycle:[(Published, rel_rio, "")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lifecycle state machine should be changed to allow reintroduction of removed features instead of stating the feature has been present in the meantime

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, claude started with a revert I guess. What should it say now?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Published needs to be allowed after a Removed state, which means adding Removed_s in

| Unreleased_s | Prototyped_s ->

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants