sureshanaparti commented on code in PR #8735: URL: https://github.com/apache/cloudstack/pull/8735#discussion_r1509169015
########## server/src/main/java/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java: ########## @@ -378,6 +378,12 @@ public Date scheduleNextSnapshotJob(final SnapshotPolicyVO policy) { if (policyId == Snapshot.MANUAL_POLICY_ID) { return null; } + + if (_volsDao.findById(policy.getVolumeId()) == null) { + s_logger.warn("Found snapshot policy ID: " + policyId + " for volume ID: " + policy.getVolumeId() + " that does not exist or has been removed"); + return null; + } Review Comment: agree, even user cannot delete as the delete snapshot policy call checks for the volume before deletion. https://github.com/apache/cloudstack/blob/9bd359a039a165ff81b46c9304fcac8a1a53dd50/server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java#L1468-L1471 -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org