You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by niteshsarda <gi...@git.apache.org> on 2017/02/25 05:47:05 UTC
[GitHub] cloudstack pull request #1972: CLOUDSTACK-9779 : Releasing secondary guest I...
GitHub user niteshsarda opened a pull request:
https://github.com/apache/cloudstack/pull/1972
CLOUDSTACK-9779 : Releasing secondary guest IP fails with error VM nic Ip x.x.x.x is mapped to load balancing rule
ISSUE
Releasing secondary guest IP fails with error VM nic Ip x.x.x.x is mapped to load balancing rule
REPRO STEPS
Create two isolated guest networks with same CIDR
Deploy VMs on both networks
Acquire secondary IP on NICs of both VMs and make sure they have the same value, user can input the IP address.
Configure Loadbalancing rule on one of the secondary IP address and try releasing the other secondary IP address.
The operation would fail
EXPECTED BEHAVIOR
Secondary IP address should be released if there are no LB rules associated with it.
ACTUAL BEHAVIOR
Not releasing secondary IP address even if there are no LB rules associated with it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Accelerite/cloudstack ReleaseSecondaryIP
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1972.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1972
----
commit 2362335662085a5f23570fb7bdc90a8409add38c
Author: Nitesh Sarda <ni...@accelerite.com>
Date: 2017-02-24T13:40:29Z
CLOUDSTACK-9779 : Releasing secondary guest IP fails with error VM nic Ip x.x.x.x is mapped to load balancing rule
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1972: CLOUDSTACK-9779 : Releasing secondary guest I...
Posted by niteshsarda <gi...@git.apache.org>.
Github user niteshsarda closed the pull request at:
https://github.com/apache/cloudstack/pull/1972
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1972: CLOUDSTACK-9779 : Releasing secondary guest I...
Posted by niteshsarda <gi...@git.apache.org>.
Github user niteshsarda commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1972#discussion_r103190716
--- Diff: engine/schema/src/com/cloud/network/dao/LoadBalancerDao.java ---
@@ -29,4 +30,6 @@
List<LoadBalancerVO> listInTransitionStateByNetworkIdAndScheme(long networkId, Scheme scheme);
+ boolean isLoadBalancerRulesMappedToVmGuestIp(long instanceId, String instanceIp, long networkId, FirewallRule.Purpose purpose);
--- End diff --
@SudharmaJain : As per suggestion, removed Purpose parameter from method signature and added directly in the SearchBuilder.
Please check.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1972: CLOUDSTACK-9779 : Releasing secondary guest IP fails...
Posted by SudharmaJain <gi...@git.apache.org>.
Github user SudharmaJain commented on the issue:
https://github.com/apache/cloudstack/pull/1972
@niteshsarda I don't see any change in file createNetworkOffering.xml, but still there are many lines being removed and added. As there is not change in this file, please revert.
Also the marvin test case seems as the complete file was edited, even the license header. Please add only the changes that are relevant.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1972: CLOUDSTACK-9779 : Releasing secondary guest IP fails...
Posted by niteshsarda <gi...@git.apache.org>.
Github user niteshsarda commented on the issue:
https://github.com/apache/cloudstack/pull/1972
@SudharmaJain Can you please check new PR for this issue. Also, I have implemented the changes which you have suggested.
PR link :
#1978
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1972: CLOUDSTACK-9779 : Releasing secondary guest I...
Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1972#discussion_r103072546
--- Diff: engine/schema/src/com/cloud/network/dao/LoadBalancerDaoImpl.java ---
@@ -75,4 +84,40 @@ protected LoadBalancerDaoImpl() {
return listBy(sc);
}
+ @Override
+ public boolean isLoadBalancerRulesMappedToVmGuestIp(long instanceId, String instanceIp, long networkId, FirewallRule.Purpose purpose)
+ {
+ SearchBuilder<LoadBalancerVMMapVO> lbVmMapSearch = _loadBalancerVMMapDao.createSearchBuilder();
+ lbVmMapSearch.and("instanceIp", lbVmMapSearch.entity().getInstanceIp(),SearchCriteria.Op.EQ);
+ lbVmMapSearch.and("instanceId", lbVmMapSearch.entity().getInstanceId(), SearchCriteria.Op.EQ);
+
+ SearchBuilder<FirewallRuleVO> firewallRuleIdSearch = _firewallRulesDao.createSearchBuilder();
--- End diff --
You might know LoadBalancerVO extends FirewallRuleVO, you can use LoadBalancerVO instead.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1972: CLOUDSTACK-9779 : Releasing secondary guest I...
Posted by SudharmaJain <gi...@git.apache.org>.
Github user SudharmaJain commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1972#discussion_r103159426
--- Diff: engine/schema/src/com/cloud/network/dao/LoadBalancerDao.java ---
@@ -29,4 +30,6 @@
List<LoadBalancerVO> listInTransitionStateByNetworkIdAndScheme(long networkId, Scheme scheme);
+ boolean isLoadBalancerRulesMappedToVmGuestIp(long instanceId, String instanceIp, long networkId, FirewallRule.Purpose purpose);
--- End diff --
@niteshsarda You don't need the purpose parameter here, as the implementation is specific for firewall rules. While setting the parameter with SearchBuilder the value can be set as Purpose.LoadBalancing.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1972: CLOUDSTACK-9779 : Releasing secondary guest IP fails...
Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:
https://github.com/apache/cloudstack/pull/1972
code LGTM
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1972: CLOUDSTACK-9779 : Releasing secondary guest I...
Posted by niteshsarda <gi...@git.apache.org>.
Github user niteshsarda commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1972#discussion_r103138362
--- Diff: engine/schema/src/com/cloud/network/dao/LoadBalancerDaoImpl.java ---
@@ -75,4 +84,40 @@ protected LoadBalancerDaoImpl() {
return listBy(sc);
}
+ @Override
+ public boolean isLoadBalancerRulesMappedToVmGuestIp(long instanceId, String instanceIp, long networkId, FirewallRule.Purpose purpose)
+ {
+ SearchBuilder<LoadBalancerVMMapVO> lbVmMapSearch = _loadBalancerVMMapDao.createSearchBuilder();
+ lbVmMapSearch.and("instanceIp", lbVmMapSearch.entity().getInstanceIp(),SearchCriteria.Op.EQ);
+ lbVmMapSearch.and("instanceId", lbVmMapSearch.entity().getInstanceId(), SearchCriteria.Op.EQ);
+
+ SearchBuilder<FirewallRuleVO> firewallRuleIdSearch = _firewallRulesDao.createSearchBuilder();
--- End diff --
@ustcweizhou : As per suggestion, I have made changes. Please check.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1972: CLOUDSTACK-9779 : Releasing secondary guest IP fails...
Posted by niteshsarda <gi...@git.apache.org>.
Github user niteshsarda commented on the issue:
https://github.com/apache/cloudstack/pull/1972
@ustcweizhou : Can you please check new PR for this issue and provide LGTM on that PR.
PR link :
https://github.com/apache/cloudstack/pull/1978
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---