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

Review request for Ambari, Alejandro Fernandez, Nate Cole, and Robert Levas.


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


Repository: ambari


Description
-------

While attempting to restart a component that has complicated upgrade logic, the 
upgrade parameters are not sent to the agents. This can cause some components 
to fails during a suspended upgrade restart. 

Example:

- Begin express upgrade from {{2.3.6.0-3796}} to {{2.5.3.0-37}}
- {{HIVE_METASTORE}} couldn't start b/c of a missing Kerberos property:
{code}
resource_management.core.exceptions.Fail: Configuration parameter 
'hive.server2.authentication.kerberos.principal' was not found in 
configurations dictionary!
{code}
- Chose to {{Ignore and Proceed}} which means that none of the Metastore SQL 
files ran. 
- Paused the upgrade (presumably at Finalize) and try to start Metastore. It 
fails to start because the new HDP 2.5 bits are using a non-upgraded database. 
That causes the {{-info}} option to fail and makes Ambari think it needs to run 
{{-initSchema}}. 

RCA: Metastore failed to start during upgrade and the admin chose to skip it. 
This caused schema upgrade logic not to run. Ambari can examine the 
{{upgrade_suspended}} property to determine if we need to run upgrade commands 
while restarting Metastore during an upgrade. 

However, it might be more prudent to simply send along the suspended upgrade 
properties so that any actions which might need to happen (such as invoking an 
upgrade script during the restart) can happen when the upgrade is suspended.


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
 4fa942f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
 bdad015 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 5e8c803 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 2ec43cf 
  
ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java 
1d51b0d 
  
ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContextFactory.java
 4b988e8 
  
ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
 0d1a2fa 
  
ambari-server/src/test/java/org/apache/ambari/server/state/stack/upgrade/StageWrapperBuilderTest.java
 f7f8325 

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


Testing
-------

Tested restarts during a suspended upgrade for Metastore.

UNIT TESTS PENDING...


Thanks,

Jonathan Hurley

Reply via email to