Skip to content
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

vpc: add bypassvlanoverlapcheck parameter when create private gateway #3899

Merged

Conversation

ustcweizhou
Copy link
Contributor

Description

The vlan of private gateways in VPCs should not be same. In some edge cases, vlan of private gateways are same (for example in test_privategw_acl.py).

Similar as shared network, add bypassvlanoverlapcheck parameter when create private gateway.

This also fixes #3859 .
the root cause is #3859 (comment)

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

image

How Has This Been Tested?

Run test_privategw_acl.py several times, no failure any more.

@ustcweizhou
Copy link
Contributor Author

@rhtyd this is the fix for trillian test

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✖centos6 ✔centos7 ✔debian. JID-923

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1069)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 28691 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3899-t1069-kvm-centos7.zip
Smoke tests completed. 80 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@rohityadavcloud rohityadavcloud added this to the 4.15.0.0 milestone Feb 21, 2020
@rohityadavcloud
Copy link
Member

@DaanHoogland @andrijapanicsb cc @PaulAngus @borisstoyanov @nvazquez - need more eye to ensure this does not cause any regression
@blueorangutan test centos7 vmware-65u2

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests

@rohityadavcloud rohityadavcloud modified the milestones: 4.15.0.0, 4.14.0.0 Feb 21, 2020
@DaanHoogland DaanHoogland self-requested a review February 21, 2020 08:33
@blueorangutan
Copy link

Trillian test result (tid-1077)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30030 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3899-t1077-vmware-65u2.zip
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Smoke tests completed. 77 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor

@blueorangutan test centos7 xenserver-71

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + xenserver-71) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1081)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30244 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3899-t1081-xenserver-71.zip
Intermittent failure detected: /marvin/tests/smoke/test_scale_vm.py
Smoke tests completed. 79 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_scale_vm Failure 18.52 test_scale_vm.py

@DaanHoogland
Copy link
Contributor

this is a lot of code change for a little functional change, what I've seen so far looks good, but I do want to take an hour or so later to go through it line by line. If others test extensively that fina as well, by me.
(@rhtyd @weizhouapache @andrijapanicsb)

@weizhouapache
Copy link
Member

this is a lot of code change for a little functional change, what I've seen so far looks good, but I do want to take an hour or so later to go through it line by line. If others test extensively that fina as well, by me.
(@rhtyd @weizhouapache @andrijapanicsb)

@DaanHoogland
there are actually two main changes which are not independent.
(1) add vpcid in method getPrivateNetwork.
(2) add bypassvlanoverlapcheck parameter when create private gateway

in test_privategw_acl.py, it tests the vm connectivity between two VPCs. The two VPCs connect each time by private gateways. The two private gateways have same cidr/vlan, but different gateway (gateway of private gateway in a VPC is the ip attached on another VPC).
in method getPrivateNetwork, the private gateways with same cidr/vlan are mapped to the same isolated network, so one of them has wrong gateway. That's why many trillian test failed.

Therefore I add vpcid to method getPrivateNetwork so they are mapped to different network (with correct gateway). It has another issue that they use same vlan, so I have to add bypassvlanoverlapcheck parameter.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@DaanHoogland DaanHoogland merged commit ce89423 into apache:master Feb 23, 2020
ggoodrich-ipp pushed a commit to ippathways/cloudstack that referenced this pull request Feb 24, 2020
ustcweizhou added a commit to ustcweizhou/cloudstack that referenced this pull request Feb 28, 2020
rohityadavcloud added a commit to shapeblue/cloudstack that referenced this pull request Aug 19, 2020
Commit e894238d904a9c49c1140371f612a51d251efc1 (apache#3899) allowed private
gateways to bypass vlan check while refactoring it did not cover the
case for L2 but only shared network. This fix will re-enable honouring
the bypass vlan check option for L2 guest network (in addition to the
Shared networks).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
rohityadavcloud added a commit that referenced this pull request Aug 25, 2020
* engine: honour bypass VLAN id/range for L2 networks

Commit e894238d904a9c49c1140371f612a51d251efc1 (#3899) allowed private
gateways to bypass vlan check while refactoring it did not cover the
case for L2 but only shared network. This fix will re-enable honouring
the bypass vlan check option for L2 guest network (in addition to the
Shared networks).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* Update NetworkOrchestrator.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_privategw_acl.py failed in some Trillian tests
6 participants