Bug 33741 - uvmmd-check.sh checks UVMMd, but restart libvirtd
uvmmd-check.sh checks UVMMd, but restart libvirtd
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 3.2
All Linux
: P3 normal (vote)
: UCS 3.2-0-errata
Assigned To: Philipp Hahn
Erik Damrose
:
Depends on:
Blocks: 28017 34321
  Show dependency treegraph
 
Reported: 2013-12-12 15:18 CET by Philipp Hahn
Modified: 2017-05-02 15:34 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Large environments, Troubleshooting, UCS Performance
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-12-12 15:18:05 CET
/usr/lib/univention-virtual-machine-manager-daemon/uvmmd-check.sh checks for "uvmm groups" to return any data, which communicates with *UVMMd*, which is running on the management node.

If no data is returned, it restart "libvirt-bin" AKA *libvirtd*, which is supposed to be running only the virtualization hosts.

Only when the management node is also a virtualization host does the script do anything useful.

Fix:
-                invoke-rc.d libvirt-bin restart >/dev/null 2>&1
+                invoke-rc.d univention-virtual-machine-manager-daemon restart >/dev/null 2>&1

In addition to that a similar script might be used on the virtualization hosts to check if libvirtd is still working:

#!/bin/bash
# Check for functional libvirtd
exec >>"/var/log/univention/virtual-machine-manager-daemon-errors.log" 2>&1
if [ -f /proc/xen/privcmd ]
then
  uri="xen+unix:///"
elif [ -c /dev/kvm ]
then
  uri="qemu:///system"
else
  exit 0
fi
if sv status /etc/runit/univention-libvirt | grep -q ^run
then
  tmpfile="$(mktemp)"
  trap "rm -f '$tmpfile'" EXIT
  virsh -c "$uri" list >"$tmpfile" &
  pid=$!
  sleep ${uvmm_check_timeout:-5}s
  if [ ! -s "$tmpfile" ]
  then
    kill $pid
    wait $pid
    invoke-rc.d libvirt-bin restart
  fi
fi
exit 0
Comment 1 Philipp Hahn univentionstaff 2014-01-21 13:14:49 CET
I currently see this issue at a big customer system, where 1537 from 1543 lines of uvmm-error.log claim, they would restart UVMMd, but actually don't do that.

IMHO this should be fixed ASAP!
Comment 2 Stefan Gohmann univentionstaff 2014-01-22 09:50:02 CET
(In reply to Philipp Hahn from comment #1)
> IMHO this should be fixed ASAP!

That was wrongly introduced with r36268 in UCS 3.1, Bug #19145.
Comment 3 Philipp Hahn univentionstaff 2014-01-22 10:13:14 CET
r47339 | Bug #33741: UVMM: Fix check-script to restart UVMMd
univention-virtual-machine-manager-daemon_3.0.17-3.482.201401221005
r47340 | Bug #33741: UVMM: Fix check-script to restart UVMMd (YAML)
Comment 4 Erik Damrose univentionstaff 2014-01-22 11:35:47 CET
OK: The fix works and the script now actually restarts uvmm
OK: YAML

-> Verified
Comment 5 Moritz Muehlenhoff univentionstaff 2014-01-22 12:02:34 CET
http://errata.univention.de/ucs/3.2/28.html