Re: Review Request 61074: Restart due to Stale configurations leads to an internal system exception

2017-07-25 Thread Dmytro Sen


> On Июль 24, 2017, 5:35 п.п., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
> > Lines 1086 (patched)
> > 
> >
> > Shouldn't it `return`, too?  Otherwise what prevents the exception a 
> > few lines later?

You're right. Thank you.


- Dmytro


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


On Июль 25, 2017, 8:59 д.п., Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61074/
> ---
> 
> (Updated Июль 25, 2017, 8:59 д.п.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, Sid Wagle, and 
> Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-21551
> https://issues.apache.org/jira/browse/AMBARI-21551
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While performing RBAC API tests, found the following:
> POST call: 
> {code}
> http://:8080/api/v1/clusters/cl1/requests
> {"RequestInfo":{"command":"RESTART","context":"Restart all required 
> services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}
> {code}
> Returns:
> {code}
> {
> "status" : 500,
> message" : "An internal system exception occurred: Command execution cannot 
> proceed without a resource filter."
> }
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  f4b650e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  a8f7638 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
>  d243e73 
> 
> 
> Diff: https://reviews.apache.org/r/61074/diff/2/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Re: Review Request 61074: Restart due to Stale configurations leads to an internal system exception

2017-07-25 Thread Dmytro Sen

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

(Updated Июль 25, 2017, 8:59 д.п.)


Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, Sid Wagle, and 
Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

While performing RBAC API tests, found the following:
POST call: 
{code}
http://:8080/api/v1/clusters/cl1/requests
{"RequestInfo":{"command":"RESTART","context":"Restart all required 
services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}
{code}
Returns:
{code}
{
"status" : 500,
message" : "An internal system exception occurred: Command execution cannot 
proceed without a resource filter."
}
{code}


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
 f4b650e 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
 a8f7638 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
 d243e73 


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

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


Testing
---

Unit tests passed


Thanks,

Dmytro Sen



Re: Review Request 61074: Restart due to Stale configurations leads to an internal system exception

2017-07-24 Thread Attila Doroszlai

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




ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
Lines 1086 (patched)


Shouldn't it `return`, too?  Otherwise what prevents the exception a few 
lines later?


- Attila Doroszlai


On July 24, 2017, 9:32 a.m., Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61074/
> ---
> 
> (Updated July 24, 2017, 9:32 a.m.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, Sid Wagle, and 
> Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-21551
> https://issues.apache.org/jira/browse/AMBARI-21551
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While performing RBAC API tests, found the following:
> POST call: 
> {code}
> http://:8080/api/v1/clusters/cl1/requests
> {"RequestInfo":{"command":"RESTART","context":"Restart all required 
> services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}
> {code}
> Returns:
> {code}
> {
> "status" : 500,
> message" : "An internal system exception occurred: Command execution cannot 
> proceed without a resource filter."
> }
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  0b140e4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  a8f7638 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
>  d243e73 
> 
> 
> Diff: https://reviews.apache.org/r/61074/diff/1/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Re: Review Request 61074: Restart due to Stale configurations leads to an internal system exception

2017-07-24 Thread Dmytro Sen


> On Июль 24, 2017, 4:55 п.п., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
> > Lines 455 (patched)
> > 
> >
> > This looks like a hack to me. Can we have the validation check for 
> > existence of the resource filter in the params? Can that be done with 
> > minimal extra code?

That's a hack, as for me it's to late for refactor for 2.5.2.
It's not enough to check if resource filter exists in the request, we also 
should check the it doesn't return emptry set of resources. If it's empty, 
we're getting the error in description.


- Dmytro


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


On Июль 24, 2017, 7:32 д.п., Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61074/
> ---
> 
> (Updated Июль 24, 2017, 7:32 д.п.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, Sid Wagle, and 
> Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-21551
> https://issues.apache.org/jira/browse/AMBARI-21551
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While performing RBAC API tests, found the following:
> POST call: 
> {code}
> http://:8080/api/v1/clusters/cl1/requests
> {"RequestInfo":{"command":"RESTART","context":"Restart all required 
> services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}
> {code}
> Returns:
> {code}
> {
> "status" : 500,
> message" : "An internal system exception occurred: Command execution cannot 
> proceed without a resource filter."
> }
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  0b140e4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  a8f7638 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
>  d243e73 
> 
> 
> Diff: https://reviews.apache.org/r/61074/diff/1/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Re: Review Request 61074: Restart due to Stale configurations leads to an internal system exception

2017-07-24 Thread Sid Wagle

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




ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
Lines 455 (patched)


This looks like a hack to me. Can we have the validation check for 
existence of the resource filter in the params? Can that be done with minimal 
extra code?


- Sid Wagle


On July 24, 2017, 7:32 a.m., Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61074/
> ---
> 
> (Updated July 24, 2017, 7:32 a.m.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, Sid Wagle, and 
> Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-21551
> https://issues.apache.org/jira/browse/AMBARI-21551
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While performing RBAC API tests, found the following:
> POST call: 
> {code}
> http://:8080/api/v1/clusters/cl1/requests
> {"RequestInfo":{"command":"RESTART","context":"Restart all required 
> services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}
> {code}
> Returns:
> {code}
> {
> "status" : 500,
> message" : "An internal system exception occurred: Command execution cannot 
> proceed without a resource filter."
> }
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  0b140e4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  a8f7638 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
>  d243e73 
> 
> 
> Diff: https://reviews.apache.org/r/61074/diff/1/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Re: Review Request 61074: Restart due to Stale configurations leads to an internal system exception

2017-07-24 Thread Vitalyi Brodetskyi

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


Ship it!




Ship It!

- Vitalyi Brodetskyi


On Липень 24, 2017, 7:32 до полудня, Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61074/
> ---
> 
> (Updated Липень 24, 2017, 7:32 до полудня)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, Sid Wagle, and 
> Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-21551
> https://issues.apache.org/jira/browse/AMBARI-21551
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While performing RBAC API tests, found the following:
> POST call: 
> {code}
> http://:8080/api/v1/clusters/cl1/requests
> {"RequestInfo":{"command":"RESTART","context":"Restart all required 
> services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}
> {code}
> Returns:
> {code}
> {
> "status" : 500,
> message" : "An internal system exception occurred: Command execution cannot 
> proceed without a resource filter."
> }
> {code}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  0b140e4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  a8f7638 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
>  d243e73 
> 
> 
> Diff: https://reviews.apache.org/r/61074/diff/1/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Review Request 61074: Restart due to Stale configurations leads to an internal system exception

2017-07-24 Thread Dmytro Sen

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

Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, Sid Wagle, and 
Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

While performing RBAC API tests, found the following:
POST call: 
{code}
http://:8080/api/v1/clusters/cl1/requests
{"RequestInfo":{"command":"RESTART","context":"Restart all required 
services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}
{code}
Returns:
{code}
{
"status" : 500,
message" : "An internal system exception occurred: Command execution cannot 
proceed without a resource filter."
}
{code}


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
 0b140e4 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
 a8f7638 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
 d243e73 


Diff: https://reviews.apache.org/r/61074/diff/1/


Testing
---

Unit tests passed


Thanks,

Dmytro Sen