2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ovsdb: Use better error message for "timeout" without waiting.

When setting a where clause, if the timeout is set to a value of 0,
the clause is tested once and if it fails, a message of '"wait" timed
out' is returned.  This can be misleading because there wasn't any
real time, so change the message to '"where" clause test failed'.

Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
Reported-by: Ryan Moats <rmoats@us.ibm.com>
Reported-at: http://openvswitch.org/pipermail/dev/2016-August/077083.html
Fixes: f85f8ebb ("Initial implementation of OVSDB.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ryan Moats
2016-08-03 19:07:38 +00:00
committed by Ben Pfaff
parent 0deb0f6d69
commit cd423a77c6
2 changed files with 5 additions and 4 deletions

View File

@@ -697,7 +697,8 @@ ovsdb_execute_wait(struct ovsdb_execution *x, struct ovsdb_parser *parser,
"\"wait\" timed out after %lld ms", "\"wait\" timed out after %lld ms",
x->elapsed_msec); x->elapsed_msec);
} else { } else {
error = ovsdb_error("timed out", "\"wait\" timed out"); error = ovsdb_error("timed out",
"\"where\" clause test failed");
} }
} else { } else {
/* ovsdb_execute() will change this, if triggers really are /* ovsdb_execute() will change this, if triggers really are

View File

@@ -471,7 +471,7 @@ OVSDB_CHECK_EXECUTION([equality wait with extra row],
"rows": [{"name": "zero", "number": 0}, "rows": [{"name": "zero", "number": 0},
{"name": "one", "number": 1}, {"name": "one", "number": 1},
{"name": "two", "number": 2}]}]]]], {"name": "two", "number": 2}]}]]]],
[[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"wait\" timed out","error":"timed out"}] [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}]
]]) ]])
OVSDB_CHECK_EXECUTION([equality wait with missing row], OVSDB_CHECK_EXECUTION([equality wait with missing row],
@@ -490,7 +490,7 @@ OVSDB_CHECK_EXECUTION([equality wait with missing row],
"columns": ["name", "number"], "columns": ["name", "number"],
"until": "==", "until": "==",
"rows": [{"name": "one", "number": 1}]}]]]], "rows": [{"name": "one", "number": 1}]}]]]],
[[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"wait\" timed out","error":"timed out"}] [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}]
]]) ]])
OVSDB_CHECK_EXECUTION([inequality wait with correct rows], OVSDB_CHECK_EXECUTION([inequality wait with correct rows],
@@ -510,7 +510,7 @@ OVSDB_CHECK_EXECUTION([inequality wait with correct rows],
"until": "!=", "until": "!=",
"rows": [{"name": "zero", "number": 0}, "rows": [{"name": "zero", "number": 0},
{"name": "one", "number": 1}]}]]]], {"name": "one", "number": 1}]}]]]],
[[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"wait\" timed out","error":"timed out"}] [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}]
]]) ]])
OVSDB_CHECK_EXECUTION([inequality wait with extra row], OVSDB_CHECK_EXECUTION([inequality wait with extra row],