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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to