> On Jan. 5, 2016, 1:23 p.m., Alejandro Fernandez wrote: > > ambari-common/src/main/python/resource_management/libraries/functions/hdp_select.py, > > line 118 > > <https://reviews.apache.org/r/41904/diff/1/?file=1181299#file1181299line118> > > > > The output of this will either be different versions or "None" (for > > components that don't exist). > > > > If "hdp-select set all" fails, then piping to grep can still return a 0 > > exit code, which would be misleading.
I'm not piping the output of hdp-select set all to grep. Instead, the output of '/usr/bin/hdp-select versions' is piped along with the stack version. The output of this should always be a single value as long as HDP 2.2+ is installed. - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41904/#review112881 ----------------------------------------------------------- On Jan. 4, 2016, 7:05 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41904/ > ----------------------------------------------------------- > > (Updated Jan. 4, 2016, 7:05 p.m.) > > > Review request for Ambari, Alejandro Fernandez, Jayush Luniya, and Nate Cole. > > > Bugs: AMBARI-14543 > https://issues.apache.org/jira/browse/AMBARI-14543 > > > Repository: ambari > > > Description > ------- > > 1) cluster with hdp 2.3.2 and c6401 and c6402 > 2) install hdp 2.3.4 on all hosts > 3) delete host from the cluster, c6401 > 4) perform upgrade > 5) c6402 is now running hdp 2.3.4 > 6) add c6401 back in (remember: is has 2.3.2 and 2.3.4 installed, with > hdp-select pointing to 2.3.2) > 7) the host gets added back in but it does not get switched to the current > running cluster version of 2.3.4. The c6401 host is still pointing to hdp > 2.3.2 > > On add, the host should have been moved to 2.3.4 to match the rest of the > cluster. Instead, it was left on 2.3.2, which now it's running a different > version than the rest of my cluster. > > What happens is that we never call hdp-select during a normal install of a > component - only during an upgrade. If you think about it, when you're on HDP > 2.2 and you install HDP 2.3, you don't want to call hdp-select yet since > you're not ready to start running HDP 2.3. > > So when you add a host back which had a prior version of HDP and then a new > version side-installed, the pointers are still to the old versions. Nothing > will move them since that host didn't go through the upgrade. If the host > didn't have HDP on it when it was added back, that would prevent this problem. > > A workaround is to invoke hdp-select set all <version> on the re-added host. > A fix for this might be to invoke hdp-select after installing a service on a > host. > > > Diffs > ----- > > ambari-agent/src/main/python/ambari_agent/HostCleanup.py 4d3cd83 > ambari-agent/src/test/python/ambari_agent/TestHostCleanup.py 7cfebe8 > > ambari-common/src/main/python/resource_management/libraries/functions/hdp_select.py > 5de9602 > > ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py > d41a889 > > ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py > d909926 > > ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py > 74698e1 > > Diff: https://reviews.apache.org/r/41904/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Jonathan Hurley > >
