You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pe...@apache.org on 2025/11/05 17:22:57 UTC
(cloudstack) 01/01: Clear System VM IP from NICs for PublicNetworkGuru
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a commit to branch cleanup-public-nics-sys-vms
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 82a5e357094dbfc8bf8c3cfcfe83f2310d915a7a
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Wed Nov 5 12:22:43 2025 -0500
Clear System VM IP from NICs for PublicNetworkGuru
---
.../cloudstack/engine/orchestration/NetworkOrchestrator.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index ae07c4c7bc4..31d96f3cbb5 100644
--- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -2326,7 +2326,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
for (final NetworkElement element : networkElements) {
if (providersToImplement.contains(element.getProvider())) {
if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) {
- throw new CloudRuntimeException(String.format("Service provider %s either doesn't exist or is not enabled in physical network: %s", element.getProvider().getName(), _physicalNetworkDao.findById(network.getPhysicalNetworkId())));
+ throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + " either doesn't exist or is not enabled in physical network id: "
+ + network.getPhysicalNetworkId());
}
if (element instanceof NetworkMigrationResponder) {
if (!((NetworkMigrationResponder) element).prepareMigration(profile, network, vm, dest, context)) {
@@ -2633,6 +2634,10 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName());
guru.deallocate(network, profile, vm);
+ if (nic.getReservationStrategy() == Nic.ReservationStrategy.Create) {
+ applyProfileToNicForRelease(nic, profile);
+ _nicDao.update(nic.getId(), nic);
+ }
if (BooleanUtils.isNotTrue(preserveNics)) {
_nicDao.remove(nic.getId());
}