> On March 3, 2015, 11:11 p.m., Sid Wagle wrote: > > ambari-agent/src/main/python/ambari_agent/main.py, line 270 > > <https://reviews.apache.org/r/31709/diff/1/?file=883774#file883774line270> > > > > This would mean agent pid is not avaialble in the pid file until > > connection to the server is successful. Not sure if this would have other > > side effects, like "ambari-agent stop" will not work, if server is > > unreachable.
The first agent instance opens the port. The second instance comes, overwrites the pid, attempts to open the port, fails and exits. The third time around the agent can't find the pid, so it continues, but it can't bind to the port because it's still being kept busy by the first instance, which by now is unreachable. - Florian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31709/#review75079 ----------------------------------------------------------- On March 3, 2015, 11 p.m., Florian Barca wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31709/ > ----------------------------------------------------------- > > (Updated March 3, 2015, 11 p.m.) > > > Review request for Ambari, Artem Baranchuk, Eugene Chekanskiy, Mahadev Konar, > and Sid Wagle. > > > Bugs: AMBARI-9913 > https://issues.apache.org/jira/browse/AMBARI-9913 > > > Repository: ambari > > > Description > ------- > > Saving the PID only on successful start > > > Diffs > ----- > > ambari-agent/src/main/python/ambari_agent/main.py > 33c1bc8dcd23ab98c305dff351549824dba4007b > ambari-metrics/ambari-metrics-host-monitoring/src/main/python/main.py > ce8ffc64dbe3717916efe72e8548bd18c93fad18 > > Diff: https://reviews.apache.org/r/31709/diff/ > > > Testing > ------- > > mvn clean test > deployment on a local VM cluster -> register hosts -> backtrack -> register > hosts -> no repro > > > Thanks, > > Florian Barca > >
