Skip to content

Broadcast URI not set to vxlan, but vlan (Fix #3040)#4190

Merged
yadvr merged 2 commits intoapache:4.13from
CLDIN:broadcast-uri-vxlan-413
Sep 24, 2020
Merged

Broadcast URI not set to vxlan, but vlan (Fix #3040)#4190
yadvr merged 2 commits intoapache:4.13from
CLDIN:broadcast-uri-vxlan-413

Conversation

@GabrielBrascher
Copy link
Member

Description

This PR sets properly Broadcast URI to vxlan://vxlan_id when the physical network is of VXLAN.

Fixes: #3040

Description of issue #3040:

Advanced Network zone with VXLAN is created. When creating a guest network and setting the VNI this is set for the network:
broadcast_uri: vlan://1000
isolation_uri: vlan://1000

STEPS TO REPRODUCE

Create a Advanced Zone with VXLAN
Create a guest network
See that broadcast is set to vlan and not vxlan

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):

Prior to the fix:
image

After the fix:
image

How Has This Been Tested?

  1. Create a Advanced Zone with VXLAN
  2. Create a guest network
  3. See that broadcast uri is set to vxlan

@yadvr
Copy link
Member

yadvr commented Jul 1, 2020

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔debian. JID-1498

* @return Broadcast URI, e.g. 'vlan://vlan_ID' or 'vxlan://vlxan_ID'
*/
protected URI encodeVlanIdIntoBroadcastUri(String vlanId, PhysicalNetwork pNtwk) {
if(StringUtils.isNotBlank(pNtwk.getIsolationMethods().get(0))) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I got wondering if there could be more than one isolation method on a network. Considering that this is a List of isolation methods. I assume that to get into a VLAN conditional (the ones that this method is called) there will be only one isolation method, either VLAN or VXLAN.

@yadvr
Copy link
Member

yadvr commented Jul 27, 2020

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✖centos7 ✔debian. JID-1604

@yadvr
Copy link
Member

yadvr commented Jul 27, 2020

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔debian. JID-1608

@wido
Copy link
Contributor

wido commented Jul 27, 2020

LGTM based on the code

@yadvr
Copy link
Member

yadvr commented Aug 5, 2020

@GabrielBrascher did you try against 4.14, somehow I remember this was fixed recently? Thanks.
@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✖centos7 ✔debian. JID-1657

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-2598)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 73635 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4190-t2598-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_iso.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_public_ip_range.py
Intermittent failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py
Intermittent failure detected: /marvin/tests/smoke/test_resource_accounting.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dns.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dnsservice.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_routers.py
Intermittent failure detected: /marvin/tests/smoke/test_secondary_storage.py
Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_templates.py
Intermittent failure detected: /marvin/tests/smoke/test_usage.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 54 look OK, 23 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 Failure 495.14 test_internal_lb.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Failure 609.05 test_internal_lb.py
test_03_vpc_internallb_haproxy_stats_on_all_interfaces Error 413.72 test_internal_lb.py
test_04_rvpc_internallb_haproxy_stats_on_all_interfaces Error 465.99 test_internal_lb.py
test_02_vpc_privategw_static_routes Failure 302.73 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 340.93 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Failure 433.66 test_privategw_acl.py
ContextSuite context=TestResetVmOnReboot>:setup Error 0.00 test_reset_vm_on_reboot.py
ContextSuite context=TestRAMCPUResourceAccounting>:setup Error 0.00 test_resource_accounting.py
ContextSuite context=TestRouterDHCPHosts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPOpts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDns>:setup Error 0.00 test_router_dns.py
test_01_sys_vm_start Failure 0.11 test_secondary_storage.py
ContextSuite context=TestRouterDnsService>:setup Error 0.00 test_router_dnsservice.py
ContextSuite context=TestRouterIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestVPCIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestIsolatedNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRedundantIsolateNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRouterServices>:setup Error 0.00 test_routers.py
ContextSuite context=TestCpuCapServiceOfferings>:setup Error 0.00 test_service_offerings.py
ContextSuite context=TestServiceOfferings>:setup Error 0.34 test_service_offerings.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
test_01_list_sec_storage_vm Failure 0.11 test_ssvm.py
test_02_list_cpvm_vm Failure 0.09 test_ssvm.py
test_03_ssvm_internals Failure 0.08 test_ssvm.py
test_04_cpvm_internals Failure 0.09 test_ssvm.py
test_05_stop_ssvm Failure 0.10 test_ssvm.py
test_06_stop_cpvm Failure 0.08 test_ssvm.py
test_07_reboot_ssvm Failure 0.10 test_ssvm.py
test_08_reboot_cpvm Failure 0.08 test_ssvm.py
test_09_destroy_ssvm Failure 0.08 test_ssvm.py
test_10_destroy_cpvm Failure 0.08 test_ssvm.py
test_02_create_template_with_checksum_sha1 Error 65.46 test_templates.py
test_03_create_template_with_checksum_sha256 Error 65.50 test_templates.py
test_04_create_template_with_checksum_md5 Error 65.57 test_templates.py
test_05_create_template_with_no_checksum Error 65.52 test_templates.py
test_02_deploy_vm_from_direct_download_template Error 1.19 test_templates.py
test_03_deploy_vm_wrong_checksum Error 1.29 test_templates.py
ContextSuite context=TestTemplates>:setup Error 17.16 test_templates.py
ContextSuite context=TestISOUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestLBRuleUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestNatRuleUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestPublicIPUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestSnapshotUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestVmUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestVolumeUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestVpnUsage>:setup Error 0.00 test_usage.py
ContextSuite context=Test01DeployVM>:setup Error 0.00 test_vm_life_cycle.py
ContextSuite context=Test02VMLifeCycle>:setup Error 0.00 test_vm_life_cycle.py
test_14_secure_to_secure_vm_migration Error 11.28 test_vm_life_cycle.py
test_15_secured_to_nonsecured_vm_migration Error 74.06 test_vm_life_cycle.py
test_16_nonsecured_to_secured_vm_migration Error 1.18 test_vm_life_cycle.py
ContextSuite context=TestVmSnapshot>:setup Error 1.68 test_vm_snapshots.py
ContextSuite context=TestCreateVolume>:setup Error 0.00 test_volumes.py
ContextSuite context=TestVolumes>:setup Error 0.00 test_volumes.py
ContextSuite context=TestVPCRedundancy>:setup Error 0.00 test_vpc_redundant.py
ContextSuite context=TestVPCNics>:setup Error 0.00 test_vpc_router_nics.py
ContextSuite context=TestRVPCSite2SiteVpn>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestVPCSite2SiteVPNMultipleOptions>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestVpcRemoteAccessVpn>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestVpcSite2SiteVpn>:setup Error 0.00 test_vpc_vpn.py
test_disable_oobm_ha_state_ineligible Error 1515.69 test_hostha_kvm.py

@yadvr
Copy link
Member

yadvr commented Aug 29, 2020

@blueorangutan test

@blueorangutan
Copy link

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

@yadvr
Copy link
Member

yadvr commented Sep 1, 2020

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔centos7 ✖centos8 ✔debian. JID-1870

@yadvr
Copy link
Member

yadvr commented Sep 5, 2020

(centos8 pkg failure is expected as it's not supported on 4.13/4.14 and before)
@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-2680)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 37095 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4190-t2680-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Smoke tests completed. 75 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_vpc_privategw_static_routes Failure 305.66 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 204.71 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Failure 323.17 test_privategw_acl.py
test_01_redundant_vpc_site2site_vpn Failure 281.06 test_vpc_vpn.py

@yadvr yadvr requested review from wido and yadvr September 9, 2020 11:28
Copy link
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

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

LGTM, but need another pair of eyes or four

Copy link
Contributor

@wido wido left a comment

Choose a reason for hiding this comment

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

LGTM based on code and feedback from @GabrielBrascher

* @return Broadcast URI, e.g. 'vlan://vlan_ID' or 'vxlan://vlxan_ID'
*/
protected URI encodeVlanIdIntoBroadcastUri(String vlanId, PhysicalNetwork pNtwk) {
if(StringUtils.isNotBlank(pNtwk.getIsolationMethods().get(0))) {
Copy link
Member

Choose a reason for hiding this comment

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

@GabrielBrascher Should we check if pNtwk is null? This could potentially cause a NPE; and the getIsolationMethods() is also a valid list with at least one item

Copy link
Member Author

Choose a reason for hiding this comment

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

@rhtyd thanks for the review :-)

Answering your question: I did not add null verification on the respective parameter due to the fact that both methods that call this one already validate the private network

  1. the physical network pNtwk is validated at NetworkOrchestrator.java#L2196;

  2. the other method that calls encodeVlanIdIntoBroadcastUri also validates the private network at this line NetworkOrchestrator.java#L2397.

However, considering that this method could be reused, I have no problem in adding null validations.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, NetworkOrchestrator.java#L2397 is not exactly a null validation. I will add a null verification @rhtyd.

Copy link
Member

Choose a reason for hiding this comment

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

@GabrielBrascher please add the null validation, thnx

@yadvr
Copy link
Member

yadvr commented Sep 16, 2020

@GabrielBrascher can you advise when this is ready for merging, thnx

@GabrielBrascher
Copy link
Member Author

@rhtyd I am a bit offline this week due to vacation. I Will get back at 21st September. As soon as I get back I will add the null validation and update this PR. Thanks!

@GabrielBrascher
Copy link
Member Author

GabrielBrascher commented Sep 21, 2020

@rhtyd updated the code with the null validation.

@yadvr
Copy link
Member

yadvr commented Sep 21, 2020

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2056

@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-2828)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 32434 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4190-t2828-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Smoke tests completed. 76 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_vpc_privategw_static_routes Failure 213.08 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 230.40 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Failure 309.05 test_privategw_acl.py

@yadvr
Copy link
Member

yadvr commented Sep 24, 2020

Will merge and then need to kick tests on 4.14 and master

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.

5 participants