Skip to content

Commit 2a9bbbb

Browse files
committed
Merge 4.22 into fix/nasbackup-enhancements-combined
Resolves conflicts with the incremental NAS backup backport (apache#13877) and the restore mount/unmount timeout fix (apache#14006). Both sets of zone settings and command fields are kept; the agent wrappers carry both the mount timeout and the LUKS key file, and the enhancement flags plus temporary passphrase file move into upstream's new runBackupScript. Compression and LUKS encryption rewrite each backup file with qemu-img convert, which would flatten an incremental through its backing chain (or leave an encrypted child whose parent needs its own secret). So a zone with either enabled now takes full backups (decideChain returns legacy-full), and nasbackup.sh refuses incremental mode combined with -c/-e as a backstop. Covered by decideChainReturnsLegacyFullWhenCompressionOrEncryptionEnabled. Claude-Session: https://claude.ai/code/session_011MtPDN3Yg3DR8wu4EN8nkp
2 parents a39a95d + f23766d commit 2a9bbbb

108 files changed

Lines changed: 6224 additions & 408 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.editorconfig‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
root = true
18+
19+
[*]
20+
charset = utf-8
21+
end_of_line = lf
22+
# indent_size = 4
23+
indent_style = space
24+
insert_final_newline = true
25+
# max_line_length = 120
26+
# tab_width = 4

‎PendingReleaseNotes‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,17 @@ example.ver.1 > example.ver.2:
3939
which can now be attached to Instances. This is to prevent the Secondary
4040
Storage to grow to enormous sizes as Linux Distributions keep growing in
4141
size while a stripped down Linux should fit on a 2.88MB floppy.
42+
43+
4.22.0.0 > 4.22.0.1:
44+
* Disk-only instance snapshots for KVM UEFI VMs now include a sidecar copy of
45+
the active NVRAM state so revert operations restore both disk and firmware
46+
boot state consistently.
47+
48+
* UEFI disk-only instance snapshots taken before this change do not contain an
49+
NVRAM sidecar and cannot be safely reverted. Take a new snapshot after
50+
upgrading before relying on revert for UEFI VMs.
51+
52+
* Taking a disk-only instance snapshot for KVM UEFI VMs now briefly suspends
53+
the guest while the NVRAM sidecar is copied, so that the captured firmware
54+
state is consistent with the disk snapshot. Non-UEFI VMs are unaffected and
55+
continue to snapshot live.

‎api/src/main/java/com/cloud/host/Host.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public static String[] toStrings(Host.Type... types) {
5555
}
5656

5757
String HOST_UEFI_ENABLE = "host.uefi.enable";
58+
String HOST_KVM_DISK_ONLY_VM_SNAPSHOT_NVRAM = "host.kvm.diskonlyvmsnapshot.nvram";
5859
String HOST_VOLUME_ENCRYPTION = "host.volume.encryption";
5960
String HOST_INSTANCE_CONVERSION = "host.instance.conversion";
6061
String HOST_VDDK_SUPPORT = "host.vddk.support";

‎api/src/main/java/com/cloud/resource/ResourceService.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public interface ResourceService {
9191

9292
DataCenter getZone(Long zoneId);
9393

94-
List<HypervisorType> getSupportedHypervisorTypes(long zoneId, boolean forVirtualRouter, Long podId);
94+
List<HypervisorType> getSupportedHypervisorTypes(long zoneId, boolean forSystemVm, Long podId);
9595

9696
boolean releaseHostReservation(Long hostId);
9797

‎api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ImportVmCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class ImportVmCmd extends ImportUnmanagedInstanceCmd {
9292

9393
@Parameter(name = ApiConstants.DISK_PATH,
9494
type = CommandType.STRING,
95-
description = "path of the disk image")
95+
description = "path of the disk image. It is the file name on file based storage pools (NFS, Local, SharedMountPoint), and the image name on RBD storage pools")
9696
private String diskPath;
9797

9898
@Parameter(name = ApiConstants.IMPORT_SOURCE,

‎api/src/main/java/org/apache/cloudstack/api/command/admin/volume/ImportVolumeCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class ImportVolumeCmd extends BaseAsyncCmd {
6363
@Parameter(name = ApiConstants.PATH,
6464
type = BaseCmd.CommandType.STRING,
6565
required = true,
66-
description = "the path of the volume")
66+
description = "the path of the volume. It is the file name on file based storage pools (NFS, Local, SharedMountPoint), and the image name on RBD storage pools")
6767
private String path;
6868

6969
@Parameter(name = ApiConstants.NAME,

‎api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
import com.cloud.vm.VirtualMachine;
3838
import com.cloud.vm.snapshot.VMSnapshot;
3939

40-
@APICommand(name = "createVMSnapshot", description = "Creates Snapshot for an Instance.", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = {VMSnapshot.class},
40+
@APICommand(name = "createVMSnapshot", description = "Creates Snapshot for an Instance. Running KVM UEFI disk-only snapshots briefly suspend the Instance while copying NVRAM state.",
41+
responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = {VMSnapshot.class},
4142
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
4243
public class CreateVMSnapshotCmd extends BaseAsyncCreateCmd {
4344

‎api/src/main/java/org/apache/cloudstack/api/response/ImageStoreDetailResponse.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
// under the License.
1717
package org.apache.cloudstack.api.response;
1818

19+
import java.util.Objects;
20+
1921
import com.google.gson.annotations.SerializedName;
2022

2123
import org.apache.cloudstack.api.BaseResponse;
@@ -81,7 +83,7 @@ public boolean equals(Object obj) {
8183
return false;
8284
} else if (!oid.equals(other.getName()))
8385
return false;
84-
else if (this.getValue().equals(other.getValue()))
86+
else if (!Objects.equals(this.getValue(), other.getValue()))
8587
return false;
8688
return true;
8789
}

‎api/src/main/java/org/apache/cloudstack/api/response/NetworkOfferingResponse.java‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ public class NetworkOfferingResponse extends BaseResponseWithAnnotations {
9191
@Param(description = "The ID of the service offering used by virtual router provider")
9292
private String serviceOfferingId;
9393

94+
@SerializedName(ApiConstants.SERVICE_OFFERING_NAME)
95+
@Param(description = "the name of the service offering used by virtual router provider")
96+
private String serviceOfferingName;
97+
9498
@SerializedName(ApiConstants.SERVICE)
9599
@Param(description = "The list of supported services", responseObject = ServiceResponse.class)
96100
private List<ServiceResponse> services;
@@ -330,4 +334,12 @@ public String getRoutingMode() {
330334
public void setRoutingMode(String routingMode) {
331335
this.routingMode = routingMode;
332336
}
337+
338+
public String getServiceOfferingName() {
339+
return serviceOfferingName;
340+
}
341+
342+
public void setServiceOfferingName(String serviceOfferingName) {
343+
this.serviceOfferingName = serviceOfferingName;
344+
}
333345
}

‎api/src/main/java/org/apache/cloudstack/api/response/ProjectResponse.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ public void setNetworkAvailable(String networkAvailable) {
452452

453453
@Override
454454
public void setVpcLimit(String vpcLimit) {
455-
this.vpcLimit = networkLimit;
455+
this.vpcLimit = vpcLimit;
456456
}
457457

458458
@Override

0 commit comments

Comments
 (0)