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/09/16 06:59:01 UTC

[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5455: Improve Veeam Plugin logs

DaanHoogland commented on a change in pull request #5455:
URL: https://github.com/apache/cloudstack/pull/5455#discussion_r709829822



##########
File path: plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/VeeamBackupProvider.java
##########
@@ -149,7 +152,7 @@ public boolean assignVMToBackupOffering(final VirtualMachine vm, final BackupOff
         for (final BackupOffering job : client.listJobs()) {
             if (job.getName().equals(clonedJobName)) {
                 final Job clonedJob = client.listJob(job.getExternalId());
-                if (clonedJob.getScheduleConfigured() && !clonedJob.getScheduleEnabled()) {
+                if (BooleanUtils.isTrue(clonedJob.getScheduleConfigured()) && !clonedJob.getScheduleEnabled()) {

Review comment:
       why is `BooleanUtils` needed?

##########
File path: server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java
##########
@@ -1012,6 +1006,7 @@ protected void runInContext() {
                 }
                 for (final DataCenter dataCenter : dataCenterDao.listAllZones()) {
                     if (dataCenter == null || isDisabled(dataCenter.getId())) {
+                        LOG.warn(String.format("Backup Sync Task is not enabled in zone [%s]. Skipping this zone!", dataCenter == null ? "NULL Zone!" : dataCenter.getId()));

Review comment:
       why an `error` message for every zone, if its not there? we are looking for only one, so `info` er even `debug` should be enough.

##########
File path: server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java
##########
@@ -1023,6 +1018,7 @@ protected void runInContext() {
 
                     List<VMInstanceVO> vms = vmInstanceDao.listByZoneWithBackups(dataCenter.getId(), null);
                     if (vms == null || vms.isEmpty()) {
+                        LOG.warn(String.format("Can't find any VM to sync backups in zone [id: %s].", dataCenter.getId()));

Review comment:
       `debug` should be enough




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