@@ -2328,10 +2328,6 @@ do_wait(struct jsonrpc *rpc_unused OVS_UNUSED,
const char *database_unused OVS_UNUSED,
int argc, char *argv[])
{
- vlog_set_levels(NULL, VLF_CONSOLE, VLL_WARN);
- vlog_set_levels_from_string_assert("reconnect:err");
- vlog_set_levels_from_string_assert("jsonrpc:err");
-
const char *database = argv[argc - 2];
const char *state = argv[argc - 1];
@@ -18,7 +18,7 @@ ovsdb_check_cluster () {
AT_CHECK([ovsdb-server -vraft -vconsole:off -vsyslog:off --detach --no-chdir --log-file=s$i.log --pidfile=s$i.pid --unixctl=s$i --remote=punix:s$i.ovsdb s$i.db])
done
for i in `seq $n`; do
- AT_CHECK([ovsdb-client --timeout=30 wait unix:s$i.ovsdb $schema connected])
+ AT_CHECK([ovsdb_client_wait unix:s$i.ovsdb $schema connected])
done
for txn
@@ -100,14 +100,14 @@ ovsdb|WARN|schema: changed 2 columns in 'OVN_Southbound' database from ephemeral
connect_server() {
local i=$1
printf "\ns$i: waiting to connect to storage\n"
- AT_CHECK([ovsdb-client --timeout=30 -vtimeval:off -vfile -vsyslog:off -vvlog:off --log-file=connect$i.log wait unix:s$i.ovsdb $schema connected])
+ AT_CHECK([ovsdb_client_wait --log-file=connect$i.log unix:s$i.ovsdb $schema connected])
}
remove_server() {
local i=$1
printf "\ns$i: removing from cluster\n"
AT_CHECK([ovs-appctl --timeout=30 -t "`pwd`"/s$i cluster/leave OVN_Southbound])
printf "\ns$i: waiting for removal to complete\n"
- AT_CHECK([ovsdb-client --timeout=30 -vtimeval:off -vfile -vsyslog:off -vvlog:off --log-file=remove$i.log wait unix:s$i.ovsdb $schema removed])
+ AT_CHECK([ovsdb_client_wait --log-file=remove$i.log unix:s$i.ovsdb $schema removed])
stop_server $i
}
add_server() {
@@ -668,7 +668,7 @@ ovsdb_check_online_compaction() {
fi])
dnl Start ovsdb-server.
AT_CHECK([ovsdb-server -vvlog:off -vconsole:off --detach --no-chdir --pidfile --remote=punix:socket --log-file db], [0])
- AT_CHECK([ovsdb-client wait unix:socket ordinals connected])
+ AT_CHECK([ovsdb_client_wait unix:socket ordinals connected])
AT_CAPTURE_FILE([ovsdb-server.log])
dnl Do a bunch of random transactions that put crap in the database log.
AT_CHECK(
@@ -452,7 +452,7 @@ ovsdb-tool create-cluster db2 db1 unix:s1.raft
# Dump the data.
AT_CHECK([ovsdb-server -vconsole:off -vfile -vvlog:off --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db2])
-AT_CHECK([ovsdb-client wait ordinals connected])
+AT_CHECK([ovsdb_client_wait ordinals connected])
AT_CHECK([ovsdb-client dump > dump2])
OVS_APP_EXIT_AND_WAIT([ovsdb-server])
@@ -129,6 +129,12 @@ m4_define([OVSDB_CHECK_NEGATIVE_CPY],
OVSDB_CHECK_NEGATIVE_PY([$1 - Python2], [$2], [$3], [$4], [$5])
OVSDB_CHECK_NEGATIVE_PY3([$1 - Python3], [$2], [$3], [$4], [$5])])
+OVS_START_SHELL_HELPERS
+ovsdb_client_wait() {
+ ovsdb-client -vconsole:warn -vreconnect:err -vjsonrpc:err -vtimeval:off -vfile -vsyslog:off -vvlog:off --timeout=30 wait "$@"
+}
+OVS_END_SHELL_HELPERS
+
m4_include([tests/ovsdb-log.at])
m4_include([tests/ovsdb-types.at])
m4_include([tests/ovsdb-data.at])
The "wait" command in ovsdb-client (which was introduced as part of the clustering support) fairly often logs things that are normal for it but in other circumstances might be cause for concern, for example messages about being unable to connect to a remote. Until now, it has tried to suppress some of those itself by raising log levels. Unfortunately, in some cases this had the opposite effect because it overrode any settings on the command line, such as an attempt in ovsdb-cluster.at to suppress all logging related to the timeval module. This commit drops the special log levels from the "wait" command and puts equivalents into the tests themselves. Signed-off-by: Ben Pfaff <blp@ovn.org> --- ovsdb/ovsdb-client.c | 4 ---- tests/ovsdb-cluster.at | 6 +++--- tests/ovsdb-server.at | 2 +- tests/ovsdb-tool.at | 2 +- tests/ovsdb.at | 6 ++++++ 5 files changed, 11 insertions(+), 9 deletions(-)