Skip to content

Commit e240af0

Browse files
committed
Merge remote-tracking branch 'origin/main' into new-native-backup-provider
2 parents 321c84d + a503a52 commit e240af0

430 files changed

Lines changed: 44171 additions & 1958 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/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
/plugins/storage/volume/linstor @rp-
1919
/plugins/storage/volume/storpool @slavkap
20-
/plugins/storage/volume/ontap @rajiv1 @sandeeplocharla @piyush5 @suryag
20+
/plugins/storage/volume/ontap @rajiv-jain-netapp @sandeeplocharla @piyush5netapp @suryag1201
2121

2222
.pre-commit-config.yaml @jbampton
2323
/.github/linters/ @jbampton

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717

1818
name: Build
1919
on:
20-
- push
21-
- pull_request
20+
push:
21+
branches:
22+
- main
23+
- 4.22
24+
- 4.20
25+
pull_request:
2226
concurrency:
2327
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2428
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717

1818
name: Simulator CI
1919
on:
20-
- push
21-
- pull_request
20+
push:
21+
branches:
22+
- main
23+
- 4.22
24+
- 4.20
25+
pull_request:
2226
concurrency:
2327
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2428
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

.github/workflows/rat.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717

1818
name: License Check
1919
on:
20-
- push
21-
- pull_request
20+
push:
21+
branches:
22+
- main
23+
- 4.22
24+
- 4.20
25+
pull_request:
2226
concurrency:
2327
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2428
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

.github/workflows/ui.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717

1818
name: UI Build
1919

20-
on: [push, pull_request]
20+
on:
21+
push:
22+
branches:
23+
- main
24+
- 4.22
25+
- 4.20
26+
pull_request:
2127

2228
concurrency:
2329
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

agent/conf/agent.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ iscsi.session.cleanup.enabled=false
316316
#vm.migrate.domain.retrieve.timeout=10
317317

318318
# This parameter specifies if the host must be rebooted when something goes wrong with the heartbeat.
319-
#reboot.host.and.alert.management.on.heartbeat.timeout=true
319+
#reboot.host.and.alert.management.on.heartbeat.timeout=false
320320

321321
# Enables manually setting CPU's topology on KVM's VM.
322322
#enable.manually.setting.cpu.topology.on.kvm.vm=true

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,10 @@ public class AgentProperties{
617617
/**
618618
* This parameter specifies if the host must be rebooted when something goes wrong with the heartbeat.<br>
619619
* Data type: Boolean.<br>
620-
* Default value: <code>true</code>
620+
* Default value: <code>false</code>
621621
*/
622622
public static final Property<Boolean> REBOOT_HOST_AND_ALERT_MANAGEMENT_ON_HEARTBEAT_TIMEOUT
623-
= new Property<>("reboot.host.and.alert.management.on.heartbeat.timeout", true);
623+
= new Property<>("reboot.host.and.alert.management.on.heartbeat.timeout", false);
624624

625625
/**
626626
* Enables manually setting CPU's topology on KVM's VM. <br>
@@ -938,6 +938,21 @@ public Property<Integer> getWorkers() {
938938
* */
939939
public static final Property<Integer> INCREMENTAL_SNAPSHOT_RETRY_REBASE_WAIT = new Property<>("incremental.snapshot.retry.rebase.wait", 60);
940940

941+
/**
942+
* When set to <code>true</code>, executes <code>modifymacip.sh</code> (resolved via the
943+
* network scripts directory) on VM NIC plug (VM start) and unplug (VM stop) to manage static
944+
* ARP/NDP entries and host routes for VM interfaces.<br>
945+
* The script is invoked with:<br>
946+
* &nbsp;&nbsp;add: <code>-o add -b &lt;bridge&gt; -m &lt;mac&gt; [-4 &lt;ipv4&gt;] [-6 &lt;ipv6&gt;]</code><br>
947+
* &nbsp;&nbsp;delete: <code>-o delete -b &lt;bridge&gt; -m &lt;mac&gt;</code><br>
948+
* A bundled reference implementation is available at
949+
* <code>scripts/vm/network/vnet/modifymacip.sh</code>.<br>
950+
* Set to <code>false</code> or leave unset to disable this feature.<br>
951+
* Data type: Boolean.<br>
952+
* Default value: <code>false</code>
953+
*/
954+
public static final Property<Boolean> VM_NETWORK_MACIP_STATIC = new Property<>("vm.network.macip.static", false, Boolean.class);
955+
941956

942957
/**
943958
* Maximum number of backup validation jobs that can be executed at the same time. Values lower than 0 remove the limit, meaning that as many validations as possible will be done at

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
import org.apache.cloudstack.backup.BackupRepositoryService;
3131
import org.apache.cloudstack.config.Configuration;
3232
import org.apache.cloudstack.datacenter.DataCenterIpv4GuestSubnet;
33+
import org.apache.cloudstack.dns.DnsRecord;
34+
import org.apache.cloudstack.dns.DnsServer;
35+
import org.apache.cloudstack.dns.DnsZone;
3336
import org.apache.cloudstack.extension.Extension;
3437
import org.apache.cloudstack.extension.ExtensionCustomAction;
3538
import org.apache.cloudstack.gpu.GpuCard;
@@ -873,6 +876,7 @@ public class EventTypes {
873876
public static final String EVENT_EXTENSION_DELETE = "EXTENSION.DELETE";
874877
public static final String EVENT_EXTENSION_RESOURCE_REGISTER = "EXTENSION.RESOURCE.REGISTER";
875878
public static final String EVENT_EXTENSION_RESOURCE_UNREGISTER = "EXTENSION.RESOURCE.UNREGISTER";
879+
public static final String EVENT_EXTENSION_RESOURCE_UPDATE = "EXTENSION.RESOURCE.UPDATE";
876880
public static final String EVENT_EXTENSION_CUSTOM_ACTION_ADD = "EXTENSION.CUSTOM.ACTION.ADD";
877881
public static final String EVENT_EXTENSION_CUSTOM_ACTION_UPDATE = "EXTENSION.CUSTOM.ACTION.UPDATE";
878882
public static final String EVENT_EXTENSION_CUSTOM_ACTION_DELETE = "EXTENSION.CUSTOM.ACTION.DELETE";
@@ -884,6 +888,17 @@ public class EventTypes {
884888
public static final String EVENT_BACKUP_REPOSITORY_ADD = "BACKUP.REPOSITORY.ADD";
885889
public static final String EVENT_BACKUP_REPOSITORY_UPDATE = "BACKUP.REPOSITORY.UPDATE";
886890

891+
// DNS Framework Events
892+
public static final String EVENT_DNS_SERVER_ADD = "DNS.SERVER.ADD";
893+
public static final String EVENT_DNS_SERVER_UPDATE = "DNS.SERVER.UPDATE";
894+
public static final String EVENT_DNS_SERVER_DELETE = "DNS.SERVER.DELETE";
895+
public static final String EVENT_DNS_ZONE_CREATE = "DNS.ZONE.CREATE";
896+
public static final String EVENT_DNS_ZONE_UPDATE = "DNS.ZONE.UPDATE";
897+
public static final String EVENT_DNS_ZONE_DELETE = "DNS.ZONE.DELETE";
898+
public static final String EVENT_DNS_RECORD_CREATE = "DNS.RECORD.CREATE";
899+
public static final String EVENT_DNS_RECORD_DELETE = "DNS.RECORD.DELETE";
900+
public static final String EVENT_DNS_NAME_COLLISION = "DNS.NAME.COLLISION";
901+
887902
static {
888903

889904
// TODO: need a way to force author adding event types to declare the entity details as well, with out braking
@@ -1442,6 +1457,17 @@ public class EventTypes {
14421457
// Backup Repository
14431458
entityEventDetails.put(EVENT_BACKUP_REPOSITORY_ADD, BackupRepositoryService.class);
14441459
entityEventDetails.put(EVENT_BACKUP_REPOSITORY_UPDATE, BackupRepositoryService.class);
1460+
1461+
// DNS Framework Events
1462+
entityEventDetails.put(EVENT_DNS_SERVER_ADD, DnsServer.class);
1463+
entityEventDetails.put(EVENT_DNS_SERVER_UPDATE, DnsServer.class);
1464+
entityEventDetails.put(EVENT_DNS_SERVER_DELETE, DnsServer.class);
1465+
entityEventDetails.put(EVENT_DNS_ZONE_CREATE, DnsZone.class);
1466+
entityEventDetails.put(EVENT_DNS_ZONE_UPDATE, DnsZone.class);
1467+
entityEventDetails.put(EVENT_DNS_ZONE_DELETE, DnsZone.class);
1468+
entityEventDetails.put(EVENT_DNS_RECORD_CREATE, DnsRecord.class);
1469+
entityEventDetails.put(EVENT_DNS_RECORD_DELETE, DnsRecord.class);
1470+
14451471
}
14461472

14471473
public static boolean isNetworkEvent(String eventType) {

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class Service {
116116
public static final Service NetworkACL = new Service("NetworkACL", Capability.SupportedProtocols);
117117
public static final Service Connectivity = new Service("Connectivity", Capability.DistributedRouter, Capability.RegionLevelVpc, Capability.StretchedL2Subnet,
118118
Capability.NoVlan, Capability.PublicAccess);
119+
public static final Service CustomAction = new Service("CustomAction");
119120

120121
private final String name;
121122
private final Capability[] caps;
@@ -207,6 +208,7 @@ public static class Provider {
207208

208209
public static final Provider Nsx = new Provider("Nsx", false);
209210
public static final Provider Netris = new Provider("Netris", false);
211+
public static final Provider NetworkExtension = new Provider("NetworkExtension", false, true);
210212

211213
private final String name;
212214
private final boolean isExternal;
@@ -250,11 +252,47 @@ public static Provider getProvider(String providerName) {
250252
return null;
251253
}
252254

255+
/** Private constructor for transient (non-registered) providers. */
256+
private Provider(String name) {
257+
this.name = name;
258+
this.isExternal = false;
259+
this.needCleanupOnShutdown = true;
260+
// intentionally NOT added to supportedProviders
261+
}
262+
263+
/**
264+
* Creates a transient (non-registered) {@link Provider} with the given name.
265+
*
266+
* <p>The new instance is <em>not</em> added to {@code supportedProviders}, so it
267+
* will never be returned by {@link #getProvider(String)} and will not pollute the
268+
* global provider registry. Use this for dynamic / extension-backed providers
269+
* whose names are only known at runtime (e.g. NetworkOrchestrator extensions).</p>
270+
*
271+
* @param name the provider name (typically the extension name)
272+
* @return a transient {@link Provider} instance with the given name
273+
*/
274+
public static Provider createTransientProvider(String name) {
275+
return new Provider(name);
276+
}
277+
253278
@Override public String toString() {
254279
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
255280
.append("name", name)
256281
.toString();
257282
}
283+
284+
@Override
285+
public boolean equals(Object obj) {
286+
if (this == obj) return true;
287+
if (!(obj instanceof Provider)) return false;
288+
Provider provider = (Provider) obj;
289+
return this.name.equals(provider.name);
290+
}
291+
292+
@Override
293+
public int hashCode() {
294+
return name.hashCode();
295+
}
258296
}
259297

260298
public static class Capability {

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ public interface NetworkModel {
187187

188188
boolean canElementEnableIndividualServices(Provider provider);
189189

190+
boolean canElementEnableIndividualServicesByName(String providerName);
191+
190192
boolean areServicesSupportedInNetwork(long networkId, Service... services);
191193

192194
boolean isNetworkSystem(Network network);
@@ -237,6 +239,18 @@ public interface NetworkModel {
237239

238240
String getDefaultGuestTrafficLabel(long dcId, HypervisorType vmware);
239241

242+
/**
243+
* Resolves a provider name to a {@link Provider} instance.
244+
* For known static providers, delegates to {@link Provider#getProvider(String)}.
245+
* For dynamically-registered NetworkOrchestrator extension providers whose names
246+
* are not in the static registry, returns a transient {@link Provider} with the
247+
* given name so callers can still dispatch correctly.
248+
*
249+
* @param providerName the provider name from {@code ntwk_service_map} or similar
250+
* @return a {@link Provider} instance, or {@code null} if not resolvable
251+
*/
252+
Provider resolveProvider(String providerName);
253+
240254
/**
241255
* @param providerName
242256
* @return

0 commit comments

Comments
 (0)