Cause: Previously the rules for udev haven't been reloaded on installation before attempting to trigger the newly installed udev rules.
Consequence: The communications device for the rhevm-guest-agent hasn't had the correct ownership and the rhevm-guest-agent wasn't able to start interacting with the device, causing the guest agent to fail on startup.
Fix: The installation rpms are now reloading the udev rules before attempting to trigger them.
Result: The ownership is now correctly set right after the first installation of the rhevm-guest-agent.
Incorrect ownership set on /dev/vport0p1 on RHEV guests, preventing guest agent from starting
[root@rhel7system ~]# tail /var/log/ovirt-guest-agent/ovirt-guest-agent.log
OSError: [Errno 13] Permission denied: '/dev/virtio-ports/com.redhat.rhevm.vdsm'
MainThread::INFO::2015-09-17 10:48:36,098::ovirt-guest-agent::57::root::Starting oVirt guest agent
MainThread::ERROR::2015-09-17 10:48:36,099::ovirt-guest-agent::138::root::Unhandled exception in oVirt guest agent!
Traceback (most recent call last):
File "/usr/share/ovirt-guest-agent/ovirt-guest-agent.py", line 132, in <module>
agent.run(daemon, pidfile)
File "/usr/share/ovirt-guest-agent/ovirt-guest-agent.py", line 63, in run
self.agent = LinuxVdsAgent(config)
File "/usr/share/ovirt-guest-agent/GuestAgentLinux2.py", line 371, in __init__
AgentLogicBase.__init__(self, config)
File "/usr/share/ovirt-guest-agent/OVirtAgentLogic.py", line 171, in __init__
self.vio = VirtIoChannel(config.get("virtio", "device"))
File "/usr/share/ovirt-guest-agent/VirtIoChannel.py", line 150, in __init__
self._stream = VirtIoStream(vport_name)
File "/usr/share/ovirt-guest-agent/VirtIoChannel.py", line 131, in __init__
self._vport = os.open(vport_name, os.O_RDWR)
OSError: [Errno 13] Permission denied: '/dev/virtio-ports/com.redhat.rhevm.vdsm'
Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 7.1 (Maipo)
rhevm-guest-agent-common-1.0.10-2.el7.noarch
How reproducible:
Intermittent
Steps to Reproduce:
1. Create RHEL 7.1 guest on RHEV
2. Start ovirt-guest-agent on guest
Actual results:
Failure to start with traceback shown above.
Expected results:
successful agent start
Additional info:
This can be worked around by manually changing the ownership of /dev/vport0p1 to ovirtagent:ovirtagent instead of root:root
Comment 1Vinzenz Feenstra [evilissimo]
2015-11-05 06:45:05 UTC
*** Bug 1278162 has been marked as a duplicate of this bug. ***
Comment 2Vinzenz Feenstra [evilissimo]
2015-11-05 06:58:15 UTC
Hi Allan,
Please ask the customer for the the system journal.
Additionally please check whether or not the following file is present:
/etc/udev/rules.d/55-ovirt-guest-agent.rules
If the file is present, please check whether or not the following command would solve the issue:
# /sbin/udevadm trigger --subsystem-match="virtio-ports" --attr-match="name=com.redhat.rhevm.vdsm"
# systemctl start ovirt-guest-agent.service
The udev rule is supposed to set owner of the /dev/vport0p1 device to ovirtagent:ovirtagent, it seems like that it didn't get triggered, but why we have to figure out.
Thanks
Comment 4Vinzenz Feenstra [evilissimo]
2015-12-01 10:07:28 UTC
Ok we have been able to reproduce that locally and the workaround for now is this:
# udevadm trigger
# systemctl start ovirt-guest-agent
The problem is in the RPM it doesn't perform the trigger after the installation.
An other solution is to restart the VM and it should work.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHEA-2016-0432.html
Incorrect ownership set on /dev/vport0p1 on RHEV guests, preventing guest agent from starting [root@rhel7system ~]# tail /var/log/ovirt-guest-agent/ovirt-guest-agent.log OSError: [Errno 13] Permission denied: '/dev/virtio-ports/com.redhat.rhevm.vdsm' MainThread::INFO::2015-09-17 10:48:36,098::ovirt-guest-agent::57::root::Starting oVirt guest agent MainThread::ERROR::2015-09-17 10:48:36,099::ovirt-guest-agent::138::root::Unhandled exception in oVirt guest agent! Traceback (most recent call last): File "/usr/share/ovirt-guest-agent/ovirt-guest-agent.py", line 132, in <module> agent.run(daemon, pidfile) File "/usr/share/ovirt-guest-agent/ovirt-guest-agent.py", line 63, in run self.agent = LinuxVdsAgent(config) File "/usr/share/ovirt-guest-agent/GuestAgentLinux2.py", line 371, in __init__ AgentLogicBase.__init__(self, config) File "/usr/share/ovirt-guest-agent/OVirtAgentLogic.py", line 171, in __init__ self.vio = VirtIoChannel(config.get("virtio", "device")) File "/usr/share/ovirt-guest-agent/VirtIoChannel.py", line 150, in __init__ self._stream = VirtIoStream(vport_name) File "/usr/share/ovirt-guest-agent/VirtIoChannel.py", line 131, in __init__ self._vport = os.open(vport_name, os.O_RDWR) OSError: [Errno 13] Permission denied: '/dev/virtio-ports/com.redhat.rhevm.vdsm' Version-Release number of selected component (if applicable): Red Hat Enterprise Linux Server release 7.1 (Maipo) rhevm-guest-agent-common-1.0.10-2.el7.noarch How reproducible: Intermittent Steps to Reproduce: 1. Create RHEL 7.1 guest on RHEV 2. Start ovirt-guest-agent on guest Actual results: Failure to start with traceback shown above. Expected results: successful agent start Additional info: This can be worked around by manually changing the ownership of /dev/vport0p1 to ovirtagent:ovirtagent instead of root:root