cgroup device acl in qemu.conf edit for gre

Bug #1086255 reported by Daneyon Hansen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cisco Openstack
Fix Released
Undecided
Unassigned
Folsom
Fix Released
High
Edgar Magana

Bug Description

/etc/libvirt.conf needs to be edited to support OVS GRE mode. libvirt-bin then needs to be restarted.

Add the following to qemu.conf

cgroup_device_acl = [
        "/dev/null", "/dev/full", "/dev/zero",
        "/dev/random", "/dev/urandom",
        "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
        "/dev/rtc", "/dev/hpet", "/dev/net/tun",
    ]

Revision history for this message
Ian Wells (ijw-ubuntu) wrote :

... or we need to stop using the 'ethernet' driver in the XML files, which can be done with a suitable choice of VIF plugging driver.

Revision history for this message
Edgar Magana (emagana) wrote :

qemu.conf file has been fixed:
https://github.com/CiscoSystems/puppet-quantum/commit/decc7ebf79dc655723db45fda2221850f0d62f2d

I dont know what is needed for the libvirtd.conf!
Daneyon, can you clarify?

Revision history for this message
Daneyon Hansen (danehans) wrote :

Your fix should address the issue in the short term. In the long-term, the bug appeared because we are using the incorrect default Nova vif plugging in nova.conf:

Proposed Default:
 libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybirdOVSBridgeDriver

Current Defualt:
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver

The proposed default suports Nova security filtering, which most customers will want. It's beneficial to create some logic that if the LibvirtHybirdOVSBridgeDriver is selected, then the qemu.conf file gets edited to include the GRE tunnel device and libvirt is restarted.

Revision history for this message
Daneyon Hansen (danehans) wrote :

For more detail, this is the core.pp setting that is part of the problem:

$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtOpenVswitchDriver',

We should be using:

$libvirt_vif_driver='nova.virt.libvirt.vif.LibvirtHybirdOVSBridgeDriver',

LibvirtHybirdOVSBridgeDriver supports Nova security groups.

You may want to consider moving your qemu.conf code to either openstack::compute or nova::network. This way we can implement logic that states, if LibvirtOpenVswitchDriver is select, then modify qemu.conf and restart service.

no longer affects: openstack-cisco
Revision history for this message
Ian Wells (ijw-ubuntu) wrote :

Hybrid plugging driver is incompatible with the noopfirewall driver so it's not the only change we would need.

Revision history for this message
Ian Wells (ijw-ubuntu) wrote :

  if $enabled {
    $service_ensure = "running"
  } else {
    $service_ensure = "stopped"
    file { "/etc/libvirt/qemu.conf":
       ensure => present,
       notify => Exec[ '/etc/init.d/libvirt-bin restart'],
       source => 'puppet:///modules/quantum/qemu.conf',
     }
     exec { '/etc/init.d/libvirt-bin restart':
        refreshonly => true,
        }
 }

... think this might be an issue ;)

Revision history for this message
Ian Wells (ijw-ubuntu) wrote :

I suggest the following, rather than using an 'exec' command (exec is baaad, mm'kay?'). It uses the service libvirt that nova creates.

  if $enabled {
    $service_ensure = "running"
  } else {
    $service_ensure = "stopped"
  }

  # If you're using ethernet KVM connections then we need to change the qemu default settings
  # They're recommended against, hence not being turned on in qemu by default, but they're
  # needed by some VIF plugging code.
  file { "/etc/libvirt/qemu.conf":
     ensure => present,
     notify => Service['libvirt'], # from nova::compute - beware the cross-dependency
     source => 'puppet:///modules/quantum/qemu.conf',
  }

Changed in openstack-cisco:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.