Skip to content

Commit 8de38b3

Browse files
lockerylobankov
authored andcommitted
Fix Tarantool restart detection in Server:grep_log
Server:grep_log assumes that the Tarantool instance was restarted and resets search if it finds a string matching 'Tarantool %d+.%d+.%d+-.*%d+-g.*' The problem is the warning message printed by box.cfg() if the instance needs a schema upgrade also matches this string: W> Your schema version is 2.10.5 while Tarantool 2.11.0-entrypoint-945-gbd02451ff84d requires a more recent schema version. Please, consider using box.schema.upgrade(). See https://github.com/tarantool/tarantool/blob/0479cfafc9615bc6eb69442f98735704c3bc5aa0/src/box/lua/load_cfg.lua#L1021-L1031 Fix the search string to make sure this doesn't happen. NO CHANGELOG because the luatest version where Server:grep_log was first introduced hasn't been released yet.
1 parent 58eae75 commit 8de38b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

luatest/server.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ function Server:grep_log(pattern, bytes_num, opts)
641641
line = table.concat(buf)
642642
buf = nil
643643
end
644-
if string.match(line, 'Tarantool %d+.%d+.%d+-.*%d+-g.*') and reset then
644+
if string.match(line, '> Tarantool %d+.%d+.%d+-.*%d+-g.*$') and reset then
645645
found = nil -- server was restarted, reset the result
646646
else
647647
found = string.match(line, pattern) or found

0 commit comments

Comments
 (0)