Damans227 commented on code in PR #12847:
URL: https://github.com/apache/cloudstack/pull/12847#discussion_r4158486724


##########
core/src/main/java/org/apache/cloudstack/backup/TakeBackupCommand.java:
##########
@@ -89,6 +90,13 @@ public void setVolumePaths(List<String> volumePaths) {
 
     @Override
     public boolean executeInSequence() {

Review Comment:
   ok that covers it



##########
core/src/main/java/org/apache/cloudstack/backup/TakeBackupCommand.java:
##########
@@ -89,6 +90,13 @@ public void setVolumePaths(List<String> volumePaths) {
 
     @Override
     public boolean executeInSequence() {

Review Comment:
   is that cap per management server? with two of them a host could still get 4 
backups at once and leave only one worker free



##########
api/src/main/java/org/apache/cloudstack/backup/BackupManager.java:
##########
@@ -59,6 +59,12 @@ public interface BackupManager extends BackupService, 
Configurable, PluggableSer
             "false",
             "Enable volume attach/detach operations for VMs that are assigned 
to Backup Offerings.", true);
 
+    ConfigKey<Boolean> NASBackupParallelExecution = new 
ConfigKey<>("Advanced", Boolean.class,
+            "backup.nas.parallel.execution.enabled",
+            "true",

Review Comment:
   ok, fine to leave that call to them



##########
api/src/main/java/org/apache/cloudstack/backup/BackupManager.java:
##########
@@ -59,6 +59,12 @@ public interface BackupManager extends BackupService, 
Configurable, PluggableSer
             "false",
             "Enable volume attach/detach operations for VMs that are assigned 
to Backup Offerings.", true);
 
+    ConfigKey<Boolean> NASBackupParallelExecution = new 
ConfigKey<>("Advanced", Boolean.class,

Review Comment:
   does hostDao still get filled in? the new settings landed between its 
@Inject and the field, so backups look like they would crash on the host lookup



##########
api/src/main/java/org/apache/cloudstack/backup/BackupManager.java:
##########
@@ -59,6 +59,12 @@ public interface BackupManager extends BackupService, 
Configurable, PluggableSer
             "false",
             "Enable volume attach/detach operations for VMs that are assigned 
to Backup Offerings.", true);
 
+    ConfigKey<Boolean> NASBackupParallelExecution = new 
ConfigKey<>("Advanced", Boolean.class,
+            "backup.nas.parallel.execution.enabled",
+            "true",
+            "Allow NAS take-backup commands to run in parallel with other 
backup and delete commands on the KVM host. Disable to force sequential 
execution.",

Review Comment:
   got it, thanks



##########
core/src/test/java/org/apache/cloudstack/backup/TakeBackupCommandTest.java:
##########
@@ -0,0 +1,41 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.backup;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TakeBackupCommandTest {
+
+    @Test
+    public void testExecuteInSequenceDefaultsToParallel() {
+        TakeBackupCommand command = new TakeBackupCommand("vm-1", 
"/backups/vm-1");
+        // Default: run in parallel with other backup/delete commands.
+        Assert.assertFalse(command.executeInSequence());
+    }
+
+    @Test
+    public void testExecuteInSequenceIsSettable() {

Review Comment:
   ok that covers it, thanks



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