nesanton / kvmvlan

vlan management for KVM based on libvirt hooks
MIT License
25 stars 6 forks source link

Permission denied #2

Closed osklil closed 5 years ago

osklil commented 5 years ago

This is not really an issue, more of a "FYI" in the installation docs: If the following is logged in /etc/libvirt/hooks/logs/daemon_start_bridge_init.log:

Traceback (most recent call last): File "./bridge_init.py", line 244, in main(ARGV) File "./bridge_init.py", line 111, in main ipr = IPRoute() File "/usr/lib/python2.7/dist-packages/pyroute2/netlink/rtnl/iprsocket.py", line 26, in init all_ns=all_ns) File "/usr/lib/python2.7/dist-packages/pyroute2/netlink/nlsocket.py", line 341, in init self.post_init() File "/usr/lib/python2.7/dist-packages/pyroute2/netlink/nlsocket.py", line 874, in post_init self._fileno) File "/usr/lib/python2.7/socket.py", line 191, in init _sock = _realsocket(family, type, proto) socket.error: [Errno 13] Permission denied

Then the problem may be that libvirt may not open netlink datagram sockets. To fix

echo " network netlink dgram," > /etc/apparmor.d/local/usr.sbin.libvirtd

then reload apparmor.

Oskar Liljeblad

nesanton commented 5 years ago

Hi Oskar, thanks for letting me know!

I only tested it on CentOS, (It never crossed my mind someone would use it elsewhere). I have to confess I even haven't tested it with SELinux on. What distro are you on?

Anton

osklil commented 5 years ago

Hi!

Ubuntu 18.04 LTS Bionic. I think it is AppArmor, installed and used by libvirt by default in Ubuntu.

Oskar

nesanton commented 5 years ago

Added a few lines to the docs. Thanks!