Skip to content

[KVM] Enable PVLAN support on L2 networks#4040

Merged
yadvr merged 8 commits into
apache:masterfrom
shapeblue:l2-pvlan-kvm-xen
Aug 20, 2020
Merged

[KVM] Enable PVLAN support on L2 networks#4040
yadvr merged 8 commits into
apache:masterfrom
shapeblue:l2-pvlan-kvm-xen

Conversation

@davidjumani
Copy link
Copy Markdown
Contributor

@davidjumani davidjumani commented Apr 21, 2020

Description

This is an extention of #3732 for kvm.
This is restricted to ovs > 2.9.2
Since Xen uses ovs 2.6, pvlan is unsupported.
This also fixes issues of vms on the same pvlan unable to communicate if they're on the same host

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)

How Has This Been Tested?

  • Create L2 network selecting a VLAN ID and secondary VLAN ID as well as the PVLAN type. The connectivity is as expected

@davidjumani davidjumani force-pushed the l2-pvlan-kvm-xen branch 4 times, most recently from 9251cf5 to c14dbf6 Compare April 24, 2020 11:20
s_logger.info("Programmed pvlan for vm with mac " + vmMac);
}
} catch (final LibvirtException e) {
} catch (final Exception e) {
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.

no pokemon catch-um-all

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed!

@davidjumani davidjumani force-pushed the l2-pvlan-kvm-xen branch 4 times, most recently from 3ebb743 to 83ac172 Compare May 4, 2020 11:31
@davidjumani davidjumani changed the title Adding l2 pvlan support for vms on kvm and xen Adding l2 pvlan support for vms on kvm May 5, 2020
@davidjumani davidjumani changed the title Adding l2 pvlan support for vms on kvm Adding l2 pvlan support for kvm May 5, 2020
@davidjumani davidjumani changed the title Adding l2 pvlan support for kvm [KVM] Enable PVLAN support on L2 networks May 5, 2020
@davidjumani davidjumani marked this pull request as ready for review May 5, 2020 05:42
@apache apache deleted a comment from blueorangutan May 5, 2020
@apache apache deleted a comment from blueorangutan May 5, 2020
@apache apache deleted a comment from nvazquez May 5, 2020
@apache apache deleted a comment from blueorangutan May 5, 2020
@apache apache deleted a comment from blueorangutan May 5, 2020
@apache apache deleted a comment from blueorangutan May 5, 2020
@apache apache deleted a comment from blueorangutan May 5, 2020
@apache apache deleted a comment from blueorangutan May 5, 2020
@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@apache apache deleted a comment from davidjumani May 5, 2020
@apache apache deleted a comment from blueorangutan May 5, 2020
@blueorangutan
Copy link
Copy Markdown

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

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

good code! some questions : why is a test removed and why do we need a separate hypervisor specific script . Can't the script determine the host type and run based on that?


@SuppressWarnings("unchecked")
@Test
public void testPvlanSetupCommandDhcpException() {
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.

why is this test no longer sensible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the old way used to call the libvirt library, it could potentially throw a LibvirtException. Now that it doesn't, theres no need to catch or test whether the exception has occoured

exit 2
}

echo "/usr/share/cloudstack-common/scripts/vm/network/ovs-pvlan-kvm-dhcp-host.sh $@ " >> /tmp/pvlan
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.

or `echo "$0 $@ " >>/tmp/pvlan' ?

Copy link
Copy Markdown
Contributor Author

@davidjumani davidjumani May 5, 2020

Choose a reason for hiding this comment

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

Removed! Was there just for logging

Comment thread scripts/vm/network/ovs-pvlan-kvm-vm.sh Outdated
exit 2
}

echo "/usr/share/cloudstack-common/scripts/vm/network/ovs-pvlan-kvm-vm.sh $@ " >> /tmp/pvlan
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.

$0 $@?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

And the reason we need hypervisor-specific code is that on KVM, we need OVS > 2.9.2 whereas, on Xen, it comes bundled with 2.6. I've left the existing functionality on Xen but enhanced KVM to support community pvlans also which uses features only available in OVS > 2.9.2. Having two separate codes makes it easier to separate out and debug any issues

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-1504)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35558 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4040-t1504-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

Packaging result: ✔centos7 ✔debian. JID-1768

@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@davidjumani 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 ✔debian. JID-1771

@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2479)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 46930 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4040-t2479-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.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_hostha_kvm.py
Smoke tests completed. 82 look OK, 3 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_deploy_kubernetes_cluster Error 0.09 test_kubernetes_clusters.py
test_02_deploy_kubernetes_ha_cluster Error 0.04 test_kubernetes_clusters.py
test_04_deploy_and_upgrade_kubernetes_cluster Error 0.03 test_kubernetes_clusters.py
test_05_deploy_and_upgrade_kubernetes_ha_cluster Error 0.03 test_kubernetes_clusters.py
test_06_deploy_and_invalid_upgrade_kubernetes_cluster Error 0.03 test_kubernetes_clusters.py
test_07_deploy_and_scale_kubernetes_cluster Error 0.03 test_kubernetes_clusters.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Error 895.88 test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics Error 3876.57 test_vpc_redundant.py
test_hostha_kvm_host_fencing Error 168.57 test_hostha_kvm.py

@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@davidjumani 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-1789

@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@davidjumani 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-1790

@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2518)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 47422 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4040-t2518-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 83 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_deploy_kubernetes_cluster Error 0.06 test_kubernetes_clusters.py
test_02_deploy_kubernetes_ha_cluster Error 0.03 test_kubernetes_clusters.py
test_04_deploy_and_upgrade_kubernetes_cluster Error 0.03 test_kubernetes_clusters.py
test_05_deploy_and_upgrade_kubernetes_ha_cluster Error 0.03 test_kubernetes_clusters.py
test_06_deploy_and_invalid_upgrade_kubernetes_cluster Error 0.04 test_kubernetes_clusters.py
test_07_deploy_and_scale_kubernetes_cluster Error 0.03 test_kubernetes_clusters.py
test_hostha_kvm_host_fencing Error 171.26 test_hostha_kvm.py

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