Bug Reference

CLOUDSTACK-1311

Branch

https://github.com/midokura/incubator-cloudstack/tree/vif_driver_change
(Non-committer workflow, i.e. develop on external, pubic fork and submit patches)

Introduction

Allow specification of different VIF drivers per traffic type in KVM.

Purpose

This change allows the user to override the VIF Driver for specific traffic types using the agent config file (agent.properties).

Motivation

The MidoNet plugin intends to handle Guest traffic for Guest and System VMs, and Public traffic for System VMs (Public traffic).
However, we wish to let Management / Control traffic be handled by the underlying physical network using the default BridgeVifDriver.
Currently, this is not possible without duplicating BridgeVifDriver code into the MidonetVifDriver, as LibVirtComputingResource assumes there is only one VIF driver.

Document History

Date

Revision

Author

Description of the change

2/18/2013

0.1

Dave Cahill

Initial Draft

Glossary

Term

Definition

CS

CloudStack

Feature Specifications

This change targets the KVM hypervisor.

Summary of existing behaviour

Currently, in agent.properties, the following configuration parameter exists:

libvirt.vif.driver

If this setting is not specified, the default VIF driver is com.cloud.hypervisor.kvm.resource.BridgeVifDriver.

LibVirtComputingResource uses the specified VIF driver for plugging all NICs, regardless of traffic type.

Feature summary

Allow users to set configuration options of the form below in agent.properties:

libvirt.vif.driver.TRAFFICTYPE

For example:
libvirt.vif.driver.Guest=com.cloud.network.resource.MidoNetVifDriver

When plugging NICs of a certain traffic type, LibVirtComputingResource will check if a specific VIF driver has been set for that traffic type, and if not, fall back to the default VIF driver.

Use cases

Basic use case:
Using standard BridgeVifDriver. No changes required to workflow, configuration etc. Works as before.

Network plugin use case:
Using MidoNet plugin, want MidoNet to handle Guest and Public traffic only.

In agent.properties, set the following:

libvirt.vif.driver.Guest=com.cloud.network.resource.MidoNetVifDriver
libvirt.vif.driver.Public=com.cloud.network.resource.MidoNetVifDriver

This step would be part of the compute node deployment process (e.g. set in Chef scripts) when using the MidoNet plugin.

Test guidelines

Before declaring the feature complete, the following regression tests should be verified in order to ensure backwards compatibility:

Using a default network offering using Virtual Router:

    • Create one or more guest networks;
    • Delete one or more existing guest networks;
    • Add VMs to the same guest network and verify connectivity;
    • Add VMs to different guest network and verify isolation;
    • Delete VMs to ensure the removal of corresponding network interface;

Configuration changes

As mentioned above, after this change users can set config options of this type in agent.properties in KVM:
libvirt.vif.driver.TRAFFICTYPE

For example:
libvirt.vif.driver.Guest=com.cloud.network.resource.MidoNetVifDriver

Web Services APIs

None.

UI flow

No change.

Appendix

None.

  • No labels