-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29969/
-----------------------------------------------------------

(Updated Янв. 19, 2015, 7:14 п.п.)


Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Nate 
Cole.


Bugs: AMBARI-9183
    https://issues.apache.org/jira/browse/AMBARI-9183


Repository: ambari


Description (updated)
-------

Currently on clean install Ambari creates cluster entity and its repository 
version with version taken from selected stack. I.e. for stack HDP-2.2, version 
2.2 is written to database, without any information about the actual minor 
version of that stack. Besides that we can't assume that cluster has some 
version until it has at least one of components of that version.
Repository version creation should be detached from cluster creation; instead 
of that versions should be created after receiving the first actual version 
from service responses during install.

The logic behind these changes:
when we are doing clean install, the first thing to do is to download all 
repositories to all hosts, installing won't start without it. So somewhere 
during this process we can say that repository_version is in 
INSTALLING/INSTALLED state, but we don't track this as for now. When the 
installation starts, it means that repo version is INSTALLED. At the time of 
first response from any of the service we get its version and set to 
hostcomponentstate table. It propagates changes to host_version and 
cluster_version. The initial state of the cluster is assumed as UPGRADING 
because at that moment we have a transition from INSTALLED to CURRENT. After 
every component reports its version a transition of UPGRADING->CURRENT is made 
as we don't actually have any finalize step and thus we can skip UPGRADED.


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
 b5fda49 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 6dabcbb 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 befd014 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java
 ed9fa24 
  ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
fd0188c 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 19a5f9f 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
 9ec8c36 
  
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
 31606ca 
  
ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
 57c0223 

Diff: https://reviews.apache.org/r/29969/diff/


Testing
-------

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 55:35.812s


Tested clean install and rolling upgrade manually on 2-node cluster


Thanks,

Yurii Shylov

Reply via email to