You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/11/11 06:40:16 UTC

[GitHub] [cloudstack] Spaceman1984 commented on a change in pull request #4425: Setting snapshot state to error on timeout

Spaceman1984 commented on a change in pull request #4425:
URL: https://github.com/apache/cloudstack/pull/4425#discussion_r521142771



##########
File path: server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java
##########
@@ -553,6 +553,25 @@ private void postCreateRecurringSnapshotForPolicy(long userId, long volumeId, lo
         }
     }
 
+    public void markFailedSnapshot(long snapshotId) {
+        Account caller = CallContext.current().getCallingAccount();
+
+        // Verify parameters
+        SnapshotVO snapshotCheck = _snapshotDao.findById(snapshotId);
+
+        if (snapshotCheck == null) {
+            throw new InvalidParameterValueException("unable to find a snapshot with id " + snapshotId);
+        }
+
+        _accountMgr.checkAccess(caller, null, true, snapshotCheck);
+
+        snapshotCheck.setState(Snapshot.State.Error);

Review comment:
       Not sure what you mean @sureshanaparti 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org