ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez" <>
Subject Re: Review Request 35640: Install packages doesn't update actual version with build number if installation timesout on all hosts
Date Fri, 19 Jun 2015 17:44:46 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated June 19, 2015, 5:44 p.m.)

Review request for Ambari, Dmytro Sen and Nate Cole.


Combined with another dev's request to add more logging to other files.

Bugs: AMBARI-12012

Repository: ambari


1. User registers repo version (notice that a build number was not provided), and
clicks the Install button
2. On all of the hosts, the yum commands timeout (or does a partial install), this way, "hdp-select
versions" will report that 2 versions exist ( and Because the install
did not succeed, the command will not return the actual_version installed (which was
Note: I did this by decreasing the timeouts in file to 5 mins, and adding
a sleep in after the first package was installed.
3. The ambari server code then changes the state of the version it knows about to
INSTALL_FAILED so that the user can retry, but did not update the repo version with the actual
build version that includes the build number.
4. User retries and this time it succeeds. However, the delta of "hdp-select versions" outputs
"", so no "actual_version" is returned! This is really bad because the build number is needed
for ambari to use it whenever it calls "hdp-select set <comp> <version>"
5. The ambari server code will change the state to INSTALLED.
The fix is for to always return the actual_version (even in the case of
a failure) so that Ambari server can correct the database entry (even if the command fails/timesout).
This will only happen the first time, but subsequent attempts to retry installation will use
the right value so an exact match will be found in the database.

Diffs (updated)

  ambari-server/src/main/java/org/apache/ambari/server/state/ be99d96 
  ambari-server/src/main/resources/custom_actions/scripts/ f8b2308 



Reproduced the issue on a live cluster and verified that the patch worked even when the agents
reported that the packages failed to be installed.

Unit tests in progress


Alejandro Fernandez

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message