[ovirt-users] ovirt-guest-agent.service has broken in Debian 8 virtual machines after updates hosts to 4.2
Алексей Максимов
aleksey.i.maksimov at yandex.ru
Fri Jan 5 17:41:43 UTC 2018
Hello Ed.
I found another way to solve the problem.
But I do not know if it's the right way :(
So I decided to ask a question here. But none of the gurus answered.
# mkdir ~/packages
# cd ~/packages
# wget http://ftp.us.debian.org/debian/pool/main/o/ovirt-guest-agent/ovirt-guest-agent_1.0.13.dfsg-2_all.deb
# apt-get install gir1.2-glib-2.0 libdbus-glib-1-2 libgirepository-1.0-1 libpango1.0-0 libuser1 python-dbus python-dbus-dev python-ethtool python-gi qemu-guest-agent usermode
# dpkg -i ~/packages/ovirt-guest-agent_1.0.13.dfsg-2_all.deb
# systemctl restart ovirt-guest-agent.service
# systemctl status ovirt-guest-agent.service
* ovirt-guest-agent.service - oVirt Guest Agent
Loaded: loaded (/lib/systemd/system/ovirt-guest-agent.service; enabled)
Active: failed (Result: exit-code) since Wed 2018-01-03 22:52:14 MSK; 1s ago
Process: 23206 ExecStart=/usr/bin/python /usr/share/ovirt-guest-agent/ovirt-guest-agent.py (code=exited, status=1/FAILURE)
Process: 23203 ExecStartPre=/bin/chown ovirtagent:ovirtagent /run/ovirt-guest-agent.pid (code=exited, status=0/SUCCESS)
Process: 23200 ExecStartPre=/bin/touch /run/ovirt-guest-agent.pid (code=exited, status=0/SUCCESS)
Process: 23197 ExecStartPre=/sbin/modprobe virtio_console (code=exited, status=0/SUCCESS)
Main PID: 23206 (code=exited, status=1/FAILURE)
As we can see, the service does not start.
In this case, the error in the log (/var/log/ovirt-guest-agent/ovirt-guest-agent.log) will be different:
MainThread::INFO::2018-01-03 22:52:14,771::ovirt-guest-agent::59::root::Starting oVirt guest agent
MainThread::ERROR::2018-01-03 22:52:14,773::ovirt-guest-agent::141::root::Unhandled exception in oVirt guest agent!
Traceback (most recent call last):
File "/usr/share/ovirt-guest-agent/ovirt-guest-agent.py", line 135, in <module>
agent.run(daemon, pidfile)
File "/usr/share/ovirt-guest-agent/ovirt-guest-agent.py", line 65, in run
self.agent = LinuxVdsAgent(config)
File "/usr/share/ovirt-guest-agent/GuestAgentLinux2.py", line 472, in __init__
AgentLogicBase.__init__(self, config)
File "/usr/share/ovirt-guest-agent/OVirtAgentLogic.py", line 188, in __init__
self.vio = VirtIoChannel(config.get("virtio", "device_prefix"))
File "/usr/share/ovirt-guest-agent/VirtIoChannel.py", line 162, in __init__
self._stream = VirtIoStream(vport_name)
File "/usr/share/ovirt-guest-agent/VirtIoChannel.py", line 143, in __init__
self._vport = os.open(vport_name, os.O_RDWR)
OSError: [Errno 13] Permission denied: '/dev/virtio-ports/ovirt-guest-agent.0'
As a workaround for this problem, I use this:
# cat /etc/udev/rules.d/55-ovirt-guest-agent.rules
SYMLINK=="virtio-ports/ovirt-guest-agent.0", OWNER="ovirtagent", GROUP="ovirtagent"
refresh udev:
# udevadm trigger --subsystem-match="virtio-ports"
# systemctl restart ovirt-guest-agent.service
# systemctl status ovirt-guest-agent.service
* ovirt-guest-agent.service - oVirt Guest Agent
Loaded: loaded (/lib/systemd/system/ovirt-guest-agent.service; enabled)
Active: active (running) since Wed 2018-01-03 22:54:56 MSK; 6s ago
Process: 23252 ExecStartPre=/bin/chown ovirtagent:ovirtagent /run/ovirt-guest-agent.pid (code=exited, status=0/SUCCESS)
Process: 23249 ExecStartPre=/bin/touch /run/ovirt-guest-agent.pid (code=exited, status=0/SUCCESS)
Process: 23247 ExecStartPre=/sbin/modprobe virtio_console (code=exited, status=0/SUCCESS)
Main PID: 23255 (python)
CGroup: /system.slice/ovirt-guest-agent.service
L-23255 /usr/bin/python /usr/share/ovirt-guest-agent/ovirt-guest-agent.py
Now the service is working.
But I do not know if it's the right way :(
05.01.2018, 19:58, "Ed Stout" <edstout at gmail.com>:
> On 5 January 2018 at 10:32, Алексей Максимов
> <aleksey.i.maksimov at yandex.ru> wrote:
>> A similar problem is described here:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=1472293
>>
>> But there is no solution.
>
> There is, but its a bit sparse in the bug report - this worked for me
> on Ubuntu, same problem:
>
> ##
> So I changed value in /etc/ovirt-guest-agent.conf to look like:
> [virtio]
> # device = /dev/virtio-ports/com.redhat.rhevm.vdsm
> device = /dev/virtio-ports/ovirt-guest-agent.0
> ##
>
> Then...
>
> ##
>
> cat /etc/udev/rules.d/55-ovirt-guest-agent.rules
> SYMLINK=="virtio-ports/ovirt-guest-agent.0", OWNER="ovirtagent",
> GROUP="ovirtagent"
>
> udevadm trigger --subsystem-match="virtio-ports"
> ##
>
> After that, the service started for me.
>
>> 02.01.2018, 18:15, "Алексей Максимов" <aleksey.i.maksimov at yandex.ru>:
>>> Hello, oVirt guru's
>>>
>>> I just successfully updated my oVirt HE to 4.2.
>>> But after I upgraded all hosts and virtual machine restart, the ovirt-guest-agent.service has stopped running in virtual machines with Debian Jessie.
>>>
>>> ----
>>>
>>> # lsb_release -a
>>>
>>> No LSB modules are available.
>>> Distributor ID: Debian
>>> Description: Debian GNU/Linux 8.10 (jessie)
>>> Release: 8.10
>>> Codename: jessie
>>>
>>> ----
>>>
>>> # dpkg -l | grep ovirt
>>>
>>> ii ovirt-guest-agent 1.0.10.2.dfsg-2+deb8u1 all daemon that resides within guest virtual machines
>>>
>>> Note: This package installed from Debian Jessie official repo
>>>
>>> ----
>>>
>>> # systemctl status ovirt-guest-agent.service
>>>
>>> ● ovirt-guest-agent.service - oVirt Guest Agent
>>> Loaded: loaded (/lib/systemd/system/ovirt-guest-agent.service; disabled)
>>> Active: failed (Result: exit-code) since Tue 2018-01-02 17:36:29 MSK; 23min ago
>>> Main PID: 3419 (code=exited, status=1/FAILURE)
>>>
>>> Jan 02 17:36:29 APP3 systemd[1]: Started oVirt Guest Agent.
>>> Jan 02 17:36:29 APP3 systemd[1]: ovirt-guest-agent.service: main process exited, code=exited, status=1/FAILURE
>>> Jan 02 17:36:29 APP3 systemd[1]: Unit ovirt-guest-agent.service entered failed state.
>>>
>>> ----
>>>
>>> From /var/log/ovirt-guest-agent/ovirt-guest-agent.log:
>>>
>>> MainThread::INFO::2018-01-02 17:36:29,764::ovirt-guest-agent::57::root::Starting oVirt guest agent
>>> MainThread::ERROR::2018-01-02 17:36:29,768::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 375, 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 2] No such file or directory: '/dev/virtio-ports/com.redhat.rhevm.vdsm'
>>>
>>> ----
>>>
>>> Before updating to version 4.2 (for version 4.1.8) everything worked fine.
>>>
>>> Please help solve the problem
>>
>> --
>> С наилучшими пожеланиями,
>> Максимов Алексей
>>
>> Email: Aleksey.I.Maksimov at Yandex.ru
>> _______________________________________________
>> Users mailing list
>> Users at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
--
С наилучшими пожеланиями,
Максимов Алексей
Email: Aleksey.I.Maksimov at Yandex.ru
More information about the Users
mailing list