Skip to content

Commit

Permalink
Fix OSError in postprocess
Browse files Browse the repository at this point in the history
Wrong order of clearing LibvirtdDebugLogConfig causes OSError.

Signed-off-by: lcheng <[email protected]>
  • Loading branch information
cliping committed Sep 10, 2024
1 parent 22b34aa commit 701de50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virttest/env_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,13 +1041,13 @@ def preprocess(test, params, env):
_setup_manager.register(CheckInstalledCMDs)
_setup_manager.register(UlimitConfig)
_setup_manager.register(NetworkProxies)
_setup_manager.register(LibvirtdDebugLogConfig)
_setup_manager.register(BridgeConfig)
_setup_manager.register(StorageConfig)
_setup_manager.register(FirewalldService)
_setup_manager.register(IPSniffer)
_setup_manager.register(StorageConfig)
_setup_manager.register(MigrationEnvSetup)
_setup_manager.register(UnrequestedVMHandler)
_setup_manager.register(LibvirtdDebugLogConfig)
_setup_manager.do_setup()

vm_type = params.get("vm_type")
Expand Down
3 changes: 3 additions & 0 deletions virttest/nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ class NFSClient(object):

def __init__(self, params):
self.nfs_client_ip = params.get("nfs_client_ip")
# Create /root/.ssh/known_hosts file
cmd = "ssh-keyscan %s >> ~/.ssh/known_hosts" % params.get("nfs_server_ip")
process.run(cmd, shell=True, ignore_status=True)
# To Avoid host key verification failure
ret = process.run("ssh-keygen -R %s" % self.nfs_client_ip, ignore_status=True)
stderr = ret.stderr_text
Expand Down

0 comments on commit 701de50

Please sign in to comment.