nagaboinaramgopal commented on PR #14089:
URL: https://github.com/apache/cloudstack/pull/14089#issuecomment-5625749354
@DaanHoogland @sureshanaparti I've also verified on a live 4.23 KVM
environment (NFS primary storage), creating snapshots of the same ROOT volume
through the API.
**Before the change**, both snapshots with the same name are accepted and
end up BackedUp:
```
20:46:48 GET command=createSnapshot&volumeid=79f03a4d-...&name=dup14089
HTTP/1.1 200 {"createsnapshotresponse":{"id":"f9df84d7-...
20:46:51 Complete async job-1519, jobStatus: SUCCEEDED ...
SnapshotResponse/snapshot/{"id":"f9df84d7-20ab-48e5-a843-b5c45e16ca5e", ...
20:46:54 GET command=createSnapshot&volumeid=79f03a4d-...&name=dup14089
HTTP/1.1 200 {"createsnapshotresponse":{"id":"999155e6-...
20:46:55 Complete async job-1521, jobStatus: SUCCEEDED ...
SnapshotResponse/snapshot/{"id":"999155e6-f9a4-4879-88fc-feb42a620678", ...
```
**With the change**, the second one is rejected, a different name still
works, and the name can be reused once the first snapshot is deleted:
```
20:49:36 GET command=createSnapshot&volumeid=79f03a4d-...&name=dup14089
HTTP/1.1 200 {"createsnapshotresponse":{"id":"90e59767-...
20:49:38 Complete async job-1525, jobStatus: SUCCEEDED
20:49:41 GET command=createSnapshot&volumeid=79f03a4d-...&name=dup14089
HTTP/1.1 431 A snapshot with name [dup14089] already exists for volume ...
20:49:41 GET command=createSnapshot&volumeid=79f03a4d-...&name=other14089
HTTP/1.1 200 {"createsnapshotresponse":{"id":"7193286b-...
20:49:42 Complete async job-1527, jobStatus: SUCCEEDED
20:49:47 GET command=deleteSnapshot&id=90e59767-7aaa-470d-9077-26920547b523
HTTP/1.1 200
20:49:52 GET command=createSnapshot&volumeid=79f03a4d-...&name=dup14089
HTTP/1.1 200 {"createsnapshotresponse":{"id":"d531ec5b-...
20:49:54 Complete async job-1530, jobStatus: SUCCEEDED
```
No SQL errors or exceptions in the management server log during the run.
--
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]