engine: honour bypass VLAN id/range for L2 networks#4274
engine: honour bypass VLAN id/range for L2 networks#4274yadvr merged 2 commits intoapache:4.14apache/cloudstack:4.14from shapeblue:l2-bypass-check-regression-fixshapeblue/cloudstack:l2-bypass-check-regression-fixCopy head branch name to clipboard
Conversation
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>
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-1785 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
DaanHoogland
left a comment
There was a problem hiding this comment.
lgtm, pending testing
| */ | ||
| private boolean hasGuestBypassVlanOverlapCheck(final boolean bypassVlanOverlapCheck, final NetworkOfferingVO ntwkOff, final boolean isPrivateNetwork) { | ||
| return bypassVlanOverlapCheck && (ntwkOff.getGuestType() == GuestType.Shared || isPrivateNetwork); | ||
| return bypassVlanOverlapCheck && (ntwkOff.getGuestType() == GuestType.Shared || ntwkOff.getGuestType() == GuestType.L2 || isPrivateNetwork); |
There was a problem hiding this comment.
the condition is getting more complex this way. would
| return bypassVlanOverlapCheck && (ntwkOff.getGuestType() == GuestType.Shared || ntwkOff.getGuestType() == GuestType.L2 || isPrivateNetwork); | |
| return bypassVlanOverlapCheck && (ntwkOff.getGuestType() != GuestType.Isolated || isPrivateNetwork); |
be a good alternative?
|
@DaanHoogland thnx, addressed fix |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-1786 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2516)
|
|
@Spaceman1984 can you review and test this, thnx |
|
Tested, LGTM |
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).
Fixes #4273
Types of changes