Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 09784200B48 for ; Mon, 4 Jul 2016 07:14:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 081C7160A71; Mon, 4 Jul 2016 05:14:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4F1E3160A6B for ; Mon, 4 Jul 2016 07:14:12 +0200 (CEST) Received: (qmail 52302 invoked by uid 500); 4 Jul 2016 05:14:11 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 52288 invoked by uid 99); 4 Jul 2016 05:14:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jul 2016 05:14:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EFF892C02A5 for ; Mon, 4 Jul 2016 05:14:10 +0000 (UTC) Date: Mon, 4 Jul 2016 05:14:10 +0000 (UTC) From: "Stefania (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11979) cqlsh copyutil should get host metadata by connected address MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 04 Jul 2016 05:14:13 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-11979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15360840#comment-15360840 ] Stefania commented on CASSANDRA-11979: -------------------------------------- Driver version 3.5 is now available and will be embedded into cqlsh by CASSANDRA-11850, once that ticket is committed this task can be done. > cqlsh copyutil should get host metadata by connected address > ------------------------------------------------------------ > > Key: CASSANDRA-11979 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11979 > Project: Cassandra > Issue Type: Bug > Reporter: Adam Holmberg > Assignee: Stefania > Priority: Minor > Fix For: 2.2.x, 3.x > > > 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: > # shell.conn.control_connection.host (gives the current connected host address) > # scan metadata.all_hosts() for the one that {{is_up}} and use host.address/host.datacenter -- This message was sent by Atlassian JIRA (v6.3.4#6332)