vrouter in redundant mode acquire guest ips from first ip of the tier#3587
Conversation
add patch to stop random attribution of ip in a guest network for vrouter
|
@ArthurHlt you use redundant vrouter? which hypervisor? |
|
@svenvogel thanks for reaching me. yes we use redundant vrouter on xenserver hypervisors. |
|
@blueorangutan package |
|
@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-530 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-662 |
|
@ArthurHlt @rhtyd |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-764 |
|
@blueorangutan test |
|
@andrijapanicsb a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
@weizhouapache it's actually ip inside vpc tiers created by cloudstack when you set redundant mode. But maybe I missed something here |
@ArthurHlt when you create a vpc tier, the gateway ip can be any ip in the cidr (.1, .254, .XX). |
DaanHoogland
left a comment
There was a problem hiding this comment.
@ArthurHlt I can see how and why you want to change this behaviour but it is actually by design. A @weizhouapache describes we'll need a setting to steer the behaviour and prevent your patch for breaking other people's clouds. sorry, your code looks fine.
|
@DaanHoogland @weizhouapache That's all make sense to me. |
|
@ArthurHlt if you promise never to call me a gentleman again; in the |
|
Trillian test result (tid-928)
|
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-1025 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1213)
|
|
@weizhouapache can you give this a second look, please? |
|
|
||
| if (vpcRouterDeploymentDefinition.isRedundant()) { | ||
| guestNic.setIPv4Address(_ipAddrMgr.acquireGuestIpAddress(guestNetwork, null)); | ||
| guestNic.setIPv4Address(_ipAddrMgr.acquireFirstGuestIpAddress(guestNetwork)); |
There was a problem hiding this comment.
@ArthurHlt should acquireGuestIpAddressForVrouterRedundant be used here as well?
| if (routerDeploymentDefinition.isPublicNetwork()) { | ||
| if (routerDeploymentDefinition.isRedundant()) { | ||
| gatewayNic.setIPv4Address(_ipAddrMgr.acquireGuestIpAddress(guestNetwork, null)); | ||
| gatewayNic.setIPv4Address(_ipAddrMgr.acquireFirstGuestIpAddress(guestNetwork)); |
There was a problem hiding this comment.
@ArthurHlt should acquireGuestIpAddressForVrouterRedundant be used here ?
|
@weizhouapache thanks for the catch, i've totally forget it. I've reworked all enum and config that i've made to be able to retrieve configkey value in |
|
@weizhouapache thanks for the hint, this is a better way to handle this. What's your opinion now ? |
|
ping @weizhouapache - any chance to get it in today? |
|
@andrijapanicsb I will test it. |
|
@ArthurHlt can you remove some unused import ? |
|
@weizhouapache done ;) |
|
@andrijapanicsb tested with isolated networks and vpc with redundant VRs. both work fine. |
|
@blueorangutan package |
|
@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-1050 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
nothing outstanding, LGTM*2 and tested. let's merge when the monkey agrees. |
|
Will merge if tests are finished with no errors, despite the freeze date, as everything else is OK atm (manul test, approvals, no conflicts) |
|
Trillian test result (tid-1243)
|
Description
Vrouter in redundant mode actually acquire guest ips in a tier in a random mode.
This is painful when you use terraform or other systems to acquire specific IP because vrouter can take the one selected.
It looks like a bug more than an intended behaviour.
With this PR vrouter in redundant mode will now take first available ips in the tier which can be predicted
Types of changes
How Has This Been Tested?
This is tested against production which works great.
There is no unit test as it looks like there is no in this part of the code, it also not breaking anything and can be considered as a bug fix.