Skip to content

fix: inconsistent driver-updatable metadata delete - #350

Open
skook1 wants to merge 1 commit into
stable/2025.1-m3from
fix/inconsistent-driver-metadata-delete
Open

skook1 wants to merge 1 commit into
stable/2025.1-m3from
fix/inconsistent-driver-metadata-delete

Conversation

@skook1

@skook1 skook1 commented Aug 11, 2026

Copy link
Copy Markdown

Fix inconsistent driver-updatable metadata delete

Deleting a share metadata key listed in driver_updatable_metadata now creates an UPDATE_METADATA_NOT_DELETED user message, matching the existing behavior for driver_updatable_subnet_metadata on share network subnets. Operators get consistent feedback that the deletion was not passed to the share driver.

Closes-Bug: #2156333
Change-Id: I315a8e55c169e030ee6eb290506e6450a02dffd1

@skook1 skook1 changed the title Fix inconsistent driver-updatable metadata delete [WIP] fix: inconsistent driver-updatable metadata delete Aug 11, 2026
@skook1 skook1 changed the title [WIP] fix: inconsistent driver-updatable metadata delete fix: inconsistent driver-updatable metadata delete Aug 13, 2026
@skook1
skook1 force-pushed the fix/inconsistent-driver-metadata-delete branch 3 times, most recently from 9d0683c to ce8b39d Compare August 13, 2026 14:01
@kpawar-sap

Copy link
Copy Markdown

what was the testing during which you observed this as a bug ?

@Carthaca Carthaca 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.

The {key: None} breaks the NetApp driver's methods, that expect strings

Please add explicit handling when those receive None now:

update_volume_snapshot_policy()
update_cross_volume_dedupe()
update_showmount()
update_pnfs().

Extended scope, but would be nice:
if update_all_metadata deletes driver_updatable_metadata keys, the same logic (with {key: None}) should be applied to those keys
I'll leave it up to you, if you would want to include this here or in a follow-up.

Comment thread manila/share/api.py Outdated
@Carthaca

Copy link
Copy Markdown
Collaborator

@Carthaca

Copy link
Copy Markdown
Collaborator

I only saw now, that this is proposed upstream, too - I copied my remarks to gerrit https://review.opendev.org/c/openstack/manila/+/1000846 Let's solve it upstream first, please ;)

@skook1
skook1 force-pushed the fix/inconsistent-driver-metadata-delete branch from ce8b39d to 114f271 Compare August 27, 2026 13:04
@skook1
skook1 requested a review from Carthaca August 27, 2026 13:05
@skook1
skook1 force-pushed the fix/inconsistent-driver-metadata-delete branch from 114f271 to eb77306 Compare August 27, 2026 13:26
@skook1
skook1 force-pushed the fix/inconsistent-driver-metadata-delete branch 2 times, most recently from a912995 to 483566a Compare September 7, 2026 14:30
@kpawar-sap

Copy link
Copy Markdown

IMHO, If user want to revert the behaviour they should use update metadata with new value rather than delete_metadata. Delete_metadata does not mean reset to default, as different driver can have different behaviour.

@Carthaca

Carthaca commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

IMHO, If user want to revert the behaviour they should use update metadata with new value rather than delete_metadata. Delete_metadata does not mean reset to default, as different driver can have different behaviour.

but this is confusing to me:
If I have a share created without metadata it should be the same to a share that was created with metadata and the metadata got deleted later. I have no easy way (even audit logs will eventually expire) by looking at the share to know, if it had metadata earlier during it's lifetime to explain differing behaviour.

The other way I see would be to have all options that can be configured with metadata explicitly set and disallow to delete those keys, only allow updating the value. This would mean a plus in transparency, but on the downside we would blow up all shares with metadata.

@kpawar-sap

Copy link
Copy Markdown

If I have a share created without metadata it should be the same to a share that was created with metadata and the metadata got deleted later.
+1. This is better than disallowing deletion. I am ok with maintaining it consistent with share deletion.

Comment thread manila/share/api.py Outdated
Deleting a share metadata key listed in
``driver_updatable_metadata`` now creates an
``UPDATE_METADATA_NOT_DELETED`` user message, matching the existing
behavior for ``driver_updatable_subnet_metadata`` on share network
subnets. Operators get consistent feedback that the deletion was
not passed to the share driver.

Closes-Bug: #2156333
Change-Id: I315a8e55c169e030ee6eb290506e6450a02dffd1
Signed-off-by: Nikita Skakun <nikita.skakun@sap.com>
@skook1
skook1 force-pushed the fix/inconsistent-driver-metadata-delete branch from 483566a to 15be24c Compare September 16, 2026 13:38
@skook1
skook1 requested a review from kpawar-sap September 16, 2026 13:40
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