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

cqlsh copyutil should get host metadata by connected address

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Severity:
      Low

      Description

      pylib.copyutil presently accesses cluster metadata using shell.hostname which could be an unresolved hostname.
      https://github.com/apache/cassandra/blob/58d3b9a90461806d44dd85bf4aa928e575d5fb6c/pylib/cqlshlib/copyutil.py#L207

      Cluster metadata normally refers to hosts in terms of numeric host address, not hostname. This works in the current integration because the driver allows hosts with unresolved names into metadata during the initial control connection. In a future version of the driver, that anomaly is removed, and no duplicate hosts-by-name are present in the metadata.

      We will need to update copyutil to refer to hosts by address when accessing metadata. This can be accomplished by one of two methods presently:

      1. shell.conn.control_connection.host (gives the current connected host address)
      2. scan metadata.all_hosts() for the one that is_up and use host.address/host.datacenter

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              stefania Stefania Alborghetti Assign to me
              Reporter:
              aholmber Adam Holmberg
              Authors:
              Stefania Alborghetti
              Reviewers:
              Paulo Motta (Deprecated)

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment