-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLOUDSTACK-9287 - Fix unique mac address per rVPC router #1483
Conversation
… nic profile exists
…ace/mac address issues
…rom a certain router - In case of redundant VPCs, the ACL items are revoked in the first iteration. Since the econd iteration is needed in order to remove the private network, we have to check if the nic profile is gone before trying to revoke the ACL items again, which would throw a NPE. - Some variable extraction in order to ease debugging.
- This also refactors the CsAddress in order to offer better readability in a couple of methods.
@@ -466,7 +466,7 @@ public boolean deletePrivateGateway(final PrivateGateway gateway) throws Concurr | |||
} | |||
} | |||
|
|||
return result > 0 ? true : false; | |||
return result == routers.size() ? true : false; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is equivallent to
return result == routers.size();
please take the ternary operator away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexandrelimassantana This code is not very new, please write a little pull request to that extend. (also the issue that you quite justly pointed out is there in the old code as well and bears no weight on the validity of this PR)
@alexandrelimassantana please make a pull request to the branch that the PR is created from, Remi can include you change in this one by pulling it to his branch. |
Is this exactly the same PR as the one Wilder closed last week, or does it have some changes in it? Also, there are some comments from @dsclose added after the old PR was closed regarding some potential gotchas. See #1413 (comment) I agree that this (along with the additional fixes proposed above) need to get in to the next release.
|
I'm currently working on CLOUDSTACK-9339 to resolve the issues that I mentioned in #1413 - I don't think this PR breaks anything that currently works so CLOUDSTACK-9339 probably shouldn't hold this PR up. Dean |
ffd8fdb
to
799b9f2
Compare
@swill force pushed |
@remibergsma please squash changes to a single commit, and push -f tag:needlove |
CI RESULTS
Summary of the problem(s):
Associated Uploads
Uploads will be available until Comment created by |
I need some code review on this one. Thanks... |
LGTM did a code walk through and I know of a production install this code is running in. |
Can I get one more review on this one? |
I tested this in our 4.8 HW Lab and it worked as expected. I found the MASTER VR for a TEST VPC with a private gateway configured. I started a ping to the private gateway from an instance. Finally I ran virsh destroy against r-XX-VM and only dropped a few pings before the private gateway was moved to the new VR. LGTM |
CLOUDSTACK-9287 - Fix unique mac address per rVPC routerThis is work by @wilderrodrigues, see PR #1413 It contains important fixes and I think it needs to be included so I send the PR again. * pr/1483: CLOUDSTACK-9287 - Improve test by checking if pvt gw is removed and fix typos CLOUDSTACK-9287 - Fix RVR public interface CLOUDSTACK-9287 - Add integration test to cover the private gateway related changes CLOUDSTACK-9287 - Refactor the interface state configuration CLOUDSTACK-9287 - Check if the nic profile has already been removed from a certain router CLOUDSTACK-9287 - Bring up the private gw interface on state change to master CLOUDSTACK-9287 - Make sure private gw interface is not used for default gw CLOUDSTACK-9287 - Add integration test to cover the private gw interface/mac address issues CLOUDSTACK-9287 - Put private gateway interface down on backup router CLOUDSTACK-9287 - Generate new mac address if router is redundant and nic profile exists Signed-off-by: Will Stevens <[email protected]>
CLOUDSTACK-9287 - Fix unique mac address per rVPC routerThis is work by @wilderrodrigues, see PR apache#1413 It contains important fixes and I think it needs to be included so I send the PR again. * pr/1483: CLOUDSTACK-9287 - Improve test by checking if pvt gw is removed and fix typos CLOUDSTACK-9287 - Fix RVR public interface CLOUDSTACK-9287 - Add integration test to cover the private gateway related changes CLOUDSTACK-9287 - Refactor the interface state configuration CLOUDSTACK-9287 - Check if the nic profile has already been removed from a certain router CLOUDSTACK-9287 - Bring up the private gw interface on state change to master CLOUDSTACK-9287 - Make sure private gw interface is not used for default gw CLOUDSTACK-9287 - Add integration test to cover the private gw interface/mac address issues CLOUDSTACK-9287 - Put private gateway interface down on backup router CLOUDSTACK-9287 - Generate new mac address if router is redundant and nic profile exists Signed-off-by: Will Stevens <[email protected]> Conflicts: server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
This is work by @wilderrodrigues, see PR #1413 It contains important fixes and I think it needs to be included so I send the PR again.