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 2021/12/23 05:26:00 UTC

[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #5774: [Veeam] Force ACS to use the template repository to clone job

sureshanaparti commented on a change in pull request #5774:
URL: https://github.com/apache/cloudstack/pull/5774#discussion_r774324161



##########
File path: plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
##########
@@ -439,7 +461,12 @@ public boolean startBackupJob(final String jobId) {
     public boolean cloneVeeamJob(final Job parentJob, final String clonedJobName) {
         LOG.debug("Trying to clone veeam job: " + parentJob.getUid() + " with backup uuid: " + clonedJobName);
         try {
-            final Ref repositoryRef =  listBackupRepository(parentJob.getBackupServerId());
+            final Ref repositoryRef = listBackupRepository(parentJob.getBackupServerId(), parentJob.getName());
+            if (repositoryRef == null) {
+                throw new CloudRuntimeException(String.format("Failed to clone backup job because couldn't find any "
+                        + "repository associated with backup job [id: %s, uid: %s, backupServerId: %s, name: %s].",
+                        parentJob.getId(), parentJob.getBackupServerId(), parentJob.getUid(), parentJob.getName()));

Review comment:
       @SadiJr correct the order of parameters in the error message.
   
   ```suggestion
                           parentJob.getId(), parentJob.getUid(), parentJob.getBackupServerId(), parentJob.getName()));
   ```




-- 
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-unsubscribe@cloudstack.apache.org

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