Skip to content

Commit 711eb46

Browse files
committed
Merge branch 'main' of github.com:apache/cloudstack into support-multi-vlan-guestnet
2 parents c2ebb3a + dc0ba1c commit 711eb46

99 files changed

Lines changed: 4450 additions & 391 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.

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,14 @@ updates:
4141
interval: "daily"
4242
cooldown:
4343
default-days: 7
44+
- package-ecosystem: "pre-commit"
45+
directory: "/"
46+
open-pull-requests-limit: 2
47+
schedule:
48+
interval: "weekly"
49+
groups:
50+
pre-commit-hooks:
51+
patterns:
52+
- "*"
53+
cooldown:
54+
default-days: 7

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.

agent/conf/log4j-cloud.xml.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ under the License.
3838
<!-- ============================== -->
3939

4040
<Console name="CONSOLE" target="SYSTEM_OUT">
41-
<ThresholdFilter level="OFF" onMatch="ACCEPT" onMismatch="DENY"/>
42-
<PatternLayout pattern="%-5p [%c{3}] (%t:%x) (logid:%X{logcontextid}) %m%ex%n"/>
41+
<ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
42+
<PatternLayout pattern="%d{DEFAULT} %-5p [%c{3}] (%t:%x) (logid:%X{logcontextid}) %m%ex%n"/>
43+
</Console>
44+
45+
<Console name="CONSOLE_ERR" target="SYSTEM_ERR">
46+
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
47+
<PatternLayout pattern="%d{DEFAULT} %-5p [%c{3}] (%t:%x) (logid:%X{logcontextid}) %m%ex%n"/>
4348
</Console>
4449
</Appenders>
4550

@@ -50,17 +55,11 @@ under the License.
5055
<!-- ================ -->
5156

5257
<Logger name="com.cloud" level="INFO"/>
53-
5458
<Logger name="org.apache" level="INFO"/>
55-
5659
<Logger name="org" level="INFO"/>
57-
5860
<Logger name="net" level="INFO"/>
59-
6061
<Logger name="com.amazonaws" level="INFO"/>
61-
6262
<Logger name="httpclient.wire" level="INFO"/>
63-
6463
<Logger name="org.apache.http.wire" level="INFO"/>
6564

6665
<!-- ======================= -->
@@ -69,6 +68,7 @@ under the License.
6968

7069
<Root level="INFO">
7170
<AppenderRef ref="CONSOLE"/>
71+
<AppenderRef ref="CONSOLE_ERR"/>
7272
<AppenderRef ref="FILE"/>
7373
</Root>
7474

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/org/apache/cloudstack/api/command/user/backup/ListBackupsCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public class ListBackupsCmd extends BaseListProjectAndAccountResourcesCmd {
9797

9898
@Parameter(name = ApiConstants.TYPE,
9999
type = CommandType.STRING,
100-
since = "4.24.0",
100+
since = "24.0",
101101
description = "list backups by type")
102102
private String backupType;
103103

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
@@ -36,7 +36,8 @@
3636
import com.cloud.uservm.UserVm;
3737
import com.cloud.vm.snapshot.VMSnapshot;
3838

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

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
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
package org.apache.cloudstack.api.response;
18+
19+
import org.junit.Assert;
20+
import org.junit.Test;
21+
22+
public class ImageStoreDetailResponseTest {
23+
24+
@Test
25+
public void equalsIsTrueForSameNameAndValue() {
26+
ImageStoreDetailResponse a = new ImageStoreDetailResponse("key", "value");
27+
ImageStoreDetailResponse b = new ImageStoreDetailResponse("key", "value");
28+
Assert.assertEquals(a, b);
29+
Assert.assertEquals(a.hashCode(), b.hashCode());
30+
}
31+
32+
@Test
33+
public void equalsIsFalseWhenValueDiffers() {
34+
ImageStoreDetailResponse a = new ImageStoreDetailResponse("key", "value");
35+
ImageStoreDetailResponse c = new ImageStoreDetailResponse("key", "other");
36+
Assert.assertNotEquals(a, c);
37+
}
38+
39+
@Test
40+
public void equalsIsFalseWhenNameDiffers() {
41+
ImageStoreDetailResponse a = new ImageStoreDetailResponse("key", "value");
42+
ImageStoreDetailResponse d = new ImageStoreDetailResponse("other", "value");
43+
Assert.assertNotEquals(a, d);
44+
}
45+
}

0 commit comments

Comments
 (0)