Skip to content

Commit d90ea61

Browse files
authored
Merge branch 'main' into fix-sysvmtempconfigchange-existtemp
2 parents ffc8f62 + b744824 commit d90ea61

File tree

226 files changed

+18921
-3171
lines changed

Some content is hidden

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

226 files changed

+18921
-3171
lines changed

.asf.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ github:
5151

5252
collaborators:
5353
- gpordeus
54-
- hsato03
55-
- abh1sar
56-
- RosiKyu
57-
- sudo87
5854
- erikbocks
5955
- Imvedansh
6056
- Damans227

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@
2020

2121
.pre-commit-config.yaml @jbampton
2222
/.github/linters/ @jbampton
23+
24+
/plugins/network-elements/nsx/ @Pearl1594 @nvazquez

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ jobs:
146146
smoke/test_vm_snapshot_kvm
147147
smoke/test_vm_snapshots
148148
smoke/test_volumes
149+
smoke/test_vpc_conserve_mode
149150
smoke/test_vpc_ipv6
150151
smoke/test_vpc_redundant
151152
smoke/test_vpc_router_nics

.github/workflows/merge-conflict-checker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
name: "PR Merge Conflict Check"
1919
on:
2020
push:
21-
pull_request_target:
22-
types: [synchronize]
21+
pull_request:
22+
types: [opened, synchronize, reopened]
2323

2424
permissions: # added using https://github.com/step-security/secure-workflows
2525
contents: read

api/src/main/java/com/cloud/configuration/ConfigurationService.java

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,18 @@
2424
import org.apache.cloudstack.api.ApiConstants;
2525
import org.apache.cloudstack.api.command.admin.config.ResetCfgCmd;
2626
import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
27+
import org.apache.cloudstack.api.command.admin.network.CloneNetworkOfferingCmd;
2728
import org.apache.cloudstack.api.command.admin.network.CreateGuestNetworkIpv6PrefixCmd;
2829
import org.apache.cloudstack.api.command.admin.network.CreateManagementNetworkIpRangeCmd;
29-
import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd;
3030
import org.apache.cloudstack.api.command.admin.network.DeleteGuestNetworkIpv6PrefixCmd;
3131
import org.apache.cloudstack.api.command.admin.network.DeleteManagementNetworkIpRangeCmd;
3232
import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd;
3333
import org.apache.cloudstack.api.command.admin.network.ListGuestNetworkIpv6PrefixesCmd;
34+
import org.apache.cloudstack.api.command.admin.network.NetworkOfferingBaseCmd;
3435
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd;
3536
import org.apache.cloudstack.api.command.admin.network.UpdatePodManagementNetworkIpRangeCmd;
37+
import org.apache.cloudstack.api.command.admin.offering.CloneDiskOfferingCmd;
38+
import org.apache.cloudstack.api.command.admin.offering.CloneServiceOfferingCmd;
3639
import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd;
3740
import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd;
3841
import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd;
@@ -105,6 +108,33 @@ public interface ConfigurationService {
105108
*/
106109
ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd);
107110

111+
/**
112+
* Clones a service offering with optional parameter overrides
113+
*
114+
* @param cmd
115+
* the command object that specifies the source offering ID and optional parameter overrides
116+
* @return the newly created service offering cloned from source, null otherwise
117+
*/
118+
ServiceOffering cloneServiceOffering(CloneServiceOfferingCmd cmd);
119+
120+
/**
121+
* Clones a disk offering with optional parameter overrides
122+
*
123+
* @param cmd
124+
* the command object that specifies the source offering ID and optional parameter overrides
125+
* @return the newly created disk offering cloned from source, null otherwise
126+
*/
127+
DiskOffering cloneDiskOffering(CloneDiskOfferingCmd cmd);
128+
129+
/**
130+
* Clones a network offering with optional parameter overrides
131+
*
132+
* @param cmd
133+
* the command object that specifies the source offering ID and optional parameter overrides
134+
* @return the newly created network offering cloned from source, null otherwise
135+
*/
136+
NetworkOffering cloneNetworkOffering(CloneNetworkOfferingCmd cmd);
137+
108138
/**
109139
* Updates a service offering
110140
*
@@ -282,7 +312,7 @@ Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOpera
282312

283313
boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd);
284314

285-
NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd);
315+
NetworkOffering createNetworkOffering(NetworkOfferingBaseCmd cmd);
286316

287317
NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd);
288318

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,9 @@ public class EventTypes {
298298
public static final String EVENT_REGISTER_CNI_CONFIG = "REGISTER.CNI.CONFIG";
299299
public static final String EVENT_DELETE_CNI_CONFIG = "DELETE.CNI.CONFIG";
300300

301-
//register for user API and secret keys
301+
//user API and secret keys
302302
public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY";
303+
public static final String EVENT_DELETE_SECRET_API_KEY = "DELETE.USER.KEY";
303304
public static final String API_KEY_ACCESS_UPDATE = "API.KEY.ACCESS.UPDATE";
304305

305306
// Template Events
@@ -374,11 +375,13 @@ public class EventTypes {
374375

375376
// Service Offerings
376377
public static final String EVENT_SERVICE_OFFERING_CREATE = "SERVICE.OFFERING.CREATE";
378+
public static final String EVENT_SERVICE_OFFERING_CLONE = "SERVICE.OFFERING.CLONE";
377379
public static final String EVENT_SERVICE_OFFERING_EDIT = "SERVICE.OFFERING.EDIT";
378380
public static final String EVENT_SERVICE_OFFERING_DELETE = "SERVICE.OFFERING.DELETE";
379381

380382
// Disk Offerings
381383
public static final String EVENT_DISK_OFFERING_CREATE = "DISK.OFFERING.CREATE";
384+
public static final String EVENT_DISK_OFFERING_CLONE = "DISK.OFFERING.CLONE";
382385
public static final String EVENT_DISK_OFFERING_EDIT = "DISK.OFFERING.EDIT";
383386
public static final String EVENT_DISK_OFFERING_DELETE = "DISK.OFFERING.DELETE";
384387

@@ -399,6 +402,7 @@ public class EventTypes {
399402

400403
// Network offerings
401404
public static final String EVENT_NETWORK_OFFERING_CREATE = "NETWORK.OFFERING.CREATE";
405+
public static final String EVENT_NETWORK_OFFERING_CLONE = "NETWORK.OFFERING.CLONE";
402406
public static final String EVENT_NETWORK_OFFERING_ASSIGN = "NETWORK.OFFERING.ASSIGN";
403407
public static final String EVENT_NETWORK_OFFERING_EDIT = "NETWORK.OFFERING.EDIT";
404408
public static final String EVENT_NETWORK_OFFERING_REMOVE = "NETWORK.OFFERING.REMOVE";
@@ -598,6 +602,7 @@ public class EventTypes {
598602

599603
// VPC offerings
600604
public static final String EVENT_VPC_OFFERING_CREATE = "VPC.OFFERING.CREATE";
605+
public static final String EVENT_VPC_OFFERING_CLONE = "VPC.OFFERING.CLONE";
601606
public static final String EVENT_VPC_OFFERING_UPDATE = "VPC.OFFERING.UPDATE";
602607
public static final String EVENT_VPC_OFFERING_DELETE = "VPC.OFFERING.DELETE";
603608

@@ -630,6 +635,7 @@ public class EventTypes {
630635

631636
// Backup and Recovery events
632637
public static final String EVENT_VM_BACKUP_IMPORT_OFFERING = "BACKUP.IMPORT.OFFERING";
638+
public static final String EVENT_VM_BACKUP_OFFERING_CLONE = "BACKUP.OFFERING.CLONE";
633639
public static final String EVENT_VM_BACKUP_OFFERING_ASSIGN = "BACKUP.OFFERING.ASSIGN";
634640
public static final String EVENT_VM_BACKUP_OFFERING_REMOVE = "BACKUP.OFFERING.REMOVE";
635641
public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE";
@@ -1045,11 +1051,13 @@ public class EventTypes {
10451051

10461052
// Service Offerings
10471053
entityEventDetails.put(EVENT_SERVICE_OFFERING_CREATE, ServiceOffering.class);
1054+
entityEventDetails.put(EVENT_SERVICE_OFFERING_CLONE, ServiceOffering.class);
10481055
entityEventDetails.put(EVENT_SERVICE_OFFERING_EDIT, ServiceOffering.class);
10491056
entityEventDetails.put(EVENT_SERVICE_OFFERING_DELETE, ServiceOffering.class);
10501057

10511058
// Disk Offerings
10521059
entityEventDetails.put(EVENT_DISK_OFFERING_CREATE, DiskOffering.class);
1060+
entityEventDetails.put(EVENT_DISK_OFFERING_CLONE, DiskOffering.class);
10531061
entityEventDetails.put(EVENT_DISK_OFFERING_EDIT, DiskOffering.class);
10541062
entityEventDetails.put(EVENT_DISK_OFFERING_DELETE, DiskOffering.class);
10551063

@@ -1070,6 +1078,7 @@ public class EventTypes {
10701078

10711079
// Network offerings
10721080
entityEventDetails.put(EVENT_NETWORK_OFFERING_CREATE, NetworkOffering.class);
1081+
entityEventDetails.put(EVENT_NETWORK_OFFERING_CLONE, NetworkOffering.class);
10731082
entityEventDetails.put(EVENT_NETWORK_OFFERING_ASSIGN, NetworkOffering.class);
10741083
entityEventDetails.put(EVENT_NETWORK_OFFERING_EDIT, NetworkOffering.class);
10751084
entityEventDetails.put(EVENT_NETWORK_OFFERING_REMOVE, NetworkOffering.class);

api/src/main/java/com/cloud/kubernetes/cluster/KubernetesCluster.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ enum State {
9898
s_fsm.addTransition(State.Running, Event.ScaleDownRequested, State.Scaling);
9999
s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, State.ScalingStoppedCluster);
100100
s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running);
101-
s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Alert);
101+
s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Running);
102102
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationSucceeded, State.Stopped);
103103
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationFailed, State.Alert);
104104

api/src/main/java/com/cloud/kubernetes/cluster/KubernetesServiceHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import org.apache.cloudstack.acl.ControlledEntity;
2020

21+
import java.util.List;
2122
import java.util.Map;
2223

2324
import com.cloud.user.Account;
@@ -33,8 +34,10 @@ enum KubernetesClusterNodeType {
3334
ControlledEntity findByUuid(String uuid);
3435
ControlledEntity findByVmId(long vmId);
3536
void checkVmCanBeDestroyed(UserVm userVm);
37+
void checkVmAffinityGroupsCanBeUpdated(UserVm userVm);
3638
boolean isValidNodeType(String nodeType);
3739
Map<String, Long> getServiceOfferingNodeTypeMap(Map<String, Map<String, String>> serviceOfferingNodeTypeMap);
3840
Map<String, Long> getTemplateNodeTypeMap(Map<String, Map<String, String>> templateNodeTypeMap);
41+
Map<String, List<Long>> getAffinityGroupNodeTypeMap(Map<String, Map<String, String>> affinityGroupNodeTypeMap);
3942
void cleanupForAccount(Account account);
4043
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,6 @@ Network createPrivateNetwork(String networkName, String displayText, long physic
279279
IpAddresses getIpAddressesFromIps(String ipAddress, String ip6Address, String macAddress);
280280

281281
String getNicVlanValueForExternalVm(NicTO nic);
282+
283+
Long getPreferredNetworkIdForPublicIpRuleAssignment(IpAddress ip, Long networkId);
282284
}

api/src/main/java/com/cloud/network/lb/LoadBalancingRulesService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ LoadBalancer createPublicLoadBalancerRule(String xId, String name, String descri
108108
/**
109109
* Assign a virtual machine or list of virtual machines, or Map of <vmId vmIp> to a load balancer.
110110
*/
111-
boolean assignToLoadBalancer(long lbRuleId, List<Long> vmIds, Map<Long, List<String>> vmIdIpMap, boolean isAutoScaleVM);
111+
boolean assignToLoadBalancer(long lbRuleId, List<Long> vmIds, Map<Long, List<String>> vmIdIpMap, Map<Long, Long> vmIdNetworkMap, boolean isAutoScaleVM);
112112

113113
boolean assignSSLCertToLoadBalancerRule(Long lbRuleId, String certName, String publicCert, String privateKey);
114114

0 commit comments

Comments
 (0)