Re: Review Request 62034: Integrate LogSearch new UI with the server and get rid of the old one

2017-09-01 Thread Oliver Szabo

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

(Updated Sept. 1, 2017, 7:17 p.m.)


Review request for Ambari, Andrii Babiichuk, Miklos Gergely, and Robert 
Nettleton.


Changes
---

update diff (show renames) + remove unused import


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


Repository: ambari


Description
---

- get rid of old ui
- renamve web-new to web
- add some small changes to authentication (create an abstract filter for jwt 
and move it somewhere else, those changes will be continued in an other patch)
- change login/logout authentication mechanism for the new UI (do not redirect 
to /login.html)


Diffs (updated)
-

  ambari-logsearch/ambari-logsearch-server/build.xml aadacd7 
  ambari-logsearch/ambari-logsearch-server/pom.xml e60cc14 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/auth/filter/AbstractJWTFilter.java
 PRE-CREATION 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
 038ba5c 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/authenticate/LogsearchLogoutSuccessHandler.java
 c20e383 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/filters/LogsearchJWTFilter.java
 1bc7231 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/model/JWTAuthenticationToken.java
 dfac191 
  ambari-logsearch/ambari-logsearch-web-new/.angular-cli.json  
  ambari-logsearch/ambari-logsearch-web-new/.editorconfig  
  ambari-logsearch/ambari-logsearch-web-new/.gitignore 54bfd20 
  ambari-logsearch/ambari-logsearch-web-new/README.md 2fb07fb 
  ambari-logsearch/ambari-logsearch-web-new/e2e/app.e2e-spec.ts  
  ambari-logsearch/ambari-logsearch-web-new/e2e/app.po.ts  
  ambari-logsearch/ambari-logsearch-web-new/e2e/tsconfig.e2e.json  
  ambari-logsearch/ambari-logsearch-web-new/karma.conf.js  
  ambari-logsearch/ambari-logsearch-web-new/package.json 96733eb 
  ambari-logsearch/ambari-logsearch-web-new/pom.xml 28e1754 
  ambari-logsearch/ambari-logsearch-web-new/protractor.conf.js  
  ambari-logsearch/ambari-logsearch-web-new/src/app/app.module.ts  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/audit-logs-query-params.class.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/query-params.class.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-histogram-query-params.class.spec.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-histogram-query-params.class.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-query-params.class.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.html
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.less
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.spec.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.html 
 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.less 
 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.spec.ts
  
  ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.ts 
 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.html
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.less
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.spec.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.html
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.less
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.spec.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-button/filter-button.component.spec.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-button/filter-button.component.ts
  
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-dropdown/filter-dropdown.component.spec.ts
  
  
amba

Re: Review Request 62020: Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added

2017-09-01 Thread Jonathan Hurley

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


Ship it!




Ship It!

- Jonathan Hurley


On Sept. 1, 2017, 11:29 a.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> ---
> 
> (Updated Sept. 1, 2017, 11:29 a.m.)
> 
> 
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene 
> Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when 
> Kerberos is enabled, to reduce number of core service restarts when services 
> are added.  
> 
> Services to pre-configure include:
> * Knox
> * Beacon
> 
> While upgrading the stack (EU or RU), processing the relevant Kerberos 
> descriptor to find services marked to be _pre-configured_.  When a tagged 
> service is encountered, process it if it is not installed. Apply only 
> configuration changes for existing configuration types.  This will set at 
> least the core-site changes related to proxyuser and auth-to-local rules 
> properties. By doing this, if a tagged service is later installed, the 
> settings will already be in place in the existing service configs and thus 
> the existing services will not need to be restarted. 
> 
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed 
> * The stack advisor will be used to suggest locations of components - used to 
> build the clusterHostInfo structure that may be used to derive property 
> values. 
> 
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to 
> HDP 2.6.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
>  978b329d35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
>  9bdb377cf7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
>  d86433f880 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java
>  178d129dc8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java
>  da83a74aca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java
>  581067f939 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  492c308275 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> 995a1d3fd9 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
>  PRE-CREATION 
>   ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json 
> PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/62020/diff/2/
> 
> 
> Testing
> ---
> 
> Manually tested
> 
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Re: Review Request 62035: User can't add node via Ambari UI when being part of both "cluster user" and "cluster admin" roles

2017-09-01 Thread Robert Levas

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


Fix it, then Ship it!




Ship It!


ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
Lines 1361-1371 (original), 1361 (patched)


These should be left in as tests, but remove the expected 
AuthorizatonException since that is no longer expected.


- Robert Levas


On Sept. 1, 2017, 11:09 a.m., Eugene Chekanskiy wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62035/
> ---
> 
> (Updated Sept. 1, 2017, 11:09 a.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Robert Levas.
> 
> 
> Bugs: AMBARI-21687
> https://issues.apache.org/jira/browse/AMBARI-21687
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Ambari-level "check_host" custom command rejected, even if user has proper 
> authorization. Fixed this.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  5a0549d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
>  c519323 
> 
> 
> Diff: https://reviews.apache.org/r/62035/diff/1/
> 
> 
> Testing
> ---
> 
> mvn clean test; manual check
> 
> 
> Thanks,
> 
> Eugene Chekanskiy
> 
>



Re: Review Request 62020: Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added

2017-09-01 Thread Attila Magyar

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


Ship it!




Ship It!

- Attila Magyar


On Sept. 1, 2017, 3:29 p.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> ---
> 
> (Updated Sept. 1, 2017, 3:29 p.m.)
> 
> 
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene 
> Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when 
> Kerberos is enabled, to reduce number of core service restarts when services 
> are added.  
> 
> Services to pre-configure include:
> * Knox
> * Beacon
> 
> While upgrading the stack (EU or RU), processing the relevant Kerberos 
> descriptor to find services marked to be _pre-configured_.  When a tagged 
> service is encountered, process it if it is not installed. Apply only 
> configuration changes for existing configuration types.  This will set at 
> least the core-site changes related to proxyuser and auth-to-local rules 
> properties. By doing this, if a tagged service is later installed, the 
> settings will already be in place in the existing service configs and thus 
> the existing services will not need to be restarted. 
> 
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed 
> * The stack advisor will be used to suggest locations of components - used to 
> build the clusterHostInfo structure that may be used to derive property 
> values. 
> 
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to 
> HDP 2.6.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
>  978b329d35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
>  9bdb377cf7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
>  d86433f880 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java
>  178d129dc8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java
>  da83a74aca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java
>  581067f939 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  492c308275 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> 995a1d3fd9 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
>  PRE-CREATION 
>   ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json 
> PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/62020/diff/2/
> 
> 
> Testing
> ---
> 
> Manually tested
> 
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Re: Review Request 62020: Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added

2017-09-01 Thread Robert Levas

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

(Updated Sept. 1, 2017, 11:29 a.m.)


Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene Chekanskiy, 
Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.


Changes
---

Addressed Attila's concerns.


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


Repository: ambari


Description
---

Pre-configure (certain) services during a stack upgrade to HDP 2.6, when 
Kerberos is enabled, to reduce number of core service restarts when services 
are added.  

Services to pre-configure include:
* Knox
* Beacon

While upgrading the stack (EU or RU), processing the relevant Kerberos 
descriptor to find services marked to be _pre-configured_.  When a tagged 
service is encountered, process it if it is not installed. Apply only 
configuration changes for existing configuration types.  This will set at least 
the core-site changes related to proxyuser and auth-to-local rules properties. 
By doing this, if a tagged service is later installed, the settings will 
already be in place in the existing service configs and thus the existing 
services will not need to be restarted. 

Caveats:
* Default values for the uninstalled, tagged, services will be assumed 
* The stack advisor will be used to suggest locations of components - used to 
build the clusterHostInfo structure that may be used to derive property values. 

Note: This processing is to occur when upgrading the stack from HDP 2.5 to HDP 
2.6.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
 978b329d35 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
 9bdb377cf7 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 d86433f880 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java
 178d129dc8 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java
 da83a74aca 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java
 581067f939 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
 PRE-CREATION 
  
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
 492c308275 
  ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
995a1d3fd9 
  
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
 PRE-CREATION 
  ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json 
PRE-CREATION 
  
ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json
 PRE-CREATION 
  
ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
 PRE-CREATION 


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

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


Testing
---

Manually tested

# Local test results:
```
Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
```

# Jenkins test results: PENDING


Thanks,

Robert Levas



Re: Review Request 62020: Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added

2017-09-01 Thread Robert Levas


> On Sept. 1, 2017, 3:40 a.m., Attila Magyar wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
> > Lines 173 (patched)
> > 
> >
> > unnecessary null check: cluster.getServices() never returns null

I never like making that assumption ("never returns null").  Today the 
implementation happens to not return null, tommorow may be a different story.


> On Sept. 1, 2017, 3:40 a.m., Attila Magyar wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
> > Lines 370 (patched)
> > 
> >
> > isn't this supposed to be !MapUtils.isEmpty ?

Nice catch.


- Robert


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


On Aug. 31, 2017, 1:55 p.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> ---
> 
> (Updated Aug. 31, 2017, 1:55 p.m.)
> 
> 
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene 
> Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when 
> Kerberos is enabled, to reduce number of core service restarts when services 
> are added.  
> 
> Services to pre-configure include:
> * Knox
> * Beacon
> 
> While upgrading the stack (EU or RU), processing the relevant Kerberos 
> descriptor to find services marked to be _pre-configured_.  When a tagged 
> service is encountered, process it if it is not installed. Apply only 
> configuration changes for existing configuration types.  This will set at 
> least the core-site changes related to proxyuser and auth-to-local rules 
> properties. By doing this, if a tagged service is later installed, the 
> settings will already be in place in the existing service configs and thus 
> the existing services will not need to be restarted. 
> 
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed 
> * The stack advisor will be used to suggest locations of components - used to 
> build the clusterHostInfo structure that may be used to derive property 
> values. 
> 
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to 
> HDP 2.6.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
>  978b329d35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
>  9bdb377cf7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
>  d86433f880 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java
>  178d129dc8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java
>  da83a74aca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java
>  581067f939 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  492c308275 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> 995a1d3fd9 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
>  PRE-CREATION 
>   ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json 
> PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/62020/diff/1/
> 
> 
> Testing
> ---
> 
> Manually tested
> 
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Review Request 62035: User can't add node via Ambari UI when being part of both "cluster user" and "cluster admin" roles

2017-09-01 Thread Eugene Chekanskiy

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

Review request for Ambari, Dmitro Lisnichenko and Robert Levas.


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


Repository: ambari


Description
---

Ambari-level "check_host" custom command rejected, even if user has proper 
authorization. Fixed this.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
 5a0549d 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
 c519323 


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


Testing
---

mvn clean test; manual check


Thanks,

Eugene Chekanskiy



Re: Review Request 62020: Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added

2017-09-01 Thread Eugene Chekanskiy

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


Ship it!




Ship It!

- Eugene Chekanskiy


On Aug. 31, 2017, 5:55 p.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> ---
> 
> (Updated Aug. 31, 2017, 5:55 p.m.)
> 
> 
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene 
> Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when 
> Kerberos is enabled, to reduce number of core service restarts when services 
> are added.  
> 
> Services to pre-configure include:
> * Knox
> * Beacon
> 
> While upgrading the stack (EU or RU), processing the relevant Kerberos 
> descriptor to find services marked to be _pre-configured_.  When a tagged 
> service is encountered, process it if it is not installed. Apply only 
> configuration changes for existing configuration types.  This will set at 
> least the core-site changes related to proxyuser and auth-to-local rules 
> properties. By doing this, if a tagged service is later installed, the 
> settings will already be in place in the existing service configs and thus 
> the existing services will not need to be restarted. 
> 
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed 
> * The stack advisor will be used to suggest locations of components - used to 
> build the clusterHostInfo structure that may be used to derive property 
> values. 
> 
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to 
> HDP 2.6.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
>  978b329d35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
>  9bdb377cf7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
>  d86433f880 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java
>  178d129dc8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java
>  da83a74aca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java
>  581067f939 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  492c308275 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> 995a1d3fd9 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
>  PRE-CREATION 
>   ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json 
> PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/62020/diff/1/
> 
> 
> Testing
> ---
> 
> Manually tested
> 
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Re: Review Request 62034: Integrate LogSearch new UI with the server and get rid of the old one

2017-09-01 Thread Oliver Szabo

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

(Updated Sept. 1, 2017, 2:56 p.m.)


Review request for Ambari, Andrii Babiichuk, Miklos Gergely, and Robert 
Nettleton.


Changes
---

make it work with spring-boot:run maven task


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


Repository: ambari


Description
---

- get rid of old ui
- renamve web-new to web
- add some small changes to authentication (create an abstract filter for jwt 
and move it somewhere else, those changes will be continued in an other patch)
- change login/logout authentication mechanism for the new UI (do not redirect 
to /login.html)


Diffs (updated)
-

  ambari-logsearch/ambari-logsearch-server/build.xml aadacd7 
  ambari-logsearch/ambari-logsearch-server/pom.xml e60cc14 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/LogSearch.java
 39343c7 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/auth/filter/AbstractJWTFilter.java
 PRE-CREATION 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/auth/model/JWTAuthenticationToken.java
 PRE-CREATION 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
 038ba5c 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/authenticate/LogsearchLogoutSuccessHandler.java
 c20e383 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/filters/LogsearchJWTFilter.java
 1bc7231 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/model/JWTAuthenticationToken.java
 dfac191 
  ambari-logsearch/ambari-logsearch-web-new/.angular-cli.json cc74739 
  ambari-logsearch/ambari-logsearch-web-new/.editorconfig 6e87a00 
  ambari-logsearch/ambari-logsearch-web-new/.gitignore 54bfd20 
  ambari-logsearch/ambari-logsearch-web-new/README.md 2fb07fb 
  ambari-logsearch/ambari-logsearch-web-new/e2e/app.e2e-spec.ts ebfdcb9 
  ambari-logsearch/ambari-logsearch-web-new/e2e/app.po.ts c446bfb 
  ambari-logsearch/ambari-logsearch-web-new/e2e/tsconfig.e2e.json ac7a373 
  ambari-logsearch/ambari-logsearch-web-new/karma.conf.js 0512808 
  ambari-logsearch/ambari-logsearch-web-new/package.json 96733eb 
  ambari-logsearch/ambari-logsearch-web-new/pom.xml 28e1754 
  ambari-logsearch/ambari-logsearch-web-new/protractor.conf.js 6b4a31c 
  ambari-logsearch/ambari-logsearch-web-new/src/app/app.module.ts c08cb3a 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/audit-logs-query-params.class.ts
 ef8cf28 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/query-params.class.ts
 83c3261 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-histogram-query-params.class.spec.ts
 efa2459 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-histogram-query-params.class.ts
 87e82f6 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-query-params.class.ts
 c88ec46 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.html
 1b134c3 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.less
 8366952 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.spec.ts
 3706d51 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.ts
 131edcd 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.html 
a0444c9 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.less 
d1aa7ff 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.spec.ts
 bc16ea4 
  ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.ts 
4de47ea 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.html
 a16b205 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.less
 55699b4 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.spec.ts
 8efe320 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.ts
 5800190 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.html
 1baebed 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.less
 d47160f 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.spec.ts
 5409d30 
  
ambari-l

Review Request 62034: Integrate LogSearch new UI with the server and get rid of the old one

2017-09-01 Thread Oliver Szabo

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

Review request for Ambari, Andrii Babiichuk, Miklos Gergely, and Robert 
Nettleton.


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


Repository: ambari


Description
---

- get rid of old ui
- renamve web-new to web
- add some small changes to authentication (create an abstract filter for jwt 
and move it somewhere else, those changes will be continued in an other patch)
- change login/logout authentication mechanism for the new UI (do not redirect 
to /login.html)


Diffs
-

  ambari-logsearch/ambari-logsearch-server/build.xml aadacd7 
  ambari-logsearch/ambari-logsearch-server/pom.xml e60cc14 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/LogSearch.java
 39343c7 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/auth/filter/AbstractJWTFilter.java
 PRE-CREATION 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/auth/model/JWTAuthenticationToken.java
 PRE-CREATION 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
 038ba5c 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/authenticate/LogsearchLogoutSuccessHandler.java
 c20e383 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/filters/LogsearchJWTFilter.java
 1bc7231 
  
ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/model/JWTAuthenticationToken.java
 dfac191 
  ambari-logsearch/ambari-logsearch-web-new/.angular-cli.json cc74739 
  ambari-logsearch/ambari-logsearch-web-new/.editorconfig 6e87a00 
  ambari-logsearch/ambari-logsearch-web-new/.gitignore 54bfd20 
  ambari-logsearch/ambari-logsearch-web-new/README.md 2fb07fb 
  ambari-logsearch/ambari-logsearch-web-new/e2e/app.e2e-spec.ts ebfdcb9 
  ambari-logsearch/ambari-logsearch-web-new/e2e/app.po.ts c446bfb 
  ambari-logsearch/ambari-logsearch-web-new/e2e/tsconfig.e2e.json ac7a373 
  ambari-logsearch/ambari-logsearch-web-new/karma.conf.js 0512808 
  ambari-logsearch/ambari-logsearch-web-new/package.json 96733eb 
  ambari-logsearch/ambari-logsearch-web-new/pom.xml 28e1754 
  ambari-logsearch/ambari-logsearch-web-new/protractor.conf.js 6b4a31c 
  ambari-logsearch/ambari-logsearch-web-new/src/app/app.module.ts c08cb3a 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/audit-logs-query-params.class.ts
 ef8cf28 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/query-params.class.ts
 83c3261 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-histogram-query-params.class.spec.ts
 efa2459 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-histogram-query-params.class.ts
 87e82f6 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/classes/queries/service-logs-query-params.class.ts
 c88ec46 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.html
 1b134c3 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.less
 8366952 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.spec.ts
 3706d51 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/accordion-panel/accordion-panel.component.ts
 131edcd 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.html 
a0444c9 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.less 
d1aa7ff 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.spec.ts
 bc16ea4 
  ambari-logsearch/ambari-logsearch-web-new/src/app/components/app.component.ts 
4de47ea 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.html
 a16b205 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.less
 55699b4 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.spec.ts
 8efe320 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-button/dropdown-button.component.ts
 5800190 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.html
 1baebed 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.less
 d47160f 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.spec.ts
 5409d30 
  
ambari-logsearch/ambari-logsearch-web-new/src/app/components/dropdown-list/dropdown-list.component.ts
 3de664e 
  
amba

Re: Review Request 61949: Reject PATCH VDFs with Services that are not Included in the Cluster

2017-09-01 Thread Nate Cole

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
Lines 611-617 (patched)


This doesn't seem to be relevant - we already know that the stack contains 
services since the cluster has them.  And I don't see "stack" being used after 
this.  Can probably remove the @Inject'ed AmbariMetaInfo too.


- Nate Cole


On Sept. 1, 2017, 9:20 a.m., Dmitro Lisnichenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61949/
> ---
> 
> (Updated Sept. 1, 2017, 9:20 a.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-21832
> https://issues.apache.org/jira/browse/AMBARI-21832
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Currently there is an odd scenario which can occur when patch repositories 
> are registered which have services not yet installed. Consider the following 
> scenario:
> 
> - Install ZooKeeper, Storm on HDP 2.6.0.0-1234
> - Register/patch a {{PATCH}} VDF for Storm and Accumulo for 2.6.0.1-
> - Install Accumulo
> 
> Which version does Accumulo use - the {{STANDARD}} repository or the 
> {{PATCH}}? If the {{PATCH}} repository is chosen, this will now prevent 
> reversion of the patch since there's no prior version for Accumulo to revert 
> back to.
> 
> If Accumulo uses the {{STANDARD}} repo, then there needs to be a lot of 
> design and UX flow work provided to indicate that a {{PATCH}} which was 
> previously applied can be re-applied for the new service. This also causes 
> problems for patch reversion since now there would be two upgrades which need 
> to be reverted to "get rid" of the patch.
> 
> For the timeframe for Ambari 2.6, we should reject VDFs that include services 
> which are not installed. This will prevent the problem.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
>  7a53e91bb0 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
>  282f159a66 
> 
> 
> Diff: https://reviews.apache.org/r/61949/diff/3/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> UI misbehaves when VDF validation triggers error. Will open a UI jira for that
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>



Re: Review Request 61949: Reject PATCH VDFs with Services that are not Included in the Cluster

2017-09-01 Thread Dmytro Grinenko

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


Ship it!




Ship It!

- Dmytro Grinenko


On Sept. 1, 2017, 1:20 p.m., Dmitro Lisnichenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61949/
> ---
> 
> (Updated Sept. 1, 2017, 1:20 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-21832
> https://issues.apache.org/jira/browse/AMBARI-21832
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Currently there is an odd scenario which can occur when patch repositories 
> are registered which have services not yet installed. Consider the following 
> scenario:
> 
> - Install ZooKeeper, Storm on HDP 2.6.0.0-1234
> - Register/patch a {{PATCH}} VDF for Storm and Accumulo for 2.6.0.1-
> - Install Accumulo
> 
> Which version does Accumulo use - the {{STANDARD}} repository or the 
> {{PATCH}}? If the {{PATCH}} repository is chosen, this will now prevent 
> reversion of the patch since there's no prior version for Accumulo to revert 
> back to.
> 
> If Accumulo uses the {{STANDARD}} repo, then there needs to be a lot of 
> design and UX flow work provided to indicate that a {{PATCH}} which was 
> previously applied can be re-applied for the new service. This also causes 
> problems for patch reversion since now there would be two upgrades which need 
> to be reverted to "get rid" of the patch.
> 
> For the timeframe for Ambari 2.6, we should reject VDFs that include services 
> which are not installed. This will prevent the problem.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
>  7a53e91bb0 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
>  282f159a66 
> 
> 
> Diff: https://reviews.apache.org/r/61949/diff/3/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> UI misbehaves when VDF validation triggers error. Will open a UI jira for that
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>



Re: Review Request 61949: Reject PATCH VDFs with Services that are not Included in the Cluster

2017-09-01 Thread Dmitro Lisnichenko

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

(Updated Sept. 1, 2017, 4:20 p.m.)


Review request for Ambari, Dmytro Grinenko, Jonathan Hurley, and Nate Cole.


Changes
---

Fixed test


Summary (updated)
-

Reject PATCH VDFs with Services that are not Included in the Cluster


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


Repository: ambari


Description
---

Currently there is an odd scenario which can occur when patch repositories are 
registered which have services not yet installed. Consider the following 
scenario:

- Install ZooKeeper, Storm on HDP 2.6.0.0-1234
- Register/patch a {{PATCH}} VDF for Storm and Accumulo for 2.6.0.1-
- Install Accumulo

Which version does Accumulo use - the {{STANDARD}} repository or the {{PATCH}}? 
If the {{PATCH}} repository is chosen, this will now prevent reversion of the 
patch since there's no prior version for Accumulo to revert back to.

If Accumulo uses the {{STANDARD}} repo, then there needs to be a lot of design 
and UX flow work provided to indicate that a {{PATCH}} which was previously 
applied can be re-applied for the new service. This also causes problems for 
patch reversion since now there would be two upgrades which need to be reverted 
to "get rid" of the patch.

For the timeframe for Ambari 2.6, we should reject VDFs that include services 
which are not installed. This will prevent the problem.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
 7a53e91bb0 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
 282f159a66 


Diff: https://reviews.apache.org/r/61949/diff/3/

Changes: https://reviews.apache.org/r/61949/diff/2-3/


Testing (updated)
---

mvn clean test

UI misbehaves when VDF validation triggers error. Will open a UI jira for that


Thanks,

Dmitro Lisnichenko



Re: Review Request 61998: Update Ambari Metrics service check to support HTTP SPNEGO authentication

2017-09-01 Thread Robert Levas

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


Ship it!




Ship It!


ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
Lines 182-190 (patched)


This can be simplified to 

```
return params.security_enabled \
  and 'core-site' in params.config['configurations'] \
  and 'hadoop.http.authentication.type' in 
params.config['configurations']['core-site'] \
  and 
params.config['configurations']['core-site']['hadoop.http.authentication.type'] 
== "kerberos" \
  and 'hadoop.http.filter.initializers' in 
params.config['configurations']['core-site'] \
  and 
params.config['configurations']['core-site']['hadoop.http.filter.initializers'] 
== "org.apache.hadoop.security.AuthenticationFilterInitializer"
```


- Robert Levas


On Aug. 30, 2017, 3:07 p.m., Qin Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61998/
> ---
> 
> (Updated Aug. 30, 2017, 3:07 p.m.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Dmytro Sen, Eric Yang, Robert 
> Levas, and Sid Wagle.
> 
> 
> Bugs: AMBARI-21821
> https://issues.apache.org/jira/browse/AMBARI-21821
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> This is a subtask of AMBARI-14384 "Ambari Metrics doesn't use SPNEGO to 
> authenticate".
> In a Kerberos enabled cluster with SPNEGO enabled on Hadoop APIs, Ambari 
> Metrics Collector web-console will be Kerberos HTTP SPNEGO enabled too. But 
> Ambari Metrics service check currently does not support Kerberos HTTP SPNEGO 
> authentication.
> 
> 2017-08-24 16:13:44,078 - Ambari Metrics service check was started.
> 2017-08-24 16:13:44,109 - Generated metrics for host amshost.example.com :
> {
> "metrics": [
> {
> "metricname": "AMBARI_METRICS.SmokeTest.FakeMetric",
> "appid": "amssmoketestfake",
> "hostname": "host.example.com",
> "timestamp": 1503616424000,
> "starttime": 1503616424000,
> "metrics":
> { "1503616424000": 0.164134766408, "1503616425000": 1503616424000 }
> 
> }
> ]
> }
> 2017-08-24 16:13:44,114 - Connecting (POST) to 
> amshost.example.com:6188/ws/v1/timeline/metrics/
> 2017-08-24 16:13:44,117 - Http response for host amshost.example.com: 401 
> Authentication required
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
>  6975bec 
>   
> ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
>  2b3dfa9 
> 
> 
> Diff: https://reviews.apache.org/r/61998/diff/1/
> 
> 
> Testing
> ---
> 
> 1. run the Hadoop QA testing twice and the testcase failures has nothing to 
> do with the patch
> 
> 2. manually tested AMS service check on HDP/trunk cluster with combination of 
> HTTP SPNEGO/Non-HTTP SPNEGO, SSL/Non-SSL, AMS distributed/embedded.
> 
> 
> Thanks,
> 
> Qin Liu
> 
>



Re: Review Request 62026: ambari-server upgrade process still puts the new views jar to default location even if views.dir is customized in ambari.properties

2017-09-01 Thread Vitalyi Brodetskyi

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


Ship it!




Ship It!

- Vitalyi Brodetskyi


On Вер. 1, 2017, 8:14 до полудня, Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62026/
> ---
> 
> (Updated Вер. 1, 2017, 8:14 до полудня)
> 
> 
> Review request for Ambari and Dmytro Sen.
> 
> 
> Bugs: AMBARI-21684
> https://issues.apache.org/jira/browse/AMBARI-21684
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> "ambari-server upgrade" process still puts the new views jar to default
> location even if views.dir is customized in ambari.properties
> 
> Tested with Ambari 2.2.1 to upgrade to Ambari 2.4.0.
> 
> Steps to reproduce:
> 
> 1\. Stop Ambari Server.  
> 2\. Move /var/lib/ambari-server/resources/views to a new custom directory.  
> 3\. Add views.dir property in ambari.properties with above custom directory as
> value.  
> 4\. Restart Ambari server and it view works.  
> 5\. Upgrade Ambari server.  
> 6\. Views.dir still points to new custom directory but upgrade puts the new
> jars again back to /var/lib/ambari-server/resources/views (default location). 
>  
> 7\. Views fails as jars are older than current Ambari version in the views.dir
> location.
> 
> 
> 
> 
> Every 2.0s: grep views.dir /etc/ambari-server/conf/ambari.properties  
>Tue Aug  8 17:22:29 2017
> 
> views.dir=/tmp/amogh/views
> 
> Every 2.0s: ls -l /tmp/amogh/views
>Tue Aug  8 17:23:21 2017
> 
> total 326792
> -rw-r--r--  1 root root   571656 2017-08-08 00:42 
> ambari-admin-2.2.1.0.161.jar
> -rw-r--r--  1 root root 45378971 2017-08-08 00:42 
> capacity-scheduler-2.2.1.0.161.jar
> -rw-r--r--  1 root root 42834901 2017-08-08 00:42 files-2.2.1.0.161.jar
> -rw-r--r--  1 root root 98657707 2017-08-08 00:42 hive-2.2.1.0.161.jar
> -rw-r--r--  1 root root 46910268 2017-08-08 00:42 pig-2.2.1.0.161.jar
> -rw-r--r--  1 root root 52239902 2017-08-08 00:42 slider-2.2.1.0.161.jar
> -rw-r--r--  1 root root 48025481 2017-08-08 00:42 tez-view-2.2.1.0.161.jar
> drwxr-xr-x 10 root root 4096 2017-08-08 00:46 work
> -rw---  1 root root 3309 2017-08-08 00:42 
> zeppelin-view-1.0-SNAPSHOT.jar
> 
> 
> After Upgrage
> 
> 
> 
> 
> Every 2.0s: ls -l /var/lib/ambari-server/resources/views 
> Tue Aug  8 17:23:44 2017
> 
> total 582628
> -rwxrwxrwx 1 root root917475 2016-08-30 19:29 
> ambari-admin-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  45784224 2016-08-30 19:29 
> capacity-scheduler-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  42287167 2016-08-30 19:29 files-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  99518847 2016-08-30 19:29 hive-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root 126641271 2016-08-30 19:29 hive-jdbc-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  35225272 2016-08-30 19:29 
> hueambarimigration-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  47306795 2016-08-30 19:29 pig-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  53071022 2016-08-30 19:29 slider-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root   1202086 2016-08-30 19:29 storm-view-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  49835854 2016-08-30 19:29 tez-view-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  49250942 2016-08-30 19:29 wfmanager-2.4.0.1.1.jar
> -rwxrwxrwx 1 root root  45547958 2016-08-30 19:29 
> zeppelin-view-2.4.0.1.1.jar
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/python/ambari_server/serverConfiguration.py f6f3f43 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 07f5097 
> 
> 
> Diff: https://reviews.apache.org/r/62026/diff/1/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Review Request 62026: ambari-server upgrade process still puts the new views jar to default location even if views.dir is customized in ambari.properties

2017-09-01 Thread Andrew Onischuk

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

Review request for Ambari and Dmytro Sen.


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


Repository: ambari


Description
---

"ambari-server upgrade" process still puts the new views jar to default
location even if views.dir is customized in ambari.properties

Tested with Ambari 2.2.1 to upgrade to Ambari 2.4.0.

Steps to reproduce:

1\. Stop Ambari Server.  
2\. Move /var/lib/ambari-server/resources/views to a new custom directory.  
3\. Add views.dir property in ambari.properties with above custom directory as
value.  
4\. Restart Ambari server and it view works.  
5\. Upgrade Ambari server.  
6\. Views.dir still points to new custom directory but upgrade puts the new
jars again back to /var/lib/ambari-server/resources/views (default location).  
7\. Views fails as jars are older than current Ambari version in the views.dir
location.




Every 2.0s: grep views.dir /etc/ambari-server/conf/ambari.properties
 Tue Aug  8 17:22:29 2017

views.dir=/tmp/amogh/views

Every 2.0s: ls -l /tmp/amogh/views  
 Tue Aug  8 17:23:21 2017

total 326792
-rw-r--r--  1 root root   571656 2017-08-08 00:42 
ambari-admin-2.2.1.0.161.jar
-rw-r--r--  1 root root 45378971 2017-08-08 00:42 
capacity-scheduler-2.2.1.0.161.jar
-rw-r--r--  1 root root 42834901 2017-08-08 00:42 files-2.2.1.0.161.jar
-rw-r--r--  1 root root 98657707 2017-08-08 00:42 hive-2.2.1.0.161.jar
-rw-r--r--  1 root root 46910268 2017-08-08 00:42 pig-2.2.1.0.161.jar
-rw-r--r--  1 root root 52239902 2017-08-08 00:42 slider-2.2.1.0.161.jar
-rw-r--r--  1 root root 48025481 2017-08-08 00:42 tez-view-2.2.1.0.161.jar
drwxr-xr-x 10 root root 4096 2017-08-08 00:46 work
-rw---  1 root root 3309 2017-08-08 00:42 
zeppelin-view-1.0-SNAPSHOT.jar


After Upgrage




Every 2.0s: ls -l /var/lib/ambari-server/resources/views 
Tue Aug  8 17:23:44 2017

total 582628
-rwxrwxrwx 1 root root917475 2016-08-30 19:29 ambari-admin-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  45784224 2016-08-30 19:29 
capacity-scheduler-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  42287167 2016-08-30 19:29 files-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  99518847 2016-08-30 19:29 hive-2.4.0.1.1.jar
-rwxrwxrwx 1 root root 126641271 2016-08-30 19:29 hive-jdbc-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  35225272 2016-08-30 19:29 
hueambarimigration-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  47306795 2016-08-30 19:29 pig-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  53071022 2016-08-30 19:29 slider-2.4.0.1.1.jar
-rwxrwxrwx 1 root root   1202086 2016-08-30 19:29 storm-view-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  49835854 2016-08-30 19:29 tez-view-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  49250942 2016-08-30 19:29 wfmanager-2.4.0.1.1.jar
-rwxrwxrwx 1 root root  45547958 2016-08-30 19:29 
zeppelin-view-2.4.0.1.1.jar


Diffs
-

  ambari-server/src/main/python/ambari_server/serverConfiguration.py f6f3f43 
  ambari-server/src/main/python/ambari_server/serverUpgrade.py 07f5097 


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


Testing
---

mvn clean test


Thanks,

Andrew Onischuk



Re: Review Request 62020: Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added

2017-09-01 Thread Attila Magyar

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




ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
Lines 173 (patched)


unnecessary null check: cluster.getServices() never returns null



ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
Lines 341 (patched)


this isEmpty check looks unnecessary, there is a for loop after the check



ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
Lines 370 (patched)


isn't this supposed to be !MapUtils.isEmpty ?


- Attila Magyar


On Aug. 31, 2017, 5:55 p.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> ---
> 
> (Updated Aug. 31, 2017, 5:55 p.m.)
> 
> 
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene 
> Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when 
> Kerberos is enabled, to reduce number of core service restarts when services 
> are added.  
> 
> Services to pre-configure include:
> * Knox
> * Beacon
> 
> While upgrading the stack (EU or RU), processing the relevant Kerberos 
> descriptor to find services marked to be _pre-configured_.  When a tagged 
> service is encountered, process it if it is not installed. Apply only 
> configuration changes for existing configuration types.  This will set at 
> least the core-site changes related to proxyuser and auth-to-local rules 
> properties. By doing this, if a tagged service is later installed, the 
> settings will already be in place in the existing service configs and thus 
> the existing services will not need to be restarted. 
> 
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed 
> * The stack advisor will be used to suggest locations of components - used to 
> build the clusterHostInfo structure that may be used to derive property 
> values. 
> 
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to 
> HDP 2.6.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
>  978b329d35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
>  9bdb377cf7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
>  d86433f880 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java
>  178d129dc8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java
>  da83a74aca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java
>  581067f939 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  492c308275 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> 995a1d3fd9 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
>  PRE-CREATION 
>   ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json 
> PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/62020/diff/1/
> 
> 
> Testing
> ---
> 
> Manually tested
> 
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Re: Review Request 62015: Ranger should handle external Zookeeper properly

2017-09-01 Thread Mugdha Varadkar

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


Ship it!




Ship It!

- Mugdha Varadkar


On Aug. 31, 2017, 8:41 p.m., Miklos Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62015/
> ---
> 
> (Updated Aug. 31, 2017, 8:41 p.m.)
> 
> 
> Review request for Ambari, Gautam Borad, Mugdha Varadkar, Oliver Szabo, 
> Robert Nettleton, Vishal Suvagia, and Velmurugan Periasamy.
> 
> 
> Bugs: AMBARI-21863
> https://issues.apache.org/jira/browse/AMBARI-21863
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Ranger tries to create it's configurations using the local ambari-infra Solr 
> even if it is specified to use an external one.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
>  bd45558 
> 
> 
> Diff: https://reviews.apache.org/r/62015/diff/1/
> 
> 
> Testing
> ---
> 
> Tested on two clusters, one running the external Zookeeper, the other 
> installed Ranger, the config data were created.
> 
> 
> Thanks,
> 
> Miklos Gergely
> 
>