genegr commented on code in PR #13049:
URL: https://github.com/apache/cloudstack/pull/13049#discussion_r3154321730
##########
plugins/storage/volume/flasharray/src/main/java/org/apache/cloudstack/storage/datastore/adapter/flasharray/FlashArrayAdapter.java:
##########
@@ -200,28 +204,63 @@ public void detach(ProviderAdapterContext context,
ProviderAdapterDataObject dat
@Override
public void delete(ProviderAdapterContext context,
ProviderAdapterDataObject dataObject) {
- // first make sure we are disconnected
- removeVlunsAll(context, pod, dataObject.getExternalName());
String fullName = normalizeName(pod, dataObject.getExternalName());
- FlashArrayVolume volume = new FlashArrayVolume();
+ // Snapshots live under /volume-snapshots and already use the
+ // reserved form <volume>.<suffix>. FlashArray volume/snapshot names
+ // must match [A-Za-z0-9_-] and start/end with an alphanumeric, so
+ // appending our usual deletion-timestamp suffix to a snapshot name
+ // would produce a target like "<vol>.<n>-<ts>" - the embedded "."
+ // is rejected by the array. We therefore skip the rename for
+ // snapshots and only mark them destroyed; the array's own ".N"
+ // suffix already disambiguates them in the recycle bin.
Review Comment:
Pushed `be8785a1de flasharray: clarify snapshot naming comment per Copilot
review` to address the latest Copilot suggestion on the snapshot-skip-rename
block.
The comment now reads:
> Snapshots live under /volume-snapshots and already use the array's
reserved form `<volume>.<suffix>`, which legitimately contains ".". The
stricter `[A-Za-z0-9_-]` naming rule applies to regular volume names and
free-form rename targets, not to these reserved snapshot names. Since
FlashArray snapshot names are system-defined rather than arbitrary rename
targets, we skip the usual timestamped rename and only mark snapshots
destroyed; the array's own ".N" suffix already disambiguates them in the
recycle bin.
Comment-only change — behaviour is unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]