Skip to content

fix(integrations): refuse deleting a storage Manila still uses - #725

Merged
github-actions[bot] merged 1 commit into
developfrom
fix/2329-manila-delete-guard
Nov 13, 2026
Merged

github-actions[bot] merged 1 commit into
developfrom
fix/2329-manila-delete-guard

Conversation

@SekiXu

@SekiXu SekiXu commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

/kind bug


Which issue(s) this PR fixes?

Refs bigstack-oss/cubecos#2329


What this PR does?

DELETE /integrations/storages/:storageName answers 202 and deletes afterwards, so a storage Manila still uses was only refused on the node, in its log, and the WebUI showed nothing. The handler now runs hex_sdk cinder_is_storage_manila_free <name> (from bigstack-oss/cubecos#2335) before the 202 and answers 409 with its output: the shares and share servers Manila still has on the storage, or that they could not be read. A forwarded request is not checked again; its node still refuses while deleting.


Test results (optional)

1). make sure the api docs have been updated

Yes: bigstack-oss/cube-cos-openapi#126.


2). make sure the api works properly

  • sky150 (3.2.0 20261004-0551), this binary (x86 jail build) plus the cubecos helper hot-patched:
    DELETE …/integrations/storages/mbtest-nfs → HTTP 409 in 6.9 s, {"code":409,"msg":"storage mbtest-nfs is still used by Manila, delete these first: shares a9ed8cfe-… (available); share servers 5996ba23-… (active)","status":"status conflict"}; a GET afterwards still returns the storage.
  • Jail: go build, go vet ./..., go test ./... (25 packages) pass.
  • New handler test: with the check removed, the in-use case fails (expected: 409 actual: 202).
  • A 202 delete of a free storage through this binary, and HA forwarding, were not tested on a node.

Reviewer notes

Undo: easy — revert; nothing is written.
Affects: every storage delete through the API, from the CLI and the WebUI. With Manila enabled the DELETE answers about 7 s later than before; a storage in use now gets 409 instead of 202.
Please check: this needs cinder_is_storage_manila_free on the node. Without it hex_sdk fails and every delete gets 409 "could not be read". Bump cube-cos-api only into a cubecos branch that has it.

Merge order: bigstack-oss/cubecos#2335 and bigstack-oss/cube-cos-openapi#126 → re-point the submodule to the merged openapi commit → this PR.

🤖 Generated with Claude Code

@Eandalf-Bigstack Eandalf-Bigstack left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, pending on PR bigstack-oss/cube-cos-ui#914

The delete runs after the 202, so a storage Manila still uses was only
refused on the node, in its log. DELETE /integrations/storages/:name now
runs hex_sdk cinder_is_storage_manila_free first and answers 409 with
its reason: the shares and share servers Manila still has there, or that
they could not be read. A forwarded request is not checked again.

Bumps api/cube-cos-openapi for the 409.

Refs bigstack-oss/cubecos#2329

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Seki Xu <seki.xu@bigstack.co>
@SekiXu
SekiXu force-pushed the fix/2329-manila-delete-guard branch from 76cdc64 to 7c962fa Compare November 13, 2026 05:54
@SekiXu SekiXu added the done Merge the pull request label Nov 13, 2026
@github-actions
github-actions Bot merged commit 7c962fa into develop Nov 13, 2026
9 checks passed
@github-actions
github-actions Bot deleted the fix/2329-manila-delete-guard branch November 13, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

done Merge the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants