Hi to all!
I can't use the after_xxxx hooks in the guest agent (version: 1.0.16-1.el7) installed
in a centos 7 machine in a ovirt 4.3 cluster, but the before_xxxxx hooks are executed
without problem
The same machine in an old ovirt cluster was ok with the same hooks.
This is the ovirt-guest-agent.log
MainThread::INFO::2019-06-18 13:15:11,192::ovirt-guest-agent::59::root::Starting oVirt
guest agent
Dummy-2::INFO::2019-06-18 13:15:11,326::OVirtAgentLogic::322::root::Received an external
command: refresh...
Dummy-2::INFO::2019-06-18 13:15:20,990::OVirtAgentLogic::322::root::Received an external
command: api-version...
Dummy-2::INFO::2019-06-18 13:15:20,990::OVirtAgentLogic::118::root::API Version updated
from 0 to 3
Dummy-2::INFO::2019-06-18 13:17:05,391::OVirtAgentLogic::322::root::Received an external
command: lifecycle-event...
Dummy-2::INFO::2019-06-18 13:17:05,440::hooks::64::Hooks::Hook(before_migration)
"/etc/ovirt-guest-agent/hooks.d/before_migration/55_flush-caches" executed
Dummy-2::INFO::2019-06-18 13:17:24,329::OVirtAgentLogic::322::root::Received an external
command: refresh...
Dummy-2::INFO::2019-06-18 13:18:24,605::OVirtAgentLogic::322::root::Received an external
command: api-version...
As you can see, the agent does not receive the lifecycle-event for after-migration
I look in the vdsm and supervdsm log, also in debug level, but seem all normal
the xml of the machine contain the virtio-serial
<controller index="0" ports="16"
type="virtio-serial">
<alias name="ua-9785547d-0e2d-4139-8952-010fe4874800"/>
<address bus="0x00" domain="0x0000" function="0x0"
slot="0x06" type="pci"/>
</controller>
.
.
.
.
.
<channel type="unix">
<source mode="bind"
path="/var/lib/libvirt/qemu/channels/27f3d4d0-f3d2-41bf-a8da-e6e75aad51f6.ovirt-guest-agent.0"/>
<target name="ovirt-guest-agent.0" state="connected"
type="virtio"/>
<alias name="channel0"/>
<address bus="0" controller="0" port="1"
type="virtio-serial"/>
</channel>
<channel type="unix">
<source mode="bind"
path="/var/lib/libvirt/qemu/channels/27f3d4d0-f3d2-41bf-a8da-e6e75aad51f6.org.qemu.guest_agent.0"/>
<target name="org.qemu.guest_agent.0" state="connected"
type="virtio"/>
<alias name="channel1"/>
<address bus="0" controller="0" port="2"
type="virtio-serial"/>
</channel>
I tried also with another 2 machines with a fresh install of centos 7 and guest-agent but
nothing.
The guest agent does not have any error in
systemctl status ovirt-guest-agent
This is my hook in /etc/ovirt-guest-agent/hooks.d/after_migration
-rwxrwxrwx. 1 root root 34 Jun 14 12:48 01_example
and this is the content:
#!/bin/bash
touch /tmp/prova
this script in before_xxxx start without problems
Someone have some suggestion or some log to see to solve this problem?
Thank you!