Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13640

CQLSH error when using 'login' to switch users

    XMLWordPrintableJSON

Details

    • Low

    Description

      Using PasswordAuthenticator and CassandraAuthorizer:

      bin/cqlsh -u cassandra -p cassandra
      Connected to Test Cluster at 127.0.0.1:9042.
      [cqlsh 5.0.1 | Cassandra 3.0.14-SNAPSHOT | CQL spec 3.4.0 | Native protocol v4]
      Use HELP for help.
      cassandra@cqlsh> create role super with superuser = true and password = 'p' and login = true;
      cassandra@cqlsh> login super;
      Password:
      super@cqlsh> list roles;
      
      'Row' object has no attribute 'values'
      

      When we initialize the Shell, we configure certain settings on the session object such as

      self.session.default_timeout = request_timeout
      self.session.row_factory = ordered_dict_factory
      self.session.default_consistency_level = cassandra.ConsistencyLevel.ONE
      

      However, once we perform a LOGIN cmd, which calls do_login(..), we create a new cluster/session object but actually never set those settings on the new session.

      It isn't failing on 3.x.

      As a workaround, it is possible to logout and log back in and things work correctly.

      Attachments

        Issue Links

          Activity

            People

              adelapena Andres de la Peña
              adelapena Andres de la Peña
              Andres de la Peña
              Zhao Yang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: