Skip to content

Fix VR creation issue while creating VM on shared network using PVLAN#3653

Merged
yadvr merged 2 commits into
apache:masterfrom
shapeblue:fixvrpvlanissue
Nov 21, 2019
Merged

Fix VR creation issue while creating VM on shared network using PVLAN#3653
yadvr merged 2 commits into
apache:masterfrom
shapeblue:fixvrpvlanissue

Conversation

@nvazquez
Copy link
Copy Markdown
Contributor

Description

Fix VR creation issue when deploying VM on shared network using PVLAN.
Tested on KVM + Open vSwitch host

Error:

2019-10-28 13:37:19,217 DEBUG [c.c.a.t.Request] (Work-Job-Executor-3:ctx-522095d0 job-29/job-30 ctx-22bff2f0) (logid:6771277e) Seq 1-4072942913003192458: Received:  { Ans: , MgmtId: 32988167473142, via: 1(ref-trl-218-k-m7-nvazquez-kvm1), Ver: v1, Flags: 10, { StartAnswer, CheckSshAnswer, GetDomRVersionAnswer, NetworkUsageAnswer, Answer, Answer, Answer } }
2019-10-28 13:37:19,224 DEBUG [o.a.c.n.t.AdvancedNetworkTopology] (Work-Job-Executor-3:ctx-522095d0 job-29/job-30 ctx-22bff2f0) (logid:6771277e) SETUP DHCP PVLAN RULES
2019-10-28 13:37:19,228 DEBUG [c.c.n.r.NetworkHelperImpl] (Work-Job-Executor-3:ctx-522095d0 job-29/job-30 ctx-22bff2f0) (logid:6771277e) Router requires upgrade. Unable to send command to router:4, router template version : null, minimal required version : 4.10.0
2019-10-28 13:37:19,229 WARN  [o.a.c.n.t.AdvancedNetworkVisitor] (Work-Job-Executor-3:ctx-522095d0 job-29/job-30 ctx-22bff2f0) (logid:6771277e) Timed Out
com.cloud.exception.ResourceUnavailableException: Resource [VirtualRouter:4] is unreachable: Unable to send command. Router requires upgrade
	at com.cloud.network.router.NetworkHelperImpl.sendCommandsToRouter(NetworkHelperImpl.java:175)
	at org.apache.cloudstack.network.topology.AdvancedNetworkVisitor.visit(AdvancedNetworkVisitor.java:185)
	at com.cloud.network.rules.DhcpPvlanRules.accept(DhcpPvlanRules.java:61)
	at org.apache.cloudstack.network.topology.AdvancedNetworkTopology.setupDhcpForPvlan(AdvancedNetworkTopology.java:131)
	at com.cloud.network.router.VirtualNetworkApplianceManagerImpl.finalizeStart(VirtualNetworkApplianceManagerImpl.java:2073)
	at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:1146)

Proposed fix:

  • Move the VR template version insert into domain_router table before iterating through the VR nics to setup PVLAN

Workaround:

  • Disable the global setting: router.version.check

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

How Has This Been Tested?

KVM + Open vSwitch bridging

  • Create a Shared network providing:
    • Primary VLAN ID
    • Secondary VLAN ID
  • Deploy user VM on network

Before this fix: Observe that VR creation fails -> user VM creation fails
After this fix: Successful VM deployment

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@nvazquez nvazquez modified the milestones: 4.14.0.0, 4.13.1.0 Oct 29, 2019
@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-429)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35129 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3653-t429-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
Smoke tests completed. 76 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_VPC_nics_after_destroy Failure 212.43 test_vpc_router_nics.py

@ustcweizhou
Copy link
Copy Markdown
Contributor

code LGTM

Copy link
Copy Markdown
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

@nvazquez
Copy link
Copy Markdown
Contributor Author

nvazquez commented Nov 1, 2019

@blueorangutan test matrix

@blueorangutan
Copy link
Copy Markdown

@nvazquez a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_01_scale_vm Failure 23.82 test_scale_vm.py
test_01_VPC_nics_after_destroy Failure 254.00 test_vpc_router_nics.py

@ustcweizhou
Copy link
Copy Markdown
Contributor

@nvazquez
the following line needs to be added at around line 2085, because guestNetworks is changed.

        _routerDao.persist(router, guestNetworks);

@nvazquez
Copy link
Copy Markdown
Contributor Author

nvazquez commented Nov 5, 2019

Thanks @ustcweizhou I have updated the code
@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

@nvazquez
Copy link
Copy Markdown
Contributor Author

nvazquez commented Nov 5, 2019

@blueorangutan test matrix

@blueorangutan
Copy link
Copy Markdown

@nvazquez a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

@blueorangutan
Copy link
Copy Markdown

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

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-450)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 37265 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3653-t450-vmware-65u2.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_network.py
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.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_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Failure 401.73 test_internal_lb.py

@DaanHoogland DaanHoogland reopened this Nov 7, 2019
Copy link
Copy Markdown
Member

@GabrielBrascher GabrielBrascher 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

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@nvazquez nvazquez closed this Nov 19, 2019
@nvazquez nvazquez reopened this Nov 19, 2019
@blueorangutan
Copy link
Copy Markdown

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

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan test matrix

@blueorangutan
Copy link
Copy Markdown

@nvazquez a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan test centos7 vmware-65u2

@apache apache deleted a comment from blueorangutan Nov 20, 2019
@apache apache deleted a comment from blueorangutan Nov 20, 2019
@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-500)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 32954 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3653-t500-vmware-65u2.zip
Smoke tests completed. 77 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr yadvr merged commit 80abb5a into apache:master Nov 21, 2019
ustcweizhou pushed a commit to ustcweizhou/cloudstack that referenced this pull request Feb 28, 2020
…apache#3653)

* Fix VR creation issue while creating VM on shared network using PVLAN

* Fix update guest networks
@nvazquez nvazquez deleted the fixvrpvlanissue branch April 6, 2020 14:35
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.

6 participants