You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Vinay Chella (Jira)" <ji...@apache.org> on 2019/09/06 22:44:00 UTC
[jira] [Updated] (CASSANDRA-15315) Fix failing test -
test_rolling_upgrade_with_internode_ssl -
upgrade_tests.upgrade_through_versions_test.TestProtoV4Upgrade_AllVersions_RandomPartitioner_EndsAt_Trunk_HEAD
[ https://issues.apache.org/jira/browse/CASSANDRA-15315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vinay Chella updated CASSANDRA-15315:
-------------------------------------
Fix Version/s: 4.0-alpha
> Fix failing test - test_rolling_upgrade_with_internode_ssl - upgrade_tests.upgrade_through_versions_test.TestProtoV4Upgrade_AllVersions_RandomPartitioner_EndsAt_Trunk_HEAD
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-15315
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15315
> Project: Cassandra
> Issue Type: Bug
> Reporter: Vinay Chella
> Priority: Normal
> Fix For: 4.0-alpha
>
>
> Example failure:
> [https://circleci.com/gh/vinaykumarchella/cassandra/468#tests/containers/11]
> [https://circleci.com/gh/vinaykumarchella/cassandra/451#tests/containers/11]
> {code:java}
> ccmlib.node.TimeoutError: 06 Sep 2019 20:21:39 [node2] Missing: ['127.0.0.1.* now UP']: INFO [HANDSHAKE-/127.0.0.1] 2019-09-06 20:17:43,8..... See system.log for remainder
> self = <upgrade_tests.upgrade_through_versions_test.TestProtoV4Upgrade_AllVersions_RandomPartitioner_EndsAt_Trunk_HEAD object at 0x7fbb75245a90>
> @pytest.mark.timeout(3000)
> def test_rolling_upgrade_with_internode_ssl(self):
> """
> Rolling upgrade test using internode ssl.
> """
> > self.upgrade_scenario(rolling=True, internode_ssl=True)
> upgrade_tests/upgrade_through_versions_test.py:296:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> upgrade_tests/upgrade_through_versions_test.py:352: in upgrade_scenario
> self.upgrade_to_version(version_meta, partial=True, nodes=(node,), internode_ssl=internode_ssl)
> upgrade_tests/upgrade_through_versions_test.py:456: in upgrade_to_version
> node.start(wait_other_notice=240, wait_for_binary_proto=True)
> ../env/src/ccm/ccmlib/node.py:751: in start
> node.watch_log_for_alive(self, from_mark=mark, timeout=wait_other_notice)
> ../env/src/ccm/ccmlib/node.py:568: in watch_log_for_alive
> self.watch_log_for(tofind, from_mark=from_mark, timeout=timeout, filename=filename)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> self = <ccmlib.node.Node object at 0x7fbb7538b748>
> exprs = ['127.0.0.1.* now UP'], from_mark = 151813, timeout = 240
> process = None, verbose = False, filename = 'system.log'
> def watch_log_for(self, exprs, from_mark=None, timeout=600, process=None, verbose=False, filename='system.log'):
> """
> Watch the log until one or more (regular) expression are found.
> This methods when all the expressions have been found or the method
> timeouts (a TimeoutError is then raised). On successful completion,
> a list of pair (line matched, match object) is returned.
> """
> start = time.time()
> tofind = [exprs] if isinstance(exprs, string_types) else exprs
> tofind = [re.compile(e) for e in tofind]
> matchings = []
> reads = ""
> if len(tofind) == 0:
> return None
>
> log_file = os.path.join(self.get_path(), 'logs', filename)
> output_read = False
> while not os.path.exists(log_file):
> time.sleep(.5)
> if start + timeout < time.time():
> raise TimeoutError(time.strftime("%d %b %Y %H:%M:%S", time.gmtime()) + " [" + self.name + "] Timed out waiting for {} to be created.".format(log_file))
> if process and not output_read:
> process.poll()
> if process.returncode is not None:
> self.print_process_output(self.name, process, verbose)
> output_read = True
> if process.returncode != 0:
> raise RuntimeError() # Shouldn't reuse RuntimeError but I'm lazy
>
> with open(log_file) as f:
> if from_mark:
> f.seek(from_mark)
>
> while True:
> # First, if we have a process to check, then check it.
> # Skip on Windows - stdout/stderr is cassandra.bat
> if not common.is_win() and not output_read:
> if process:
> process.poll()
> if process.returncode is not None:
> self.print_process_output(self.name, process, verbose)
> output_read = True
> if process.returncode != 0:
> raise RuntimeError() # Shouldn't reuse RuntimeError but I'm lazy
>
> line = f.readline()
> if line:
> reads = reads + line
> for e in tofind:
> m = e.search(line)
> if m:
> matchings.append((line, m))
> tofind.remove(e)
> if len(tofind) == 0:
> return matchings[0] if isinstance(exprs, string_types) else matchings
> else:
> # yep, it's ugly
> time.sleep(1)
> if start + timeout < time.time():
> > raise TimeoutError(time.strftime("%d %b %Y %H:%M:%S", time.gmtime()) + " [" + self.name + "] Missing: " + str([e.pattern for e in tofind]) + ":\n" + reads[:50] + ".....\nSee {} for remainder".format(filename))
> E ccmlib.node.TimeoutError: 06 Sep 2019 20:21:39 [node2] Missing: ['127.0.0.1.* now UP']:
> E INFO [HANDSHAKE-/127.0.0.1] 2019-09-06 20:17:43,8.....
> E See system.log for remainder
> ../env/src/ccm/ccmlib/node.py:536: TimeoutError
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org