Skip to content

Commit b97ef66

Browse files
committed
Merge remote-tracking branch 'apache/main' into fix-autoscalewinvm
2 parents aa21706 + a60c8ca commit b97ef66

File tree

377 files changed

+18255
-6294
lines changed

Some content is hidden

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

377 files changed

+18255
-6294
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ repos:
7575
name: run codespell
7676
description: Check spelling with codespell
7777
args: [--ignore-words=.github/linters/codespell.txt]
78-
exclude: ^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$
78+
exclude: ^systemvm/agent/noVNC/|^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$
7979
- repo: https://github.com/pycqa/flake8
8080
rev: 7.0.0
8181
hooks:

agent/conf/agent.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,6 @@ iscsi.session.cleanup.enabled=false
447447

448448
# Timeout (in seconds) to wait for the incremental snapshot to complete.
449449
# incremental.snapshot.timeout=10800
450+
451+
# If set to true, creates VMs as full clones of their templates on KVM hypervisor. Creates as linked clones otherwise.
452+
# create.full.clone=false

agent/src/main/java/com/cloud/agent/Agent.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,9 +968,11 @@ private Answer migrateAgentToOtherMS(final MigrateAgentConnectionCommand cmd) {
968968
if (CollectionUtils.isNotEmpty(cmd.getMsList())) {
969969
processManagementServerList(cmd.getMsList(), cmd.getAvoidMsList(), cmd.getLbAlgorithm(), cmd.getLbCheckInterval(), false);
970970
}
971-
Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("MigrateAgentConnection-Job")).schedule(() -> {
971+
ScheduledExecutorService migrateAgentConnectionService = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("MigrateAgentConnection-Job"));
972+
migrateAgentConnectionService.schedule(() -> {
972973
migrateAgentConnection(cmd.getAvoidMsList());
973974
}, 3, TimeUnit.SECONDS);
975+
migrateAgentConnectionService.shutdown();
974976
} catch (Exception e) {
975977
String errMsg = "Migrate agent connection failed, due to " + e.getMessage();
976978
logger.debug(errMsg, e);

agent/src/main/java/com/cloud/agent/properties/AgentProperties.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,14 @@ public Property<Integer> getWorkers() {
863863
* */
864864
public static final Property<Integer> REVERT_SNAPSHOT_TIMEOUT = new Property<>("revert.snapshot.timeout", 10800);
865865

866+
/**
867+
* If set to true, creates VMs as full clones of their templates on KVM hypervisor. Creates as linked clones otherwise. <br>
868+
* Data type: Boolean. <br>
869+
* Default value: <code>false</code>
870+
*/
871+
public static final Property<Boolean> CREATE_FULL_CLONE = new Property<>("create.full.clone", false);
872+
873+
866874
public static class Property <T>{
867875
private String name;
868876
private T defaultValue;

api/src/main/java/com/cloud/capacity/Capacity.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ public interface Capacity extends InternalIdentity, Identity {
3434
public static final short CAPACITY_TYPE_LOCAL_STORAGE = 9;
3535
public static final short CAPACITY_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET = 10;
3636
public static final short CAPACITY_TYPE_GPU = 19;
37+
public static final short CAPACITY_TYPE_OBJECT_STORAGE = 20;
38+
public static final short CAPACITY_TYPE_BACKUP_STORAGE = 21;
3739

3840
public static final short CAPACITY_TYPE_CPU_CORE = 90;
3941

4042
public static final List<Short> STORAGE_CAPACITY_TYPES = List.of(CAPACITY_TYPE_STORAGE,
4143
CAPACITY_TYPE_STORAGE_ALLOCATED,
4244
CAPACITY_TYPE_SECONDARY_STORAGE,
43-
CAPACITY_TYPE_LOCAL_STORAGE);
45+
CAPACITY_TYPE_LOCAL_STORAGE,
46+
CAPACITY_TYPE_BACKUP_STORAGE,
47+
CAPACITY_TYPE_OBJECT_STORAGE);
4448

4549
public Long getHostOrPoolId();
4650

api/src/main/java/com/cloud/event/EventTypes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,13 @@ public class EventTypes {
632632
public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE";
633633
public static final String EVENT_VM_BACKUP_RESTORE = "BACKUP.RESTORE";
634634
public static final String EVENT_VM_BACKUP_DELETE = "BACKUP.DELETE";
635+
public static final String EVENT_VM_BACKUP_OFFERING_REMOVED_AND_BACKUPS_DELETED = "BACKUP.OFFERING.BACKUPS.DEL";
635636
public static final String EVENT_VM_BACKUP_RESTORE_VOLUME_TO_VM = "BACKUP.RESTORE.VOLUME.TO.VM";
636637
public static final String EVENT_VM_BACKUP_SCHEDULE_CONFIGURE = "BACKUP.SCHEDULE.CONFIGURE";
637638
public static final String EVENT_VM_BACKUP_SCHEDULE_DELETE = "BACKUP.SCHEDULE.DELETE";
638639
public static final String EVENT_VM_BACKUP_USAGE_METRIC = "BACKUP.USAGE.METRIC";
639640
public static final String EVENT_VM_BACKUP_EDIT = "BACKUP.OFFERING.EDIT";
641+
public static final String EVENT_VM_CREATE_FROM_BACKUP = "VM.CREATE.FROM.BACKUP";
640642

641643
// external network device events
642644
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_ADD = "PHYSICAL.NVPCONTROLLER.ADD";

api/src/main/java/com/cloud/network/NetworkService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,5 +272,7 @@ Network createPrivateNetwork(String networkName, String displayText, long physic
272272

273273
boolean handleCksIsoOnNetworkVirtualRouter(Long virtualRouterId, boolean mount) throws ResourceUnavailableException;
274274

275+
IpAddresses getIpAddressesFromIps(String ipAddress, String ip6Address, String macAddress);
276+
275277
String getNicVlanValueForExternalVm(NicTO nic);
276278
}

api/src/main/java/com/cloud/offering/DiskOfferingInfo.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ public DiskOfferingInfo(DiskOffering diskOffering) {
3131
_diskOffering = diskOffering;
3232
}
3333

34+
public DiskOfferingInfo(DiskOffering diskOffering, Long size, Long minIops, Long maxIops) {
35+
_diskOffering = diskOffering;
36+
_size = size;
37+
_minIops = minIops;
38+
_maxIops = maxIops;
39+
}
40+
3441
public void setDiskOffering(DiskOffering diskOffering) {
3542
_diskOffering = diskOffering;
3643
}

api/src/main/java/com/cloud/storage/StorageService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public interface StorageService {
134134

135135
void removeSecondaryStorageHeuristic(RemoveSecondaryStorageSelectorCmd cmd);
136136

137-
ObjectStore discoverObjectStore(String name, String url, String providerName, Map details) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException;
137+
ObjectStore discoverObjectStore(String name, String url, Long size, String providerName, Map details) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException;
138138

139139
boolean deleteObjectStore(DeleteObjectStoragePoolCmd cmd);
140140

api/src/main/java/com/cloud/user/AccountService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ User createUser(String userName, String password, String firstName, String lastN
8787

8888
boolean isDomainAdmin(Long accountId);
8989

90+
boolean isResourceDomainAdmin(Long accountId);
91+
9092
boolean isNormalUser(long accountId);
9193

9294
User getActiveUserByRegistrationToken(String registrationToken);

0 commit comments

Comments
 (0)