Skip to content

Commit 586999a

Browse files
authored
Merge branch 'apache:main' into fix-13605-kvm-ha-oobm
2 parents ba1f5a5 + fc83241 commit 586999a

5 files changed

Lines changed: 12 additions & 8 deletions

File tree

api/src/main/java/org/apache/cloudstack/api/command/admin/network/NetworkOfferingBaseCmd.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ public abstract class NetworkOfferingBaseCmd extends BaseCmd {
216216
description = "the routing mode for the network offering. Supported types are: Static or Dynamic.")
217217
private String routingMode;
218218

219+
private Map<String, String> sourceDetailsMap;
220+
219221
/////////////////////////////////////////////////////
220222
/////////////////// Accessors ///////////////////////
221223
/////////////////////////////////////////////////////
@@ -430,9 +432,8 @@ public Map<Network.Capability, String> getServiceCapabilities(Network.Service se
430432

431433
public Map<String, String> getDetails() {
432434
if (details == null || details.isEmpty()) {
433-
return null;
435+
return sourceDetailsMap;
434436
}
435-
436437
Collection paramsCollection = details.values();
437438
Object objlist[] = paramsCollection.toArray();
438439
Map<String, String> params = (Map<String, String>) (objlist[0]);

api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class CreateBackupCmd extends BaseAsyncCreateCmd {
7575
@Parameter(name = ApiConstants.QUIESCE_VM,
7676
type = CommandType.BOOLEAN,
7777
required = false,
78-
description = "Quiesce the instance before checkpointing the disks for backup. Applicable only to NAS backup provider. " +
78+
description = "Quiesce the instance before checkpointing the disks for backup. Applicable only to NAS and KBOSS backup providers. " +
7979
"The filesystem is frozen before the backup starts and thawed immediately after. " +
8080
"Requires the instance to have the QEMU Guest Agent installed and running.",
8181
since = "4.21.0")

api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupScheduleCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class CreateBackupScheduleCmd extends BaseCmd {
8282
@Parameter(name = ApiConstants.QUIESCE_VM,
8383
type = CommandType.BOOLEAN,
8484
required = false,
85-
description = "Quiesce the Instance before checkpointing the disks for backup. Applicable only to NAS backup provider. " +
85+
description = "Quiesce the Instance before checkpointing the disks for backup. Applicable only to NAS and KBOSS backup providers. " +
8686
"The filesystem is frozen before the backup starts and thawed immediately after. " +
8787
"Requires the instance to have the QEMU Guest Agent installed and running.",
8888
since = "4.21.0")

plugins/backup/kboss/src/main/java/org/apache/cloudstack/backup/KbossBackupProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@ protected void configureValidationScript(ValidateKbossVmCommand cmd, BackupVO ba
27402740
cmd.setExpectedResult(scriptExpectedResult != null ? scriptExpectedResult.getValue() : "0");
27412741
VMInstanceDetailVO scriptTimeout = vmInstanceDetailsDao.findDetail(vmId, VmDetailConstants.VALIDATION_COMMAND_TIMEOUT);
27422742
cmd.setScriptTimeout(scriptTimeout != null ? Integer.valueOf(scriptTimeout.getValue()) :
2743-
BackupValidationServiceJobController.backupValidationScriptDefaultTimeout.valueIn(backupVO.getId()));
2743+
BackupValidationServiceJobController.backupValidationScriptDefaultTimeout.valueIn(backupVO.getAccountId()));
27442744
}
27452745

27462746
protected void createBasicBackupDetails(Long imageStoreId, Long parentId, BackupVO backupVO) {
@@ -2881,7 +2881,7 @@ protected boolean validateBackupStateForRemoval(long backupId) {
28812881
}
28822882

28832883
if (Backup.ValidationStatus.Validating.equals(backupVO.getValidationStatus())) {
2884-
logger.error("Backup [{}] is being validated, we cannot delete it. Please wait for the validation process to end and try again later.");
2884+
logger.error("Backup [{}] is being validated, we cannot delete it. Please wait for the validation process to end and try again later.", backupVO.getUuid());
28852885
return false;
28862886
}
28872887
return true;

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8486,8 +8486,11 @@ private void applySourceOfferingValuesToCloneCmd(CloneNetworkOfferingCmd cmd,
84868486
private Map<String, String> getSourceOfferingDetails(Long sourceOfferingId) {
84878487
List<NetworkOfferingDetailsVO> sourceDetailsVOs = networkOfferingDetailsDao.listDetails(sourceOfferingId);
84888488
Map<String, String> sourceDetailsMap = new HashMap<>();
8489+
Set<String> ignoredSourceDetails = new HashSet<>(Arrays.asList(Detail.internetProtocol.name(), Detail.domainid.name(), Detail.zoneid.name()));
84898490
for (NetworkOfferingDetailsVO detailVO : sourceDetailsVOs) {
8490-
sourceDetailsMap.put(detailVO.getName(), detailVO.getValue());
8491+
if (!ignoredSourceDetails.contains(detailVO.getName())) {
8492+
sourceDetailsMap.put(detailVO.getName(), detailVO.getValue());
8493+
}
84918494
}
84928495
return sourceDetailsMap;
84938496
}
@@ -8635,7 +8638,7 @@ private void applyResolvedValuesToCommand(CloneNetworkOfferingCmd cmd, NetworkOf
86358638

86368639
if (cmd.getDetails() == null || cmd.getDetails().isEmpty()) {
86378640
if (!sourceDetailsMap.isEmpty()) {
8638-
setField(cmd, "details", sourceDetailsMap);
8641+
setField(cmd, "sourceDetailsMap", sourceDetailsMap);
86398642
}
86408643
}
86418644

0 commit comments

Comments
 (0)