Package: mom
Version: 0.6.0-2
Severity: grave
Tags: patch
Justification: renders package unusable
Hello Dear Maintainer,
Looks like momd is "broken" in bullseye :-(
Service is failling every start with exception :
Jul 11 20:48:21 minas-anor momd[149966]: File
"/usr/lib/python3/dist-packages/mom/HypervisorInterfaces/libvirtInterface.py",
line 128, in _domainGetPid
Jul 11 20:48:21 minas-anor momd[149966]: matches =
re.findall(r"^\s*(\d+)\s+.*" + uuid, p1, re.M)
Jul 11 20:48:21 minas-anor momd[149966]: File
"/usr/lib/python3.9/re.py", line 241, in findall
Jul 11 20:48:21 minas-anor momd[149966]: return _compile(pattern,
flags).findall(string)
Jul 11 20:48:21 minas-anor momd[149966]: TypeError: cannot use a string
pattern on a bytes-like object
Comparing with current code for libvirtInterface.py in mom github
https://github.com/oVirt/mom/blob/master/mom/HypervisorInterfaces/libvirtInterface.py
I made modification in libvirtInterface.py line 128
#p1 = Popen(["ps", "axww"], stdout=PIPE).communicate()[0]
p1 = Popen(["ps", "axww"], stdout=PIPE).communicate()[0].decode("utf-8")
Sorry for not attaching a patch file, not sure it is needed for this change
After this little change momd is now working correctly and tacking care of VM
ballooning :-)
For the moment, i'm only using KVM + momd + balloning on test servers
(that's why i only discovered the issue now)
don't know if some other users are impacted in production.
I suppose bug is related to python 3.9, but not shure at all
Think a little "patch" release will be needed for debian package
Thank you for your time maintaining debian :-))
Here more complete log extract if needed
Jul 11 20:48:21 minas-anor momd[149966]: 2022-07-11 20:48:21,840 -
mom.GuestManager - ERROR - Guest Manager crashed
Jul 11 20:48:21 minas-anor momd[149966]: Traceback (most recent call last):
Jul 11 20:48:21 minas-anor momd[149966]: File
"/usr/lib/python3/dist-packages/mom/GuestManager.py", line 86, in run
Jul 11 20:48:21 minas-anor momd[149966]:
self._spawn_guest_monitors(domain_list)
Jul 11 20:48:21 minas-anor momd[149966]: File
"/usr/lib/python3/dist-packages/mom/GuestManager.py", line 112, in
_spawn_guest_monitors
Jul 11 20:48:21 minas-anor momd[149966]: info =
self.hypervisor_iface.getVmInfo(id)
Jul 11 20:48:21 minas-anor momd[149966]: File
"/usr/lib/python3/dist-packages/mom/HypervisorInterfaces/libvirtInterface.py",
line 189, in getVmInfo
Jul 11 20:48:21 minas-anor momd[149966]: data['pid'] =
self._domainGetPid(data['uuid'])
Jul 11 20:48:21 minas-anor momd[149966]: File
"/usr/lib/python3/dist-packages/mom/HypervisorInterfaces/libvirtInterface.py",
line 128, in _domainGetPid
Jul 11 20:48:21 minas-anor momd[149966]: matches =
re.findall(r"^\s*(\d+)\s+.*" + uuid, p1, re.M)
Jul 11 20:48:21 minas-anor momd[149966]: File "/usr/lib/python3.9/re.py",
line 241, in findall
Jul 11 20:48:21 minas-anor momd[149966]: return _compile(pattern,
flags).findall(string)
Jul 11 20:48:21 minas-anor momd[149966]: TypeError: cannot use a string pattern
on a bytes-like object
Jul 11 20:48:26 minas-anor momd[149966]: 2022-07-11 20:48:26,825 - mom - ERROR
- Thread 'GuestManager' has exited
-- System Information:
Debian Release: 11.4
APT prefers stable
APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'stable-security')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-8-amd64 (SMP w/6 CPU threads)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8),
LANGUAGE=en_IE:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mom depends on:
ii libvirt-daemon 7.0.0-3
ii libvirt-daemon-system 7.0.0-3
ii procps 2:3.3.17-5
ii python3 3.9.2-3
ii python3-libvirt 7.0.0-2
ii python3-six 1.16.0-2
mom recommends no packages.
mom suggests no packages.
-- Configuration Files:
/etc/momd.conf changed [not included]
-- no debconf information