[
https://issues.apache.org/jira/browse/CLOUDSTACK-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15715111#comment-15715111
]
ASF GitHub Bot commented on CLOUDSTACK-9606:
--------------------------------------------
Github user rajesh-battala commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1775#discussion_r90640403
--- Diff: server/src/com/cloud/network/IpAddressManagerImpl.java ---
@@ -568,6 +573,11 @@ protected boolean cleanupIpResources(long ipId, long
userId, Account caller) {
success = false;
}
+ //Remove the tags corresponding to IP.
+ if(success) {
+ _resourceTagDao.removeByIdAndType(ipId,
ResourceTag.ResourceObjectType.PublicIpAddress);
+ }
+
--- End diff --
This extra line can be removed
> While IP address is released, tag are not deleted
> -------------------------------------------------
>
> Key: CLOUDSTACK-9606
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9606
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Priyank Parihar
> Assignee: Priyank Parihar
>
> IP address release API call (disassociateIpAddress) does not have any
> mechanism to remove the tags.
> All though the IP address is not allocated, corresponding tag still exists.
> REPRO STEPS
> ==================
> 1. Acquire an IP address by Domain-Admin account A.
> 2. Add tag to the target IP address by Domain-Admin account A.
> 3. Release the target IP address without deleting the tag.
> ⇒We found out that the state of the IP address is "Free" at this point,
> but the tag which added by Domain-Admin account A still remains.
> 4. Acquire the target IP address by Domain-Admin account B.
> ⇒The tag still remains without change.
> If account B tries to delete the tag, in our lab we can delete the tag as
> domain admin. Although customer reported that they can't complete it because
> of authority error.
> EXPECTED BEHAVIOR
> ==================
> When we release an IP address, the corresponding tags should be removed from
> related tables
> ACTUAL BEHAVIOR
> ==================
> When we release an IP address, the corresponding tags are not removed from
> related tables
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)