Starting with Ubuntu 16.10, it also comes with libvirtd and
differentiate it from other distros is not necessary anymore.
It also fixes an issue on libvirt service status verification
causing failure on Kimchi plugin loading:
dev@u1610:$ systemctl is-active libvirt-bin.service
inactive
dev@u1610:$ systemctl is-active libvirtd.service
active
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
utils.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/utils.py b/utils.py
index 26d3cf6..1e2c951 100644
--- a/utils.py
+++ b/utils.py
@@ -20,7 +20,6 @@
import contextlib
import json
-import platform
import re
import sqlite3
import time
@@ -264,11 +263,6 @@ def is_libvirtd_up():
"""
Checks if libvirtd.service is up.
"""
- distro, _, _ = platform.linux_distribution()
- if distro.lower() == 'ubuntu':
- cmd = ['systemctl', 'is-active', 'libvirt-bin.service']
- else:
- cmd = ['systemctl', 'is-active', 'libvirtd.service']
-
+ cmd = ['systemctl', 'is-active', 'libvirtd.service']
output, error, rc = run_command(cmd, silent=True)
return True if output == 'active\n' else False
--
2.7.4