[ 
https://issues.apache.org/jira/browse/CASSANDRA-16352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17249841#comment-17249841
 ] 

David Capwell commented on CASSANDRA-16352:
-------------------------------------------

Skimming the code quickly, I think the issue is in 
dtest_setup.py::_create_session

{code}
def _create_session(self, node, keyspace, user, password, compression, 
protocol_version,
                        port=None, ssl_opts=None, execution_profiles=None, 
**kwargs):
...
        if protocol_version is None:
            protocol_version = 
get_eager_protocol_version(node.cluster.version())
...
{code}

cluster.version is the max version, not the min version.  We also ignore the 
node in question, so this logic doesn't look safe in mixed-mode.

Then again, the eager logic says 2.2 allows protocol 4

{code}
def get_eager_protocol_version(cassandra_version):
    """
    Returns the highest protocol version accepted
    by the given C* version
    """
    if cassandra_version >= '2.2':
        protocol_version = 4
    elif cassandra_version >= '2.1':
        protocol_version = 3
    elif cassandra_version >= '2.0':
        protocol_version = 2
    else:
        protocol_version = 1
    return protocol_version
{code}

> Fix upgrade python dtest test_crc_check_chance_upgrade - 
> upgrade_crc_check_chance_test.TestCrcCheckChanceUpgrade
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-16352
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16352
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CI, Test/dtest/python
>            Reporter: David Capwell
>            Priority: Normal
>             Fix For: 4.0-beta
>
>
> https://app.circleci.com/pipelines/github/dcapwell/cassandra/850/workflows/79486fdd-06d0-4d04-aa32-0fa648182356/jobs/5019/tests
> test_crc_check_chance_upgrade - 
> upgrade_crc_check_chance_test.TestCrcCheckChanceUpgrade
> upgrade_crc_check_chance_test.py
> {code}
> >       self.verify_new_crc_check_chance(node1)
> upgrade_crc_check_chance_test.py:66: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> upgrade_crc_check_chance_test.py:115: in verify_new_crc_check_chance
>     session = self.patient_exclusive_cql_connection(node)
> dtest_setup.py:278: in patient_exclusive_cql_connection
>     **kwargs
> dtest_setup.py:39: in retry_till_success
>     return fun(*args, **kwargs)
> dtest_setup.py:188: in exclusive_cql_connection
>     **kwargs)
> dtest_setup.py:216: in _create_session
>     session = cluster.connect(wait_for_all_pools=True)
> cassandra/cluster.py:1667: in cassandra.cluster.Cluster.connect
>     ???
> cassandra/cluster.py:1703: in cassandra.cluster.Cluster.connect
>     ???
> cassandra/cluster.py:1690: in cassandra.cluster.Cluster.connect
>     ???
> cassandra/cluster.py:3488: in cassandra.cluster.ControlConnection.connect
>     ???
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> >   ???
> E   cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', 
> {'127.0.0.1:9042': DriverException('ProtocolError returned from server while 
> using explicitly set client protocol_version 4',)})
> cassandra/cluster.py:3533: NoHostAvailable
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to