Return-Path: X-Original-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E31210180 for ; Mon, 17 Jun 2013 16:36:22 +0000 (UTC) Received: (qmail 68262 invoked by uid 500); 17 Jun 2013 16:36:22 -0000 Delivered-To: apmail-incubator-ambari-dev-archive@incubator.apache.org Received: (qmail 68149 invoked by uid 500); 17 Jun 2013 16:36:21 -0000 Mailing-List: contact ambari-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-dev@incubator.apache.org Received: (qmail 67990 invoked by uid 99); 17 Jun 2013 16:36:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jun 2013 16:36:20 +0000 Date: Mon, 17 Jun 2013 16:36:20 +0000 (UTC) From: "Oleksandr Diachenko (JIRA)" To: ambari-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-2401) Perform hostname comparison before registering the agent MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-2401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13685693#comment-13685693 ] Oleksandr Diachenko commented on AMBARI-2401: --------------------------------------------- +1 > Perform hostname comparison before registering the agent > -------------------------------------------------------- > > Key: AMBARI-2401 > URL: https://issues.apache.org/jira/browse/AMBARI-2401 > Project: Ambari > Issue Type: Bug > Components: controller > Affects Versions: 1.2.5 > Reporter: Dmitry Lysnichenko > Assignee: Dmitry Lysnichenko > Fix For: 1.2.5 > > Attachments: AMBARI-2401.patch > > > Host registration commonly fails when Agent machine registers with Server under a different hostname than Server expected (results in failed register because Server thinks host never registered) > This is when the Agent machine hostname is not set properly (or set differently than how Ambari server expects), so the Ambari server never sees the Agent registration return, resulting in a failed registration. > Need to make this scenario 1) easier to troubleshoot 2) more clear to the user 3) provide paths out of this situation (warn, retry, remove) > Proposal: > When using SSH to register hosts, Ambari server should send down expected hostname during bootstrap. For example, user enters host.name.expected in the UI. > Ambari server connects to host.name.expected, then starts the agent setup process. Once the agent determines what hostname it will register as (via figuring out fqdn), it should confirm that it matches host.name.expected > In the case where those match, Agent is started and proceeds with registration. > In the case where those do not match, Agent writes to log "ambari agent machine hostname does not match expected ambari server hostname. Aborting registration. Please check hostname, hostname -f and /etc/hosts file to confirm your hostname is setup correctly" > Also, in the do not match case, the ambari server will indicated "Failed" on registration. That should also include a message "Registration failed. Please check the Ambari Agent log on the as /var/log/ambari-agent/ambari-agent.log for more information" > On manual agent registration, since there is to "expected" hostname (since the agent registration was not initiated by the ambari server), the agent should just register as normal (as it does today). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira