Skip to content

Fixed instance creation failure on dvswitch when using vlan id 4095#4557

Merged
yadvr merged 2 commits into
apache:4.14from
shapeblue:dswitch-vlan-trunking
Jan 12, 2021
Merged

Fixed instance creation failure on dvswitch when using vlan id 4095#4557
yadvr merged 2 commits into
apache:4.14from
shapeblue:dswitch-vlan-trunking

Conversation

@Spaceman1984
Copy link
Copy Markdown
Contributor

@Spaceman1984 Spaceman1984 commented Dec 22, 2020

Description

When creating an instance on a guest network where the vlan id has been set to 4095, the instance fails to start.
This PR sets the vlan id and range on the created port group to allow the instance to be created.

Fixes #4358

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)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

This has been tested by creating a guest network and setting the vlan id to 4095 and creating an instance using the specific network.

@Spaceman1984 Spaceman1984 changed the base branch from master to 4.14 December 22, 2020 10:13
@yadvr yadvr added this to the 4.14.1.0 milestone Dec 22, 2020
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Dec 22, 2020

@Spaceman1984 have you tested this
@alexandremattioli can you review/test this, thanks.
@blueorangutan package

@yadvr yadvr added the type:bug label Dec 22, 2020
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Dec 22, 2020

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

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 - but should the vlan range be 1-4094 @Spaceman1984 ?

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 0-4094 is correct, thnx Alex for confirming.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2507

@Spaceman1984
Copy link
Copy Markdown
Contributor Author

Seems like there are some test failures, looking into it

@Spaceman1984 Spaceman1984 marked this pull request as draft December 22, 2020 11:08
@Spaceman1984
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@Spaceman1984 Spaceman1984 marked this pull request as ready for review December 22, 2020 11:14
@blueorangutan
Copy link
Copy Markdown

@Spaceman1984 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: ✔centos7 ✖centos8 ✔debian. JID-2508

@Spaceman1984
Copy link
Copy Markdown
Contributor Author

@blueorangutan test help

@Spaceman1984
Copy link
Copy Markdown
Contributor Author

@blueorangutan test matrix

@blueorangutan
Copy link
Copy Markdown

@Spaceman1984 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-3363)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 29762 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4557-t3363-xenserver-71.zip
Intermittent failure detected: /marvin/tests/smoke/test_scale_vm.py
Smoke tests completed. 82 look OK, 1 have error(s)
Only failed tests results shown below:

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-3364)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30014 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4557-t3364-kvm-centos7.zip
Smoke tests completed. 83 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-3365)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35684 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4557-t3365-vmware-65u2.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_templates.py
Smoke tests completed. 82 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_create_template_with_checksum_sha1 Error 5.16 test_templates.py
test_03_create_template_with_checksum_sha256 Error 5.15 test_templates.py
test_04_create_template_with_checksum_md5 Error 5.15 test_templates.py

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 5, 2021

@alexandremattioli @andrijapanicsb have you tested/reviewed this? Thanks

}

public static VmwareDistributedVirtualSwitchVlanSpec createDVPortVlanSpec(Integer vlanId, String vlanRange) {
if (vlanId != null && vlanId == 4095){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Spaceman1984 Have you tested this?

this method createDVPortVlanSpec() is called only when vlanId is null, so if check here is always 'false' and the underlying code never executes. Please check and try to fix this in the appropriate top level method in the call stack.

Copy link
Copy Markdown
Contributor Author

@Spaceman1984 Spaceman1984 Jan 8, 2021

Choose a reason for hiding this comment

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

This method is not onlly called when vlanid is null.
If vid is not null, spvlanid would be evaluated and if spvlanid is null, the method will be called.

if (vid == null || spvlanid == null) {
    vlanspec = createDVPortVlanSpec(vid, vlanRange);
    ...
}

I tested this as I stated in the description.

@yadvr yadvr requested a review from sureshanaparti January 8, 2021 07:41
@alexandremattioli
Copy link
Copy Markdown
Contributor

Tested. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants