Re: Review Request 60850: Create pre-requisite check for components missing from the target stack

2017-07-13 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On July 13, 2017, 8:27 p.m., Jonathan Hurley wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60850/
> ---
> 
> (Updated July 13, 2017, 8:27 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-21436
> https://issues.apache.org/jira/browse/AMBARI-21436
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When upgrading from a stack which contains a component with doesn't exist in 
> the target stack, the upgrade will run into a problem while attempting to 
> restart that component. 
> 
> There should be a pre-requisite check which guarantees that missing 
> components/services are removed before upgrading. 
> 
> Also, we need to fix the following exception when distributing a repo without 
> the components:
> {code}
> Caused by: org.apache.ambari.server.StackAccessException: Stack data, 
> stackName=HDP, stackVersion=2.6, serviceName=HBASE, 
> componentName=HBASE_REST_SERVER
>   at 
> org.apache.ambari.server.api.services.AmbariMetaInfo.getComponent(AmbariMetaInfo.java:307)
>   at 
> org.apache.ambari.server.state.host.HostImpl.hasComponentsAdvertisingVersions(HostImpl.java:1176)
>   at 
> org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createHostVersions(ClusterStackVersionResourceProvider.java:495)
>   at 
> org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createResourcesAuthorized(ClusterStackVersionResourceProvider.java:447)
>   ... 93 more
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
>  2be42fc77d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsExistInRepoCheck.java
>  PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Host.java 
> 241659a111 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
> 328fe221e2 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentExistsInRepoCheckTest.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60850/diff/3/
> 
> 
> Testing
> ---
> 
> PENDING
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>



Re: Review Request 60850: Create pre-requisite check for components missing from the target stack

2017-07-13 Thread Sid Wagle

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


Ship it!




Ship It!

- Sid Wagle


On July 13, 2017, 8:27 p.m., Jonathan Hurley wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60850/
> ---
> 
> (Updated July 13, 2017, 8:27 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-21436
> https://issues.apache.org/jira/browse/AMBARI-21436
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When upgrading from a stack which contains a component with doesn't exist in 
> the target stack, the upgrade will run into a problem while attempting to 
> restart that component. 
> 
> There should be a pre-requisite check which guarantees that missing 
> components/services are removed before upgrading. 
> 
> Also, we need to fix the following exception when distributing a repo without 
> the components:
> {code}
> Caused by: org.apache.ambari.server.StackAccessException: Stack data, 
> stackName=HDP, stackVersion=2.6, serviceName=HBASE, 
> componentName=HBASE_REST_SERVER
>   at 
> org.apache.ambari.server.api.services.AmbariMetaInfo.getComponent(AmbariMetaInfo.java:307)
>   at 
> org.apache.ambari.server.state.host.HostImpl.hasComponentsAdvertisingVersions(HostImpl.java:1176)
>   at 
> org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createHostVersions(ClusterStackVersionResourceProvider.java:495)
>   at 
> org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createResourcesAuthorized(ClusterStackVersionResourceProvider.java:447)
>   ... 93 more
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
>  2be42fc77d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsExistInRepoCheck.java
>  PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Host.java 
> 241659a111 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
> 328fe221e2 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentExistsInRepoCheckTest.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60850/diff/3/
> 
> 
> Testing
> ---
> 
> PENDING
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>



Re: Review Request 60850: Create pre-requisite check for components missing from the target stack

2017-07-13 Thread Jonathan Hurley

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

(Updated July 13, 2017, 4:27 p.m.)


Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.


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


Repository: ambari


Description
---

When upgrading from a stack which contains a component with doesn't exist in 
the target stack, the upgrade will run into a problem while attempting to 
restart that component. 

There should be a pre-requisite check which guarantees that missing 
components/services are removed before upgrading. 

Also, we need to fix the following exception when distributing a repo without 
the components:
{code}
Caused by: org.apache.ambari.server.StackAccessException: Stack data, 
stackName=HDP, stackVersion=2.6, serviceName=HBASE, 
componentName=HBASE_REST_SERVER
at 
org.apache.ambari.server.api.services.AmbariMetaInfo.getComponent(AmbariMetaInfo.java:307)
at 
org.apache.ambari.server.state.host.HostImpl.hasComponentsAdvertisingVersions(HostImpl.java:1176)
at 
org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createHostVersions(ClusterStackVersionResourceProvider.java:495)
at 
org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createResourcesAuthorized(ClusterStackVersionResourceProvider.java:447)
... 93 more
{code}


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
 2be42fc77d 
  
ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsExistInRepoCheck.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/Host.java 
241659a111 
  ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
328fe221e2 
  
ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentExistsInRepoCheckTest.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/60850/diff/2/

Changes: https://reviews.apache.org/r/60850/diff/1-2/


Testing
---

PENDING


Thanks,

Jonathan Hurley



Re: Review Request 60850: Create pre-requisite check for components missing from the target stack

2017-07-13 Thread Jonathan Hurley


> On July 13, 2017, 4:10 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsExistInRepoCheck.java
> > Lines 112 (patched)
> > 
> >
> > Can we generate a single error message if failedSercices is not empty 
> > or failedComponents is not empty? This way, the user doesn't have to re-run 
> > the PreCheck and potentially find other failures.

Yeah, I suppose we could. I guess I wanted to keep it simple, but we can do a 
more complex message.


- Jonathan


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


On July 13, 2017, 4:01 p.m., Jonathan Hurley wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60850/
> ---
> 
> (Updated July 13, 2017, 4:01 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-21436
> https://issues.apache.org/jira/browse/AMBARI-21436
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When upgrading from a stack which contains a component with doesn't exist in 
> the target stack, the upgrade will run into a problem while attempting to 
> restart that component. 
> 
> There should be a pre-requisite check which guarantees that missing 
> components/services are removed before upgrading. 
> 
> Also, we need to fix the following exception when distributing a repo without 
> the components:
> {code}
> Caused by: org.apache.ambari.server.StackAccessException: Stack data, 
> stackName=HDP, stackVersion=2.6, serviceName=HBASE, 
> componentName=HBASE_REST_SERVER
>   at 
> org.apache.ambari.server.api.services.AmbariMetaInfo.getComponent(AmbariMetaInfo.java:307)
>   at 
> org.apache.ambari.server.state.host.HostImpl.hasComponentsAdvertisingVersions(HostImpl.java:1176)
>   at 
> org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createHostVersions(ClusterStackVersionResourceProvider.java:495)
>   at 
> org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createResourcesAuthorized(ClusterStackVersionResourceProvider.java:447)
>   ... 93 more
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
>  2be42fc77d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsExistInRepoCheck.java
>  PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Host.java 
> 241659a111 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
> 328fe221e2 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentExistsInRepoCheckTest.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60850/diff/1/
> 
> 
> Testing
> ---
> 
> PENDING
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>



Re: Review Request 60850: Create pre-requisite check for components missing from the target stack

2017-07-13 Thread Alejandro Fernandez

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


Fix it, then Ship it!




Fix it and ship it.


ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsExistInRepoCheck.java
Lines 112 (patched)


Can we generate a single error message if failedSercices is not empty or 
failedComponents is not empty? This way, the user doesn't have to re-run the 
PreCheck and potentially find other failures.


- Alejandro Fernandez


On July 13, 2017, 8:01 p.m., Jonathan Hurley wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60850/
> ---
> 
> (Updated July 13, 2017, 8:01 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-21436
> https://issues.apache.org/jira/browse/AMBARI-21436
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When upgrading from a stack which contains a component with doesn't exist in 
> the target stack, the upgrade will run into a problem while attempting to 
> restart that component. 
> 
> There should be a pre-requisite check which guarantees that missing 
> components/services are removed before upgrading. 
> 
> Also, we need to fix the following exception when distributing a repo without 
> the components:
> {code}
> Caused by: org.apache.ambari.server.StackAccessException: Stack data, 
> stackName=HDP, stackVersion=2.6, serviceName=HBASE, 
> componentName=HBASE_REST_SERVER
>   at 
> org.apache.ambari.server.api.services.AmbariMetaInfo.getComponent(AmbariMetaInfo.java:307)
>   at 
> org.apache.ambari.server.state.host.HostImpl.hasComponentsAdvertisingVersions(HostImpl.java:1176)
>   at 
> org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createHostVersions(ClusterStackVersionResourceProvider.java:495)
>   at 
> org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProvider.createResourcesAuthorized(ClusterStackVersionResourceProvider.java:447)
>   ... 93 more
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
>  2be42fc77d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsExistInRepoCheck.java
>  PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Host.java 
> 241659a111 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
> 328fe221e2 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentExistsInRepoCheckTest.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60850/diff/1/
> 
> 
> Testing
> ---
> 
> PENDING
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>