[
https://issues.apache.org/jira/browse/CASSANDRA-12485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15580851#comment-15580851
]
Christopher Licata edited comment on CASSANDRA-12485 at 10/21/16 4:40 PM:
---------------------------------------------------------------------------
The following patch for the trunk will, I believe, meet the requirements for
this issue. [~pauloricardomg], let me know what your thoughts are.
| *patch* | *dtest* |
| [12485-trunk | https://github.com/cmlicata/cassandra/commits/12485-trunk ]|
Coming Soon |
Additionally, could give me some tips on how write the dtests for this as well
as how to execute them successfully?
Currently, when trying to run the replace_address_test.py dtests I am getting
the following error:
{noformat}
Inserting 1k entries with rf=3 with stress...
ERROR
removing ccm cluster test at:
/var/folders/qv/49qsd41n44q92frdc0sc95j0zcj6z5/T/dtest-d4G7dI
clearing ssl stores from
[/var/folders/qv/49qsd41n44q92frdc0sc95j0zcj6z5/T/dtest-d4G7dI] directory
======================================================================
ERROR: fail_without_replace_test (replace_address_test.TestReplaceAddress)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/xle012/cstar/cassandra-dtest/tools/decorators.py", line 46, in
wrapped
f(obj)
File "/Users/xle012/cstar/cassandra-dtest/replace_address_test.py", line 338,
in fail_without_replace_test
self._insert_data()
File "/Users/xle012/cstar/cassandra-dtest/replace_address_test.py", line 127,
in _insert_data
whitelist=whitelist)
File "/Users/xle012/cstar/ccm/ccmlib/node.py", line 1256, in stress
return handle_external_tool_process(p, ['stress'] + stress_options)
File "/Users/xle012/cstar/ccm/ccmlib/node.py", line 1982, in
handle_external_tool_process
raise ToolError(cmd_args, rc, out, err)
ToolError: Subprocess ['stress', 'write', 'n=1k', 'no-warmup', '-schema',
'replication(factor=3)'] exited with non-zero status; exit status: 1;
stderr: Error: Could not find or load main class
org.apache.cassandra.stress.Stress}}
{noformat}
Not sure why the test cannot see that class -- I followed the installation and
build instructions by [~jkni] [here |
https://github.com/riptano/cassandra-dtest/blob/master/INSTALL.md].
was (Author: cmlicata):
The following patch for the trunk will, I believe, meet the requirements for
this issue. Let me know what your thoughts are.
| *patch* | *dtest* |
| [12485-trunk | https://github.com/cmlicata/cassandra/commits/12485-trunk ]|
Coming Soon |
Additionally, could give me some tips on how write the dtests for this as well
as how to execute them successfully?
Currently, when trying to run the replace_address_test.py dtests I am getting
the following error:
{noformat}
Inserting 1k entries with rf=3 with stress...
ERROR
removing ccm cluster test at:
/var/folders/qv/49qsd41n44q92frdc0sc95j0zcj6z5/T/dtest-d4G7dI
clearing ssl stores from
[/var/folders/qv/49qsd41n44q92frdc0sc95j0zcj6z5/T/dtest-d4G7dI] directory
======================================================================
ERROR: fail_without_replace_test (replace_address_test.TestReplaceAddress)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/xle012/cstar/cassandra-dtest/tools/decorators.py", line 46, in
wrapped
f(obj)
File "/Users/xle012/cstar/cassandra-dtest/replace_address_test.py", line 338,
in fail_without_replace_test
self._insert_data()
File "/Users/xle012/cstar/cassandra-dtest/replace_address_test.py", line 127,
in _insert_data
whitelist=whitelist)
File "/Users/xle012/cstar/ccm/ccmlib/node.py", line 1256, in stress
return handle_external_tool_process(p, ['stress'] + stress_options)
File "/Users/xle012/cstar/ccm/ccmlib/node.py", line 1982, in
handle_external_tool_process
raise ToolError(cmd_args, rc, out, err)
ToolError: Subprocess ['stress', 'write', 'n=1k', 'no-warmup', '-schema',
'replication(factor=3)'] exited with non-zero status; exit status: 1;
stderr: Error: Could not find or load main class
org.apache.cassandra.stress.Stress}}
{noformat}
Not sure why the test cannot see that class -- I followed the installation and
build instructions by [~jkni] [here |
https://github.com/riptano/cassandra-dtest/blob/master/INSTALL.md].
> Always require replace_address to replace existing token
> --------------------------------------------------------
>
> Key: CASSANDRA-12485
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12485
> Project: Cassandra
> Issue Type: Improvement
> Components: Distributed Metadata
> Reporter: Paulo Motta
> Priority: Minor
> Labels: lhf
>
> CASSANDRA-10134 prevented replace an existing node unless
> {{\-Dcassandra.replace_address}} or
> {{\-Dcassandra.allow_unsafe_replace=true}} is specified.
> We should extend this behavior to tokens, preventing a node from joining the
> ring if another node with the same token already existing in the ring, unless
> {{\-Dcassandra.replace_address}} or
> {{\-Dcassandra.allow_unsafe_replace=true}} is specified in order to avoid
> catastrophic scenarios.
> One scenario where this can easily happen is if you replace a node with
> another node with a different IP, and after some time you restart the
> original node by mistake. The original node will then take over the tokens of
> the replaced node (since it has a newer gossip generation).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)