> On June 30, 2015, 5:59 p.m., Alejandro Fernandez wrote: > > ambari-agent/src/main/python/ambari_agent/Facter.py, line 388 > > <https://reviews.apache.org/r/35876/diff/2/?file=995930#file995930line388> > > > > What happens if no match is found? > > One code path returns a value, whereas another does not return > > anything. Should this function return None as default?
Hello Alejandro, I have updated the code to return None if no values match. The unit tests are also updated. Thanks. - Di ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35876/#review89935 ----------------------------------------------------------- On June 30, 2015, 6:56 p.m., Di Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35876/ > ----------------------------------------------------------- > > (Updated June 30, 2015, 6:56 p.m.) > > > Review request for Ambari and Alejandro Fernandez. > > > Bugs: AMBARI-11854 > https://issues.apache.org/jira/browse/AMBARI-11854 > > > Repository: ambari > > > Description > ------- > > In a cluster with nodes that has multiple network interfaces. Ambari-agent > fails to start due to one or more active network interface did not bind to an > IP address. This happens when the eth0 network interface does not have an IP > address. > > > Diffs > ----- > > ambari-agent/src/main/python/ambari_agent/Facter.py 94a0ab1 > ambari-agent/src/test/python/ambari_agent/TestHardware.py 61456c5 > > Diff: https://reviews.apache.org/r/35876/diff/ > > > Testing > ------- > > 1. unit test > 2. manually run the script on a cluster where the eth0 network interface does > not have an IP address assigned. > > > Thanks, > > Di Li > >