Fix ovn dbs monitoring test for podified
Use 'unix' rather than 'punix' when running monitoring command in ovsdbserver pod since 'punix' is a passive, a.k.a. listening side of a connection. Fix typo in ovnsb_db.sock path. Change-Id: Id384e20ff0c786032fff18ca287ecd9bc32db06b
This commit is contained in:
parent
dcce239747
commit
ebd07ef03b
@ -1202,18 +1202,22 @@ class BaseTempestTestCaseOvn(BaseTempestWhiteboxTestCase):
|
||||
|
||||
@classmethod
|
||||
def _get_ovn_db_monitor_cmds(cls):
|
||||
monitorcmdprefix = 'sudo timeout 300 ovsdb-client monitor -f json '
|
||||
monitorcmdprefix = 'timeout 300 ovsdb-client monitor -f json '
|
||||
if WB_CONF.openstack_type == 'podified':
|
||||
# (rsafrono) still need to re-check if works properly
|
||||
nb_monitor_connection_opts = cls.nbctl.replace(
|
||||
'ovn-nbctl', '{} punix:/tmp/ovnnb_db.sock'.format(
|
||||
monitorcmdprefix.replace('sudo', '')))
|
||||
'ovn-nbctl', '{} unix:/tmp/ovnnb_db.sock'.format(
|
||||
monitorcmdprefix))
|
||||
sb_monitor_connection_opts = cls.sbctl.replace(
|
||||
'ovn-sbctl', '{} punix:/tmp/ovsnb_db.sock'.format(
|
||||
monitorcmdprefix.replace('sudo', '')))
|
||||
return (nb_monitor_connection_opts, sb_monitor_connection_opts)
|
||||
'ovn-sbctl', '{} unix:/tmp/ovnsb_db.sock'.format(
|
||||
monitorcmdprefix))
|
||||
# strip --db parameter from connection opts since we're
|
||||
# going to run monitoring via a local socket
|
||||
return tuple(map(
|
||||
lambda cmd: re.sub(r'--db=[^\s]+', '', cmd),
|
||||
[nb_monitor_connection_opts, sb_monitor_connection_opts]))
|
||||
if WB_CONF.openstack_type == 'devstack':
|
||||
regex = r'--db=(.*)$'
|
||||
monitorcmdprefix = 'sudo ' + monitorcmdprefix
|
||||
# this regex search will return the connection string
|
||||
# (tcp:IP:port or ssl:IP:port) and in case of TLS,
|
||||
# will also include the TLS options
|
||||
|
Loading…
x
Reference in New Issue
Block a user