You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Andrew Onischuk (JIRA)" <ji...@apache.org> on 2015/12/11 10:58:11 UTC

[jira] [Commented] (AMBARI-13038) Define ephemeral port range for Ambari agents

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

Andrew Onischuk commented on AMBARI-13038:
------------------------------------------

Hey Olivér Szabó.
This is awesome idea to do so we've been struggling for a long time with those ports issues. 

As per review on this:

1. The code after exception will never be reachable.
+          raise Exception(PORT_RANGE_UPDATE_FAILED.format(self.portRange, stderrdata))
+          self.__run_shell_cmd(SYSCTL_CONF_UPGRADE_CMD)
Maybe you meant less indentation for this next line?
2. As per our non-root doc we don't have grep binary allowed. Can we use 'ambari-sudo.sh cat ... | grep' instead?
3. Configured sudo in some way it can give stderr before every command output. That why you should check return code instead of stderr output
Let's embed the return code check directly into __run_shell_cmd. (if you want to check specific pipe, use $\{PIPESTATUS\[...\]\}
4. /var/lib/ambari-agent/\{0\} We have  /var/lib/ambari-agent/ in the path (in ambari-env.sh). That's why let's remove /var/lib/ambari-agent/ part, so we have ability to change ambair-sudo.sh on fly.
5. Usually Popen should go with close_fds=True, so 'ambari-agent stop' wouldn't stuck on killing those processes.

> Define ephemeral port range for Ambari agents
> ---------------------------------------------
>
>                 Key: AMBARI-13038
>                 URL: https://issues.apache.org/jira/browse/AMBARI-13038
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-agent
>    Affects Versions: 2.1.0
>         Environment: All
>            Reporter: Olivér Szabó
>            Assignee: Olivér Szabó
>             Fix For: 2.3.0
>
>         Attachments: AMBARI-13038.patch, EphemeralPortRange.pdf
>
>
> Problem: 
> When Ambari agent starts,it tries to use an ephemeral port that is already in use by another component.
> Steps to Reproduce:
> 1. Install a cluster with Ambari
> 2. Restart the Ambari agent until it takes a port in use by another service
> Solution:
> Range of ephemeral ports used by Ambari should be narrowed. (configurable)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)