Use 'oc exec' when retrieving ovsdb command string
It was found that sometimes an unexpected output returned when using 'oc rsh' on attempt to get ovsdb command string from db pod. This was causing an AssertingError and a test failure. Compared to 'oc rsh' the issue does not happen when using 'oc exec' command. Also running ps in the background using setsid helps to avoid sporadic errors due to [1]. [1] https://github.com/kubevirt/kubevirt/issues/10240 Change-Id: I77530691613ca352ce5e5650b3a2450a7003f459
This commit is contained in:
parent
fefb4e1292
commit
b0e46fc16a
@ -1243,11 +1243,13 @@ class BaseTempestTestCaseOvn(BaseTempestWhiteboxTestCase):
|
||||
command_items.append('--db="{}"'.format(all_db_addresses))
|
||||
|
||||
# obtain the ovsdb-server command running on this pod
|
||||
# `|| true` added to prevent the following issue:
|
||||
# setsid added to prevent the following issue:
|
||||
# https://github.com/kubevirt/kubevirt/issues/10240
|
||||
# `||true` ensures a safe exit.
|
||||
cmd = ' '.join((cls.OC,
|
||||
'rsh',
|
||||
'exec',
|
||||
db_pod,
|
||||
'-- setsid',
|
||||
'ps -o command -C ovsdb-server --no-headers -ww',
|
||||
'|| true'))
|
||||
ovsdb_server_cmd = cls.proxy_host_client.exec_command(cmd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user