Skip to content

Commit

Permalink
virt_admin: Fix failed to connect to the admin server issue
Browse files Browse the repository at this point in the history
Signed-off-by: lcheng <lcheng@redhat.com>
  • Loading branch information
cliping committed Jan 5, 2025
1 parent e5f4080 commit 2677b74
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def run(test, params, env):
max_workers_gt_nworkers = params.get("max_workers_gt_nworkers") == "yes"
options_test_together = params.get("options_test_together") == "yes"

process.run("systemctl status virtproxyd-admin.socket", shell=True, debug=True)
process.run("systemctl status virtproxyd", shell=True, debug=True)
virtproxyd_admin_socket = utils_libvirtd.DaemonSocket("virtproxyd-admin.socket")
virtproxyd_admin_socket.restart()

if not server_name:
server_name = virt_admin.check_server_name()

Expand Down
6 changes: 6 additions & 0 deletions libvirt/tests/src/virt_admin/monitor/virt_admin_srv_list.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import re

from virttest import utils_libvirtd
from virttest import virt_admin


Expand All @@ -14,6 +16,10 @@ def run(test, params, env):
if not server_name:
server_name = virt_admin.check_server_name()

process.run("systemctl status virtproxyd-admin.socket", shell=True, debug=True)
process.run("systemctl status virtproxyd", shell=True, debug=True)
virtproxyd_admin_socket = utils_libvirtd.DaemonSocket("virtproxyd-admin.socket")
virtproxyd_admin_socket.restart()
vp = virt_admin.VirtadminPersistent()
result = vp.srv_list(ignore_status=True, debug=True)
output = result.stdout.strip()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def run(test, params, env):
if not server_name:
server_name = virt_admin.check_server_name()

process.run("systemctl status virtproxyd-admin.socket", shell=True, debug=True)
process.run("systemctl status virtproxyd", shell=True, debug=True)
virtproxyd_admin_socket = utils_libvirtd.DaemonSocket("virtproxyd-admin.socket")
virtproxyd_admin_socket.restart()

config = virt_admin.managed_daemon_config()
daemon = utils_libvirtd.Libvirtd("virtproxyd")

Expand Down
5 changes: 5 additions & 0 deletions libvirt/tests/src/virt_admin/virt_admin_itself.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from avocado.utils import process
from avocado.core import exceptions

from virttest import utils_libvirtd
from virttest import virt_admin


Expand Down Expand Up @@ -73,6 +74,10 @@ def run(test, params, env):
pwd_status_error = params.get("pwd_status_error", "no")
echo_status_error = params.get("echo_status_error", "no")

process.run("systemctl status virtproxyd-admin.socket", shell=True, debug=True)
process.run("systemctl status virtproxyd", shell=True, debug=True)
virtproxyd_admin_socket = utils_libvirtd.DaemonSocket("virtproxyd-admin.socket")
virtproxyd_admin_socket.restart()
# Run virtadmin command in interactive mode
vp = virt_admin.VirtadminPersistent()

Expand Down

0 comments on commit 2677b74

Please sign in to comment.