You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sh...@apache.org on 2022/08/19 12:58:57 UTC
[cloudstack] branch 4.17 updated: server: remove resource tags for disassociated public ip (#6642)
This is an automated email from the ASF dual-hosted git repository.
shwstppr pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.17 by this push:
new 44e600e2fc8 server: remove resource tags for disassociated public ip (#6642)
44e600e2fc8 is described below
commit 44e600e2fc84d088672964a5b969ba0792dd73a2
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Fri Aug 19 18:28:51 2022 +0530
server: remove resource tags for disassociated public ip (#6642)
Fixes #6620
Remove resource tags when public IP is disassociated
---
server/src/main/java/com/cloud/network/NetworkServiceImpl.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
index a3a3e4d9702..39752e64a6b 100644
--- a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
@@ -1101,6 +1101,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
boolean success = _ipAddrMgr.disassociatePublicIpAddress(ipAddressId, userId, caller);
if (success) {
+ _resourceTagDao.removeByIdAndType(ipAddressId, ResourceObjectType.PublicIpAddress);
if (guestNetwork != null) {
NetworkOffering offering = _entityMgr.findById(NetworkOffering.class, guestNetwork.getNetworkOfferingId());
Long vmId = ipVO.getAssociatedWithVmId();