-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CLOUDSTACK-9339 Virtual Routers don't handle Multiple Public Interfaces correctly #1659
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-9339 Virtual Routers don't handle Multiple Public Interfaces correctly #1659
Conversation
| "-A PREROUTING -s %s/32 -m state --state NEW -j MARK --set-xmark 0x%s/0xffffffff" % \ | ||
| (rule["internal_ip"], device[len("eth"):])]) | ||
| self.fw.append(["mangle", "", | ||
| "-A PREROUTING -s %s/32 -m state --state NEW -j CONNMARK --save-mark --nfmask 0xffffffff --ctmask 0xffffffff" % \ |
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.
Is there value in extracting the 0xffffffff to a constant?
|
@murali-reddy - thank you for picking this up. Let me know when you think it's appropriate to close PR #1519 and I shall do so. |
|
@dsclose what is your opinion of the changes in this PR relative to your work? Do you see any gaps or missing pieces? |
|
@murali-reddy Looking through the Marvin tests, there is a lot of boilerplate code and duplicated setup in test cases. It feels like there is an opportunity to introduce one or more base classes that would not only reduce the duplication/boilerplate, but make building future VR test cases easier. Do you agree? |
|
@murali-reddy what is the status of addressing the review feedback. Also, have addressed the VPC-related issues as well? |
|
@blueorangutan package |
|
@murali-reddy a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-20 |
|
@blueorangutan test |
|
@murali-reddy a Trillian-Jenkins test job (centos7 mgmt + vmware-55u3) has been kicked to run smoke tests |
|
Trillian test result (#21)
|
|
@murali-reddy 8 errors occurred in the VMware test run. Could you please investigate these failures? |
|
@jburwell i am investigating them. Just so you know, blueorangutan is running full smoke test suite. Similar failures are seen in other PR as well. So some of the tests may have been failing for some time and need to be fixed. From the above list of failures test_router_dhcphosts are due to test errors that is being addressed by #1683 I have addressed below two test failures. support for internal LB was not added in the logic creating ips.json databag, I made a fix for that as well. test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 rest of the failures i am investigating if they are regressions, and test failures. |
|
@murali-reddy FYI |
|
@ustcweizhou thanks, i have fixed it earlier today and tested, am trying to fix other test failures and re-run the CI |
|
|
||
|
|
||
| firewall_rule.delete(self.apiclient) | ||
|
|
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.
I think creating and validating a firewall rule can be moved to net utility class, as this has possibilities to be reused.
|
@blueorangutan test centos7 xenserver-65sp1 |
|
@jburwell a Trillian-Jenkins test job (centos7 mgmt + xenserver-65sp1) has been kicked to run smoke tests |
|
Trillian test result (tid-533)
|
|
Trillian test result (tid-532)
|
|
Test lgtm, @murali-reddy are we good on this PR? I'm seeing some failures though not sure if they related to your changes. /cc @jburwell @abhinandanprateek |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@murali-reddy @abhinandanprateek let me know any help needed from my end? |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-323 |
|
@blueorangutan test matrix |
|
@rhtyd a Trillian-Jenkins matrix job (centos6 mgmt + xs65sp1, centos7 mgmt + vmware55u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-581)
|
|
Trillian test result (tid-591)
|
|
LGTM on code review and testing @murali-reddy @rhtyd |
|
Can this merged now? test failures are specific to redundent VR/VPC VR which have been failing in 4.8/4.9/master. |
|
@blueorangutan help |
|
@rhtyd I understand these words: "help", "hello", "thanks", "package", "test" Blessed contributors for kicking Trillian test jobs: ['rhtyd', 'jburwell', 'murali-reddy', 'abhinandanprateek', 'PaulAngus', 'borisstoyanov', 'karuturi'] |
|
Yes I think test failures does not seem to be caused by this PR, LGTM based on code review. |
|
Thanks @murali-reddy @borisstoyanov I'll proceed with merging this now. @murali-reddy do you want to run the component test on this PR or on 1753/1754? |
|
@rhtyd please proceed with merge. I have not added the test suite(test_multiple_public_interfaces.py) part of this PR as smoke tests, because it takes around an hour for execution so they are best fit for component testing. Also tests need routable additional public IP range for the test case to succeed. I will run component test against 1753/1754 and report back results. |
|
Trillian test result (tid-597)
|
|
component test results. If any one wish to run component test test_multiple_public_interfaces.py, add a new public ip range in the test_daya.py, in the 'publiciprange' dict object. Test iptable rules in case we have IP associated with a network which is in ... === TestName: test_iptable_rules | Status : SUCCESS === Ran 6 tests in 1539.183s OK |
…es correctly -when processing static nat rule, add a mangle table rule, to mark the traffic from the guest vm when it has associated static nat rule so that traffic gets routed using the route tabe of the device which has public ip associated -fix the case where nic_device_id is empty when ip is getting disassociated resulting in empty deviceid in ips.json -add utility methods in CsRule, and CsRoute to add 'ip rule' and 'ip route' rules respectivley -ensure traffic from all public interfaces are connection marked with device number, and restored for the reverse traffic. use the connection marked number to do device specific routing table lookup fill the device specific routing table with default route -component tests for testing multiple public interfaces of VR
|
Travis failure is to do with a test_volumes failures in one of the component tests, not related to this PR. Will merge, and handle the Travis failure separately. |
…non_vpc CLOUDSTACK-9339 Virtual Routers don't handle Multiple Public Interfaces correctlyAs pointed out in CLOUDSTACK-9339, in case of multiple public IP's from different public IP ranges are associated with VR, VR functionality is broken from 4.6. Below are the brief list of problems specific to non-VPC networks addressed in the PR. This PR handles both VPC and non-VPC scenarios. - reverse traffic for the connections accepted on the eth3 and above public interfaces are getting blocked. Need a rule for e.g "-A FORWARD -i eth3 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT" in the FORWARD chain of filter table to permit reverse path traffic for established connections. - outbound public traffic from eth0 to eth3 (or for interfaces above like eth4 eth5 etc) needs rule to run through FW_OUTBOUND chain in the filter table - network stats on public interfaces eth3 are getting gathered - default gateway is missing in the device specific routing table, resulting in traffic to be looked up in main routing table - creating a device specific route table is generating "from all lookup Table_eth3" in the ip rules, resulting in rest of the traffic getting blocked. Picked few commits from #1519 from dsclose (#1519) submitted for 4.7 Marvin tests are added to test below - Static NAT works on the public interfaces above eth2, in case non-vpc networks - Portforwarding works on the public interfaces above eth2, in case non-vpc networks - Route tables are configured as expected for the device specific table for the public interfaces above eth2, in case non-vpc networks - IP tables rules are as expected for the traffic from and to the public interfaces above eth2, in case non-vpc networks * pr/1659: CLOUDSTACK-9339 Virtual Routers don't handle Multiple Public Interfaces correctly Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@murali-reddy @rhtyd Possible regression introduce by the PR1659 see https://issues.apache.org/jira/browse/CLOUDSTACK-9770 |
|
@murali-reddy @abhinandanprateek @DaanHoogland can you comment on this? |
As pointed out in CLOUDSTACK-9339, in case of multiple public IP's from different public IP ranges are associated with VR, VR functionality is broken from 4.6. Below are the brief list of problems specific to non-VPC networks addressed in the PR. This PR handles both VPC and non-VPC scenarios.
ip rules, resulting in rest of the traffic getting blocked.
Picked few commits from #1519 from dsclose (#1519) submitted for 4.7
Marvin tests are added to test below