Review Request 45284: Ambari LDAP integration cannot handle LDAP directories with multiple entries for the same user

2016-03-24 Thread Sebastian Toader

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

Review request for Ambari, Andrii Tkach, Dmitro Lisnichenko, Myroslav 
Papirkovskyy, Oliver Szabo, Robert Levas, and Yusaku Sako.


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


Repository: ambari


Description
---

Problem:
In case LDAP set up with multiple Domains which are joined into a Forrest with 
trusts between the different Domains users may appear in different locations in 
LDAP.
Since users who wants to access Ambari can be in any domain Ambari has to 
search the whole forrest, and as the users appearing in multiple domains are 
identical Ambari cannot filter out all but one of the user entries.

Solution:
1.If the LDAP search upon login to Ambari leads to multiple match user match 
due to the user appears in multiple domains show an error message to user 
prompting for providing domain as well to log-in. (e.g. Login Failed: Please 
append your domain to your username and try again. Example: username@domain)

2. When user provides domain information at login as well Ambari looks up the 
user in LDAP using different filter which is configurable. If this 
configuration is not set Ambari defaults to filter by userPrincipalName

3. A map of login name (login alias) to ambari user name is stored in the 
session so as later whenever is needed the login name can be resolved to ambari 
user name (user name stored in ambari database).

4. User related rest API calls includes user name in the URL. There is a filter 
set up for these resolve the user name in the URL to ambari user name if needed.


Diffs
-

  ambari-server/pom.xml 1e44517 
  
ambari-server/src/main/java/org/apache/ambari/server/api/UserNameOverrideFilter.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 bf18325 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 076f850 
  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthentication.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java
 20cf2fd 
  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthoritiesPopulator.java
 fc7f73a 
  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticator.java
 ed68c01 
  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapUtils.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AuthorizationHelper.java
 b136182 
  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/DuplicateLdapUserFoundAuthenticationException.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/LdapServerProperties.java
 8eeaf35 
  ambari-server/src/main/resources/webapp/WEB-INF/spring-security.xml 3bbc785 
  
ambari-server/src/test/java/org/apache/ambari/server/api/UserNameOverrideFilterTest.java
 PRE-CREATION 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 3ecb5aa 
  
ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
 PRE-CREATION 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java
 PRE-CREATION 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDuplicateUserTest.java
 PRE-CREATION 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderTest.java
 d48be85 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
 PRE-CREATION 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
 62f719d 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/LdapServerPropertiesTest.java
 0797239 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestAmbariLdapAuthoritiesPopulator.java
 7c72f4c 
  ambari-server/src/test/resources/users.ldif 3620e63 
  ambari-server/src/test/resources/users_with_duplicate_uid.ldif PRE-CREATION 
  ambari-web/app/controllers/login_controller.js fc64a54 
  ambari-web/app/router.js ccf8cb4 
  ambari-web/test/controllers/login_controller_test.js 90ba06a 

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


Testing
---

Manual testing using OpenLDAP. Since OpenLDAP does not support 
userPrincipalName attribute in the manual testing used email address (filter 
config in ambari properties: 

Re: Review Request 45220: /tmp hdfs folder created with mode 0777

2016-03-24 Thread Sebastian Toader

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


Ship it!




Ship It!

- Sebastian Toader


On March 24, 2016, 1:44 p.m., Laszlo Puskas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45220/
> ---
> 
> (Updated March 24, 2016, 1:44 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Sumit Mohanty, and Sebastian 
> Toader.
> 
> 
> Bugs: AMBARI-15531
> https://issues.apache.org/jira/browse/AMBARI-15531
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When cluster created via blueprint the /tmp folder may be created implicitly 
> by various components with permissions that prevent other components to write 
> to it. In the specific case described by the linked issue, the folder has 
> been created when starting the historyserver, and later on the folder 
> couldn't be written by the hiveserver2. (ideally the folder is expected to be 
> created when the namenode starts)
> 
> The patch fixes the specific case described in the bug, however a more 
> robust/generic solution is needed to properly sort out the problem.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
>  05e19cf 
>   ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py 
> b1634d0 
> 
> Diff: https://reviews.apache.org/r/45220/diff/
> 
> 
> Testing
> ---
> 
> Unit tests in progress.
> Manual testing under way
> 
> 
> Thanks,
> 
> Laszlo Puskas
> 
>



Review Request 45291: When saving repository changes, confirm dialog shows message key instead of actual message

2016-03-24 Thread Sangeeta Ravindran

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

Review request for Ambari, Alexandr Antonenko and Andrii Tkach.


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


Repository: ambari


Description
---

Click on Versions in the Ambari Admin view.
Click on the Repository version.
Delete a repository or edit the url for it. 
Click on Save.
A confirming dialog pops up with the following message:
versions.changeBaseURLConfirmationTip.message

Fix involves using the correct message key.


Diffs
-

  
ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 2c3f000 

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


Testing
---

Tested manually.


Thanks,

Sangeeta Ravindran



Re: Review Request 45284: Ambari LDAP integration cannot handle LDAP directories with multiple entries for the same user

2016-03-24 Thread Oliver Szabo

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




ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 (line 192)


It should be authentication instead of authorization


- Oliver Szabo


On March 24, 2016, 1:04 p.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45284/
> ---
> 
> (Updated March 24, 2016, 1:04 p.m.)
> 
> 
> Review request for Ambari, Andrii Tkach, Dmitro Lisnichenko, Myroslav 
> Papirkovskyy, Oliver Szabo, Robert Levas, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15554
> https://issues.apache.org/jira/browse/AMBARI-15554
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problem:
> In case LDAP set up with multiple Domains which are joined into a Forrest 
> with trusts between the different Domains users may appear in different 
> locations in LDAP.
> Since users who wants to access Ambari can be in any domain Ambari has to 
> search the whole forrest, and as the users appearing in multiple domains are 
> identical Ambari cannot filter out all but one of the user entries.
> 
> Solution:
> 1.If the LDAP search upon login to Ambari leads to multiple match user match 
> due to the user appears in multiple domains show an error message to user 
> prompting for providing domain as well to log-in. (e.g. Login Failed: Please 
> append your domain to your username and try again. Example: username@domain)
> 
> 2. When user provides domain information at login as well Ambari looks up the 
> user in LDAP using different filter which is configurable. If this 
> configuration is not set Ambari defaults to filter by userPrincipalName
> 
> 3. A map of login name (login alias) to ambari user name is stored in the 
> session so as later whenever is needed the login name can be resolved to 
> ambari user name (user name stored in ambari database).
> 
> 4. User related rest API calls includes user name in the URL. There is a 
> filter set up for these resolve the user name in the URL to ambari user name 
> if needed.
> 
> 
> Diffs
> -
> 
>   ambari-server/pom.xml 1e44517 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/UserNameOverrideFilter.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  bf18325 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  076f850 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthentication.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java
>  20cf2fd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthoritiesPopulator.java
>  fc7f73a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticator.java
>  ed68c01 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapUtils.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AuthorizationHelper.java
>  b136182 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/DuplicateLdapUserFoundAuthenticationException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/LdapServerProperties.java
>  8eeaf35 
>   ambari-server/src/main/resources/webapp/WEB-INF/spring-security.xml 3bbc785 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/UserNameOverrideFilterTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  3ecb5aa 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDuplicateUserTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderTest.java
>  d48be85 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
>  62f719d 
>   
> 

Re: Review Request 45285: ambari-agent upstart script broken in RHEL6

2016-03-24 Thread Dmitro Lisnichenko

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


Ship it!




Ship It!

- Dmitro Lisnichenko


On March 24, 2016, 3:06 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45285/
> ---
> 
> (Updated March 24, 2016, 3:06 p.m.)
> 
> 
> Review request for Ambari and Dmitro Lisnichenko.
> 
> 
> Bugs: AMBARI-14842
> https://issues.apache.org/jira/browse/AMBARI-14842
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Ambari 2.2.1.1 comes with the following upstart patch:
> 
> 
> This seems to break the Ambari upstart script in RHEL/CentOS6:
> 
> 
> 
> [root@slave-01 ~]# cat /etc/redhat-release
> CentOS release 6.7 (Final)
> [root@slave-01 ~]# rpm -qa|grep upstart
> upstart-0.6.5-13.el6_5.3.x86_64
> [root@slave-01 ~]# status ambari-agent
> status: Unknown job: ambari-agent
> [root@slave-01 ~]# ls -l /etc/init/ambari-agent.conf
> -rwxr-xr-x 1 root root 1035 Mar 10 18:33 /etc/init/ambari-agent.conf
> 
> 
> This is due to the following line present in /etc/init/ambari-agent.conf:  
> kill signal SIGKILL
> 
> Apparently, the upstart version shipped with RHEL6 doesn't support the kill
> feature.
> 
> I'm not sure why this kill is required, as the ambari-server /etc/init/ambari-
> server.conf doesn't contain it.
> 
> Can we have this kill line removed please? Or a separate /etc/init/ambari-
> agent.conf file only for RHEL6 without this kill line?
> 
> IN ADDITION:
> 
>   * the upstart script is deployed even on RHEL/CentOS7, where there is no 
> upstart - it would be cleaner to only deploy the upstart script if upstart is 
> actually installed on the system...
>   * request for systemd configs for both ambari-agent and ambari-server, 
> since systemd is default in centos7  
> A proposed patch is: 
> 
> 
> Diffs
> -
> 
>   ambari-agent/etc/init/ambari-agent.conf 75c1b06 
>   ambari-agent/src/main/python/ambari_agent/ExitHelper.py 06dfadb 
>   ambari-agent/src/main/python/ambari_agent/HeartbeatHandlers.py f9d0e14 
>   ambari-agent/src/main/python/ambari_agent/main.py 22e2e4a 
> 
> Diff: https://reviews.apache.org/r/45285/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Review Request 45289: RBAC based user access to view instances are not honoured

2016-03-24 Thread Robert Levas

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

Review request for Ambari, Jonathan Hurley, Oliver Szabo, and Swapan Shridhar.


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


Repository: ambari


Description
---

Problem:
1. Create a cluster 
2. Create some view instances in amber
3. Create a local non-admin ambari user
4. Grant the newly created user access to one of the view instances

Log-in with the non-admin user. The user should only see the view instances it 
has permission instead of all view instances.

This seems to have been introduced by 
https://issues.apache.org/jira/browse/AMBARI-14194


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AuthorizationHelper.java
 b136182 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
 62f719d 

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


Testing
---

Running org.apache.ambari.server.security.authorization.AuthorizationHelperTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.081 sec - in 
org.apache.ambari.server.security.authorization.AuthorizationHelperTest


Thanks,

Robert Levas



Re: Review Request 45325: Add the Config, Start and Stop logic for: (1). Hive Server Interactive, and (2). Associate the LLAP lifecycle to it.

2016-03-24 Thread Sumit Mohanty

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




ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 (line 50)


Are these paths verified with the Hive team?



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 (line 57)


Is it copied for each start() command?



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 (line 76)


Can you add a comment as to what does this do?



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 (line 94)


Nit: the formatting is off. Extra space for all lines after first one.



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 (line 108)


We should rename this variable - and also the variable above it "target". 
Rename them to be something more descriptive.



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 (line 120)


Can we rename this also to create_directory()?



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 (line 80)


What's FOR SECURITY?



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 (line 97)


Use Execute() and pass in params as needed.



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 (line 112)


Lets remove the sleep - why does hive interactive need to have LLAP 
running? Even if we need a sleep it should be 10-30 seconds only



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 (line 115)


We should log the package name as well.



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 (line 118)


If we check for the file, should we check for the message? is there a way 
to control the output location of the file or give the file a name. It seems 
that this process is error prone. I would rather have full control on the file 
name or path and then check the existence of the file rather than message.



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 (line 135)


Anyway, we are deleting the file - so its good.



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 (line 155)


Use Execute()



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 (line 160)


Use Execute()


- Sumit Mohanty


On March 24, 2016, 11:24 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45325/
> ---
> 
> (Updated March 24, 2016, 11:24 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Sumit 
> Mohanty.
> 
> 
> Bugs: AMBARI-15573
> https://issues.apache.org/jira/browse/AMBARI-15573
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Add the Config, Start and Stop logic for: (1). Hive Server Interactive (HSI), 
> and (2). Associate the LLAP lifecycle to it.
> 
> - Start of HSI : Create LLAP package, start LLAP and then start HSI.
> - Stop: Stop HSI and then LLAP.
> 
> 
> Diffs
> -
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
>  f07b76f 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
>  8a4e7e6 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
>  12cf336 
>   

Review Request 45295: AMBARI-15547: User names in the List view of Roles are displayed with URI encoding

2016-03-24 Thread Keta Patel

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

Review request for Ambari, Di Li, Jaimin Jetly, and Richard Zang.


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


Repository: ambari


Description
---

Under the List view of Roles, the name of Users with special characters, like 
'@', are displayed with URI encoding. (please see attachment "names with URI 
encoding.tiff" on Jira)
The names should be displayed without any encoding.


Diffs
-

  
ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
 656425b 

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


Testing
---

The fix for this issue is to replace the displayed name with the correct name 
attribute, which is not URI encoded. This attribute is already present in the 
User's object.
The attachment "names with No URI encoding.tiff" shows the corrected User names.

TEST:
Since the change is in html file, I couldn't write a test cases for it.
But the UI shows the changes in the User's name in the List view of Roles as 
seen in attachment "names with No URI encoding.tiff" on the Jira.

Ambari-Web tests (orginal):
  24689 tests complete (28 seconds)
  145 tests pending

Ambari-Web tests (after fix):
  24689 tests complete (27 seconds)
  145 tests pending


Thanks,

Keta Patel



Re: Review Request 45255: PXF should use hostname instead of localhost in pxf urls

2016-03-24 Thread bhuvnesh chaudhary


> On March 24, 2016, 4:49 a.m., Matt wrote:
> > ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py,
> >  line 136
> > 
> >
> > Did anything break when it was localhost?
> > 
> > Would be surprised if it caused any issue.

none breaks, the host listens on all the interface, but generally its better to 
listen on hostname rather than localhost.


- bhuvnesh


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


On March 24, 2016, 12:24 a.m., bhuvnesh chaudhary wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45255/
> ---
> 
> (Updated March 24, 2016, 12:24 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, jun aoki, Jonathan Hurley, 
> Jayush Luniya, and Oleksandr Diachenko.
> 
> 
> Bugs: AMBARI-15550
> https://issues.apache.org/jira/browse/AMBARI-15550
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> PXF should use actual hostname instead of localhost in pxf urls.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py
>  3134f41 
> 
> Diff: https://reviews.apache.org/r/45255/diff/
> 
> 
> Testing
> ---
> 
> yes. manually
> 
> 
> Thanks,
> 
> bhuvnesh chaudhary
> 
>



Re: Review Request 45284: Ambari LDAP integration cannot handle LDAP directories with multiple entries for the same user

2016-03-24 Thread Robert Levas

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthentication.java
 (line 39)


Is there any chance that this will be `null`? There seem to be a lot of 
internal calls that will throw an NPE if this is `null`.

See `getPrincipalOverride()`



ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthentication.java
 (lines 193 - 210)


Maybe exit out early if principal is `null`?  Seems like 2 unnecessary 
checks will be done in this case.


- Robert Levas


On March 24, 2016, 9:04 a.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45284/
> ---
> 
> (Updated March 24, 2016, 9:04 a.m.)
> 
> 
> Review request for Ambari, Andrii Tkach, Dmitro Lisnichenko, Myroslav 
> Papirkovskyy, Oliver Szabo, Robert Levas, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15554
> https://issues.apache.org/jira/browse/AMBARI-15554
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problem:
> In case LDAP set up with multiple Domains which are joined into a Forrest 
> with trusts between the different Domains users may appear in different 
> locations in LDAP.
> Since users who wants to access Ambari can be in any domain Ambari has to 
> search the whole forrest, and as the users appearing in multiple domains are 
> identical Ambari cannot filter out all but one of the user entries.
> 
> Solution:
> 1.If the LDAP search upon login to Ambari leads to multiple match user match 
> due to the user appears in multiple domains show an error message to user 
> prompting for providing domain as well to log-in. (e.g. Login Failed: Please 
> append your domain to your username and try again. Example: username@domain)
> 
> 2. When user provides domain information at login as well Ambari looks up the 
> user in LDAP using different filter which is configurable. If this 
> configuration is not set Ambari defaults to filter by userPrincipalName
> 
> 3. A map of login name (login alias) to ambari user name is stored in the 
> session so as later whenever is needed the login name can be resolved to 
> ambari user name (user name stored in ambari database).
> 
> 4. User related rest API calls includes user name in the URL. There is a 
> filter set up for these resolve the user name in the URL to ambari user name 
> if needed.
> 
> 
> Diffs
> -
> 
>   ambari-server/pom.xml 1e44517 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/UserNameOverrideFilter.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  bf18325 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  076f850 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthentication.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java
>  20cf2fd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthoritiesPopulator.java
>  fc7f73a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticator.java
>  ed68c01 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapUtils.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AuthorizationHelper.java
>  b136182 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/DuplicateLdapUserFoundAuthenticationException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/LdapServerProperties.java
>  8eeaf35 
>   ambari-server/src/main/resources/webapp/WEB-INF/spring-security.xml 3bbc785 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/UserNameOverrideFilterTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  3ecb5aa 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDuplicateUserTest.java
>  PRE-CREATION 
>   
> 

Re: Review Request 45252: PXF service checks fails on secured cluster without YARN

2016-03-24 Thread Lav Jain


> On March 24, 2016, 1:18 a.m., Matt wrote:
> > ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py,
> >  line 154
> > 
> >
> > Does YARN have to be functional (green status), or just installed so 
> > that libraries are available?

YARN libraries are already present. It has to be configured (to populate 
yarn-site.xml).


- Lav


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


On March 23, 2016, 10:23 p.m., Lav Jain wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45252/
> ---
> 
> (Updated March 23, 2016, 10:23 p.m.)
> 
> 
> Review request for Ambari, Alexander Denissov, Alejandro Fernandez, bhuvnesh 
> chaudhary, Goutam Tadi, Jaimin Jetly, jun aoki, Jayush Luniya, Matt, Newton 
> Alex, and Oleksandr Diachenko.
> 
> 
> Bugs: AMBARI-15542
> https://issues.apache.org/jira/browse/AMBARI-15542
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> PXF service checks fails on secured cluster
> ```
> 2016-03-11 23:37:35,588 - HdfsResource[None] {'security_enabled': True, 
> 'keytab': '/etc/security/keytabs/hdfs.headless.keytab', 'default_fs': 
> 'hdfs://c6401.ambari.apache.org:8020', 'hdfs_site': ..., 'kinit_path_local': 
> '/usr/bin/kinit', 'principal_name': 'hdfs-...@ambari.apache.org', 'user': 
> 'hdfs', 'action': ['execute']}
> 2016-03-11 23:37:35,588 - Testing PXF HDFS read
> 2016-03-11 23:37:35,675 - Error code: 500
> 2016-03-11 23:37:35,675 - HDFS test Failed: Exception occurred in HDFS test: 
> PXF data read failed: HTTP Error 500: Internal Server Error
> ```
> 
> Pxf log says
> ```
> SEVERE: Servlet.service() for servlet [PXF REST Service] in context with path 
> [/pxf] threw exception [java.io.IOException: Can't get Master Kerberos 
> principal for use as renewer] with root cause
> java.io.IOException: Can't get Master Kerberos principal for use as renewer
>   at 
> org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodesInternal(TokenCache.java:116)
>   at 
> org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodesInternal(TokenCache.java:100)
>   at 
> org.apache.hadoop.mapreduce.security.TokenCache.obtainTokensForNamenodes(TokenCache.java:80)
>   at 
> org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:206)
>   at 
> org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:315)
>   at 
> org.apache.hawq.pxf.plugins.hdfs.HdfsDataFragmenter.getSplits(HdfsDataFragmenter.java:108)
>   at 
> org.apache.hawq.pxf.plugins.hdfs.HdfsDataFragmenter.getFragments(HdfsDataFragmenter.java:69)
>   at 
> org.apache.hawq.pxf.service.rest.FragmenterResource.getFragments(FragmenterResource.java:84)
> ```
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
>  eed2d18 
>   
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py
>  40e6d6f 
> 
> Diff: https://reviews.apache.org/r/45252/diff/
> 
> 
> Testing
> ---
> 
> Tested manually with and without YARN, with and without security.
> 
> 
> Thanks,
> 
> Lav Jain
> 
>



Re: Review Request 44972: Improve error logging for install errors during blueprint deployments.

2016-03-24 Thread Amruta Borkar


> On March 24, 2016, 4:24 p.m., Robert Levas wrote:
> > What branch is this for - trunk and branch-2.2?

There are two different patches for trunk and branch-2.2 as the code has been 
refactored in trunk. I do not have commit righs on trunk, I request you to push 
it to trunk once it gets 'ship it' from Alejandro.


- Amruta


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


On March 23, 2016, 10:59 p.m., Amruta Borkar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44972/
> ---
> 
> (Updated March 23, 2016, 10:59 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Robert Levas.
> 
> 
> Bugs: AMBARI-15412
> https://issues.apache.org/jira/browse/AMBARI-15412
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Improve error logging for install errors during blueprint deployments. 
> 
> Currently a severe error during install of a service component gets logged as 
> a WARNing
> 
> E.g.:
> 
> 09 Mar 2016 12:11:45,881 WARN [qtp-ambari-agent-146] HeartBeatHandler:603 - 
> Operation failed - may be retried. Service component host: KAFKA_BROKER, 
> host: hdtest159.svl.ibm.com Action id12-0
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
>  24fea22 
> 
> Diff: https://reviews.apache.org/r/44972/diff/
> 
> 
> Testing
> ---
> 
> There are no JUnit test cases, but attached the screenshot which shows 
> modified output.
> 
> 
> File Attachments
> 
> 
> Output
>   
> https://reviews.apache.org/media/uploaded/files/2016/03/17/923d218f-7ca4-4439-b42f-743511936f94__AMBARI-15412_output.png
> AMBARI-15412_branch-2.2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2016/03/23/80355c33-2d5e-45f0-8f3d-1640f4386f05__AMBARI-15412_branch-2.2.patch
> trunk patch
>   
> https://reviews.apache.org/media/uploaded/files/2016/03/23/5c7a7d2f-fcf7-4858-9626-6a08ec9c7ba7__AMBARI-15412-trunk.patch
> trunk--output
>   
> https://reviews.apache.org/media/uploaded/files/2016/03/23/41b8327f-40ae-4a2f-b9c3-4e85eb9004c4__trunk-output.png
> 
> 
> Thanks,
> 
> Amruta Borkar
> 
>



Re: Review Request 45291: When saving repository changes, confirm dialog shows message key instead of actual message

2016-03-24 Thread Sangeeta Ravindran


> On March 24, 2016, 4:34 p.m., Alexandr Antonenko wrote:
> > Ship It!

Thanks Alexander. Can you please help push the fix.


- Sangeeta


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


On March 24, 2016, 3:27 p.m., Sangeeta Ravindran wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45291/
> ---
> 
> (Updated March 24, 2016, 3:27 p.m.)
> 
> 
> Review request for Ambari, Alexandr Antonenko and Andrii Tkach.
> 
> 
> Bugs: AMBARI-15551
> https://issues.apache.org/jira/browse/AMBARI-15551
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Click on Versions in the Ambari Admin view.
> Click on the Repository version.
> Delete a repository or edit the url for it. 
> Click on Save.
> A confirming dialog pops up with the following message:
> versions.changeBaseURLConfirmationTip.message
> 
> Fix involves using the correct message key.
> 
> 
> Diffs
> -
> 
>   
> ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
>  2c3f000 
> 
> Diff: https://reviews.apache.org/r/45291/diff/
> 
> 
> Testing
> ---
> 
> Tested manually.
> 
> 
> File Attachments
> 
> 
> AMBARI-15551.patch
>   
> https://reviews.apache.org/media/uploaded/files/2016/03/24/2bb8b0a6-489a-4b0d-bb34-a40a44c73acf__AMBARI-15551.patch
> 
> 
> Thanks,
> 
> Sangeeta Ravindran
> 
>



Re: Review Request 45289: RBAC based user access to view instances are not honoured

2016-03-24 Thread Oliver Szabo

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


Ship it!




Ship It!

- Oliver Szabo


On March 24, 2016, 2:59 p.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45289/
> ---
> 
> (Updated March 24, 2016, 2:59 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Oliver Szabo, and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-15543
> https://issues.apache.org/jira/browse/AMBARI-15543
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problem:
> 1. Create a cluster 
> 2. Create some view instances in amber
> 3. Create a local non-admin ambari user
> 4. Grant the newly created user access to one of the view instances
> 
> Log-in with the non-admin user. The user should only see the view instances 
> it has permission instead of all view instances.
> 
> This seems to have been introduced by 
> https://issues.apache.org/jira/browse/AMBARI-14194
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AuthorizationHelper.java
>  b136182 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
>  62f719d 
> 
> Diff: https://reviews.apache.org/r/45289/diff/
> 
> 
> Testing
> ---
> 
> Running 
> org.apache.ambari.server.security.authorization.AuthorizationHelperTest
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.081 sec - 
> in org.apache.ambari.server.security.authorization.AuthorizationHelperTest
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Review Request 45303: Update HAWQ default_hash_table_bucket_number property logic

2016-03-24 Thread Alexander Denissov

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

Review request for Ambari, Alejandro Fernandez, bhuvnesh chaudhary, Goutam 
Tadi, Jayush Luniya, Lav Jain, Matt, Oleksandr Diachenko, and Sumit Mohanty.


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


Repository: ambari


Description
---

Update HAWQ default_hash_table_bucket_number property logic


Diffs
-

  ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
4635199 
  ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py 682e1c2 

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


Testing
---

manual

--
Ran 246 tests in 7.045s

OK
--
Total run:911
Total errors:0
Total failures:0


Thanks,

Alexander Denissov



Re: Review Request 44724: AMBARI-12906: Alert notifications are created even if credential fields are left empty

2016-03-24 Thread Jonathan Hurley


> On March 22, 2016, 11:07 a.m., Jonathan Hurley wrote:
> > Any unit tests to cover this?
> 
> Qin Liu wrote:
> Hi Jonathan, I didn't add unit tests to cover checking spaces but I 
> tested it from UI. Can I still ship it? Or, can I add it from another patch 
> if you really want it? :-)
> 
> Also, Di is off and will be back in 2 weeks. Can I ship without waiting 
> for him back since this is just minor follow-up issue? Thank you very much!

I gave it a Ship It, so I'm fine if you feel that this change doesn't need a 
specific test. We normally want 2 +1's before comitting. You can add anyone who 
has been working in ambari-web recently.


- Jonathan


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


On March 20, 2016, 1:50 a.m., Qin Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44724/
> ---
> 
> (Updated March 20, 2016, 1:50 a.m.)
> 
> 
> Review request for Ambari, Di Li and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-12906
> https://issues.apache.org/jira/browse/AMBARI-12906
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> User should not be allowed to save changes if the credential fields are left 
> empty when creating new Alert Notifications.
> 
> Steps to reproduce:
> 1. Create New Alert Notification
> 2. Enter Name = test
> 3. Tick the checkbox for 'Use Authentication'
> 4. Keep username and password empty
> 5. Click on Save
> 6. New alert notifications is created.
> 
> 
> Diffs
> -
> 
>   
> ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
>  79e524e 
>   ambari-web/app/messages.js 421143a 
>   ambari-web/app/templates/main/alerts/create_alert_notification.hbs 0a83f63 
>   ambari-web/app/utils/validator.js 6426163 
>   
> ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
>  f16bf4d 
> 
> Diff: https://reviews.apache.org/r/44724/diff/
> 
> 
> Testing
> ---
> 
> FIX:
> 1. With the fix, user won't be allowd to to save changes if Email is selected 
> for alert notification and Use authentication is chosen and the credential 
> fields are left empty when creating new Alert Notifications or editing 
> existing Alert Notifications.
> 2. The error message "Username is required" will be shown if the Username is 
> empty.
> 3. The error message "Password is required" will be shown if the password is 
> empty. 
> The fix here uses a similar approach that was used for the Password 
> Confirmation error handling.
> 
> TESTS:
> The fix has been tested with HDP UI.
> manage_alert_notifications_controller_test.js has also been modified to test 
> changes.
> 
> The following is the result of running ambari-web tests:
> 
> 24957 tests complete (31 seconds)
> 145 tests pending
> 
> 
> Thanks,
> 
> Qin Liu
> 
>



Re: Review Request 45253: AMBARI-15544: Creating multinode cluster using Blueprints fails.

2016-03-24 Thread Nate Cole

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


Ship it!




Ship It!

- Nate Cole


On March 24, 2016, 12:42 p.m., Nahappan Somasundaram wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45253/
> ---
> 
> (Updated March 24, 2016, 12:42 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, 
> Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-15544
> https://issues.apache.org/jira/browse/AMBARI-15544
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-15544: Creating multinode cluster using Blueprints fails.
> 
> ** Issue **:
> 
> This issue happens when there are multiple agents running before deployment 
> happens. During registration, there is no cluster, so the recovery 
> configuration is not obtained. Subsequently, when hosts become a part of a 
> cluster, agents attempt to get the recovery configuration during the 
> heartbeats. The first agent successfully gets the configuration because the 
> timestamp map is empty. When the next agent heartbeats, it checks to see if 
> the configuration is stale. While there is an entry for the cluster name in 
> the timestamp map created by the previous agent, there is no hostname entry 
> for the current agent which causes the timestamp returned for that hostname 
> to be null.
> 
> ** Fix **:
> 
> Check the returned Timestamp object for null before accessing it.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/RecoveryConfigHelper.java
>  dca4a9b9a32377a2d7d620d6f939e7250cc40590 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
>  f7c85b6d514cee908f07513e62874ed9ed393fa4 
> 
> Diff: https://reviews.apache.org/r/45253/diff/
> 
> 
> Testing
> ---
> 
> ** 1. mvn clean install -DskipTests **
> 
> [INFO] 
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Ambari Main ... SUCCESS [5.199s]
> [INFO] Apache Ambari Project POM . SUCCESS [0.037s]
> [INFO] Ambari Web  SUCCESS [31.250s]
> [INFO] Ambari Views .. SUCCESS [1.140s]
> [INFO] Ambari Admin View . SUCCESS [5.628s]
> [INFO] ambari-metrics  SUCCESS [0.355s]
> [INFO] Ambari Metrics Common . SUCCESS [0.476s]
> [INFO] Ambari Metrics Hadoop Sink  SUCCESS [1.067s]
> [INFO] Ambari Metrics Flume Sink . SUCCESS [0.562s]
> [INFO] Ambari Metrics Kafka Sink . SUCCESS [0.595s]
> [INFO] Ambari Metrics Storm Sink . SUCCESS [1.437s]
> [INFO] Ambari Metrics Collector .. SUCCESS [6.724s]
> [INFO] Ambari Metrics Monitor  SUCCESS [2.089s]
> [INFO] Ambari Metrics Grafana  SUCCESS [0.862s]
> [INFO] Ambari Metrics Assembly ... SUCCESS [1:17.652s]
> [INFO] Ambari Server . SUCCESS [2:31.754s]
> [INFO] Ambari Functional Tests ... SUCCESS [1.281s]
> [INFO] Ambari Agent .. SUCCESS [22.491s]
> [INFO] Ambari Client . SUCCESS [0.061s]
> [INFO] Ambari Python Client .. SUCCESS [1.008s]
> [INFO] Ambari Groovy Client .. SUCCESS [2.175s]
> [INFO] Ambari Shell .. SUCCESS [0.058s]
> [INFO] Ambari Python Shell ... SUCCESS [0.694s]
> [INFO] Ambari Groovy Shell ... SUCCESS [1.028s]
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 5:16.311s
> [INFO] Finished at: Wed Mar 23 15:30:45 PDT 2016
> [INFO] Final Memory: 261M/1167M
> [INFO] 
> 
> 
> ** 2. Manual tests **
> 
> Deployed a cluster with 3 nodes, registered a blueprint and template. Noticed 
> that the second agent now gets a **true** value for 
> **isConfigStale(clusterName, hostName, timestamp)**, allowing it to get the 
> recovery configuration.
> 
> ** 3. Unit tests **
> 
> 
> ---
>  T E S T S
> 

Re: Review Request 45301: History server start failed

2016-03-24 Thread Vitalyi Brodetskyi

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


Ship it!




Ship It!

- Vitalyi Brodetskyi


On Березень 24, 2016, 6:10 після полудня, Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45301/
> ---
> 
> (Updated Березень 24, 2016, 6:10 після полудня)
> 
> 
> Review request for Ambari and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-15565
> https://issues.apache.org/jira/browse/AMBARI-15565
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> `stack_version` was not replaced in the destination file path.
> 
> 
> 
> 2016-03-24 15:31:57,839 - Source file: 
> /usr/hdp/2.4.2.0-48/slider/lib/slider.tar.gz , Dest file in HDFS: 
> /hdp/apps/{{stack_version}}/slider/slider.tar.gz
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/tarball_map.json 
> 98b6c69 
> 
> Diff: https://reviews.apache.org/r/45301/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Review Request 45297: AMBARI-15549: Delete service - Unable to delete a service even when it's host components are in a removable state.

2016-03-24 Thread Nahappan Somasundaram

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

Review request for Ambari, Jaimin Jetly, Sumit Mohanty, and Sid Wagle.


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


Repository: ambari


Description
---

AMBARI-15549: Delete service - Unable to delete a service even when it's host 
components are in a removable state.

** Issue **:

Unable to delete a service when all host components are in INSTALLED state but 
service component is in STARTED state.

** Fix **:
Use only the host components state to determine if a service is removable or 
not.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
 ed7659f 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
 0cc03b8 

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


Testing
---

** 1. mvn clean install  **

[INFO] 
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main ... SUCCESS [7.857s]
[INFO] Apache Ambari Project POM . SUCCESS [0.036s]
[INFO] Ambari Web  SUCCESS [24.995s]
[INFO] Ambari Views .. SUCCESS [1.121s]
[INFO] Ambari Admin View . SUCCESS [6.780s]
[INFO] ambari-metrics  SUCCESS [0.348s]
[INFO] Ambari Metrics Common . SUCCESS [0.467s]
[INFO] Ambari Metrics Hadoop Sink  SUCCESS [1.042s]
[INFO] Ambari Metrics Flume Sink . SUCCESS [0.552s]
[INFO] Ambari Metrics Kafka Sink . SUCCESS [0.615s]
[INFO] Ambari Metrics Storm Sink . SUCCESS [1.552s]
[INFO] Ambari Metrics Collector .. SUCCESS [6.269s]
[INFO] Ambari Metrics Monitor  SUCCESS [2.093s]
[INFO] Ambari Metrics Grafana  SUCCESS [1.025s]
[INFO] Ambari Metrics Assembly ... SUCCESS [1:18.756s]
[INFO] Ambari Server . SUCCESS [2:32.742s]
[INFO] Ambari Functional Tests ... SUCCESS [2.584s]
[INFO] Ambari Agent .. SUCCESS [23.745s]
[INFO] Ambari Client . SUCCESS [0.062s]
[INFO] Ambari Python Client .. SUCCESS [1.103s]
[INFO] Ambari Groovy Client .. SUCCESS [2.176s]
[INFO] Ambari Shell .. SUCCESS [0.046s]
[INFO] Ambari Python Shell ... SUCCESS [0.702s]
[INFO] Ambari Groovy Shell ... SUCCESS [0.988s]
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 5:19.603s
[INFO] Finished at: Thu Mar 24 09:56:01 PDT 2016
[INFO] Final Memory: 262M/1193M
[INFO] 

** 2. mvn test -DskipPythonTests -Dtest=ServiceResourceProviderTest **

---
 T E S T S
---
Picked up _JAVA_OPTIONS: -Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true
Running org.apache.ambari.server.controller.internal.ServiceResourceProviderTest
Tests run: 23, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.961 sec - in 
org.apache.ambari.server.controller.internal.ServiceResourceProviderTest

Results :

Tests run: 23, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 27.669s
[INFO] Finished at: Thu Mar 24 09:58:43 PDT 2016
[INFO] Final Memory: 55M/1015M
[INFO] 

** 3. Manual tests **

* Deployed a VM with AMBARI METRIC SERVICE - service component 
METRICS_COLLECTOR on two hosts.
* Set the state of the component on each host to INSTALLED and the state of the 
service component to STARTED.
* Deletion of AMS was successful


Thanks,

Nahappan Somasundaram



Review Request 45301: History server start failed

2016-03-24 Thread Andrew Onischuk

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

Review request for Ambari and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

`stack_version` was not replaced in the destination file path.



2016-03-24 15:31:57,839 - Source file: 
/usr/hdp/2.4.2.0-48/slider/lib/slider.tar.gz , Dest file in HDFS: 
/hdp/apps/{{stack_version}}/slider/slider.tar.gz


Diffs
-

  ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/tarball_map.json 
98b6c69 

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


Testing
---

mvn clean test


Thanks,

Andrew Onischuk



Re: Review Request 45295: AMBARI-15547: User names in the List view of Roles are displayed with URI encoding

2016-03-24 Thread Richard Zang

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


Ship it!




Ship It!

- Richard Zang


On March 24, 2016, 4:32 p.m., Keta Patel wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45295/
> ---
> 
> (Updated March 24, 2016, 4:32 p.m.)
> 
> 
> Review request for Ambari, Di Li, Jaimin Jetly, and Richard Zang.
> 
> 
> Bugs: AMBARI-15547
> https://issues.apache.org/jira/browse/AMBARI-15547
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Under the List view of Roles, the name of Users with special characters, like 
> '@', are displayed with URI encoding. (please see attachment "names with URI 
> encoding.tiff" on Jira)
> The names should be displayed without any encoding.
> 
> 
> Diffs
> -
> 
>   
> ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
>  656425b 
> 
> Diff: https://reviews.apache.org/r/45295/diff/
> 
> 
> Testing
> ---
> 
> The fix for this issue is to replace the displayed name with the correct name 
> attribute, which is not URI encoded. This attribute is already present in the 
> User's object.
> The attachment "names with No URI encoding.tiff" shows the corrected User 
> names.
> 
> TEST:
> Since the change is in html file, I couldn't write a test cases for it.
> But the UI shows the changes in the User's name in the List view of Roles as 
> seen in attachment "names with No URI encoding.tiff" on the Jira.
> 
> Ambari-Web tests (orginal):
>   24689 tests complete (28 seconds)
>   145 tests pending
> 
> Ambari-Web tests (after fix):
>   24689 tests complete (27 seconds)
>   145 tests pending
> 
> 
> Thanks,
> 
> Keta Patel
> 
>



Re: Review Request 45254: Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ service

2016-03-24 Thread Juanjo Marron

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

(Updated March 24, 2016, 6:22 p.m.)


Review request for Ambari, Alejandro Fernandez and Jayush Luniya.


Changes
---

Solved last review comments:
- parameterize get_stack_to_component()
- Remove unused imports


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


Repository: ambari


Description
---

Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ service


Diffs (updated)
-

  
ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/params_linux.py
 0165c0b 
  
ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/pre_upgrade.py
 1faedf9 
  
ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/service_check.py
 c0c66af 
  
ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez_client.py
 e770d9b 

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


Testing
---

TEZ fresh installation


Thanks,

Juanjo  Marron



Re: Review Request 45254: Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ service

2016-03-24 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On March 24, 2016, 6:22 p.m., Juanjo  Marron wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45254/
> ---
> 
> (Updated March 24, 2016, 6:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jayush Luniya.
> 
> 
> Bugs: AMBARI-15137
> https://issues.apache.org/jira/browse/AMBARI-15137
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ 
> service
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/params_linux.py
>  0165c0b 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/pre_upgrade.py
>  1faedf9 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/service_check.py
>  c0c66af 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez_client.py
>  e770d9b 
> 
> Diff: https://reviews.apache.org/r/45254/diff/
> 
> 
> Testing
> ---
> 
> TEZ fresh installation
> 
> 
> Thanks,
> 
> Juanjo  Marron
> 
>



Re: Review Request 45284: Ambari LDAP integration cannot handle LDAP directories with multiple entries for the same user

2016-03-24 Thread Robert Levas


> On March 24, 2016, 12:52 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthentication.java,
> >  line 39
> > 
> >
> > Is there any chance that this will be `null`? There seem to be a lot of 
> > internal calls that will throw an NPE if this is `null`.
> > 
> > See `getPrincipalOverride()`
> 
> Sebastian Toader wrote:
> if authentication is null than that's a critical error that we can not 
> recover from. The authetication object is created by the spring security 
> framework (Basic authentication). If this is null we should fail fast.

Thanks for the clarification. Dropping the issue.


- Robert


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


On March 24, 2016, 9:04 a.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45284/
> ---
> 
> (Updated March 24, 2016, 9:04 a.m.)
> 
> 
> Review request for Ambari, Andrii Tkach, Dmitro Lisnichenko, Myroslav 
> Papirkovskyy, Oliver Szabo, Robert Levas, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15554
> https://issues.apache.org/jira/browse/AMBARI-15554
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problem:
> In case LDAP set up with multiple Domains which are joined into a Forrest 
> with trusts between the different Domains users may appear in different 
> locations in LDAP.
> Since users who wants to access Ambari can be in any domain Ambari has to 
> search the whole forrest, and as the users appearing in multiple domains are 
> identical Ambari cannot filter out all but one of the user entries.
> 
> Solution:
> 1.If the LDAP search upon login to Ambari leads to multiple match user match 
> due to the user appears in multiple domains show an error message to user 
> prompting for providing domain as well to log-in. (e.g. Login Failed: Please 
> append your domain to your username and try again. Example: username@domain)
> 
> 2. When user provides domain information at login as well Ambari looks up the 
> user in LDAP using different filter which is configurable. If this 
> configuration is not set Ambari defaults to filter by userPrincipalName
> 
> 3. A map of login name (login alias) to ambari user name is stored in the 
> session so as later whenever is needed the login name can be resolved to 
> ambari user name (user name stored in ambari database).
> 
> 4. User related rest API calls includes user name in the URL. There is a 
> filter set up for these resolve the user name in the URL to ambari user name 
> if needed.
> 
> 
> Diffs
> -
> 
>   ambari-server/pom.xml 1e44517 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/UserNameOverrideFilter.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  bf18325 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  076f850 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthentication.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java
>  20cf2fd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthoritiesPopulator.java
>  fc7f73a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticator.java
>  ed68c01 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapUtils.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AuthorizationHelper.java
>  b136182 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/DuplicateLdapUserFoundAuthenticationException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/LdapServerProperties.java
>  8eeaf35 
>   ambari-server/src/main/resources/webapp/WEB-INF/spring-security.xml 3bbc785 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/UserNameOverrideFilterTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  3ecb5aa 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java
>  PRE-CREATION 
>   
> 

Re: Review Request 45289: RBAC based user access to view instances are not honoured

2016-03-24 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On March 24, 2016, 2:59 p.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45289/
> ---
> 
> (Updated March 24, 2016, 2:59 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Oliver Szabo, and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-15543
> https://issues.apache.org/jira/browse/AMBARI-15543
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problem:
> 1. Create a cluster 
> 2. Create some view instances in amber
> 3. Create a local non-admin ambari user
> 4. Grant the newly created user access to one of the view instances
> 
> Log-in with the non-admin user. The user should only see the view instances 
> it has permission instead of all view instances.
> 
> This seems to have been introduced by 
> https://issues.apache.org/jira/browse/AMBARI-14194
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AuthorizationHelper.java
>  b136182 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
>  62f719d 
> 
> Diff: https://reviews.apache.org/r/45289/diff/
> 
> 
> Testing
> ---
> 
> Running 
> org.apache.ambari.server.security.authorization.AuthorizationHelperTest
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.081 sec - 
> in org.apache.ambari.server.security.authorization.AuthorizationHelperTest
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Re: Review Request 45254: Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ service

2016-03-24 Thread Jayush Luniya


> On March 24, 2016, 6:59 p.m., Jayush Luniya wrote:
> > Ship It!

Committed to trunk


- Jayush


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


On March 24, 2016, 6:22 p.m., Juanjo  Marron wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45254/
> ---
> 
> (Updated March 24, 2016, 6:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jayush Luniya.
> 
> 
> Bugs: AMBARI-15137
> https://issues.apache.org/jira/browse/AMBARI-15137
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ 
> service
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/params_linux.py
>  0165c0b 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/pre_upgrade.py
>  1faedf9 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/service_check.py
>  c0c66af 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez_client.py
>  e770d9b 
> 
> Diff: https://reviews.apache.org/r/45254/diff/
> 
> 
> Testing
> ---
> 
> TEZ fresh installation
> 
> 
> Thanks,
> 
> Juanjo  Marron
> 
>



Review Request 45306: ambari-server check-database has errors after upgrade from 170 to ambari 2.2.2.0 [service SLIDER]

2016-03-24 Thread Vitalyi Brodetskyi

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

Review request for Ambari, Dmytro Sen and Myroslav Papirkovskyy.


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


Repository: ambari


Description
---

STR: Gateway: 172.22.74.38:8080
1)Deploy old version 
2)Make Ambari only Upgrade 
4)'ambari-server check-database'
2016-03-23 10:22:31,276 INFO - *** Check database 
started ***
2016-03-23 10:22:56,229 ERROR - Required config(s): slider-client is(are) not 
available for service SLIDER with service config version 1 in cluster cl1
2016-03-23 10:22:56,469 INFO - *** Check database 
completed ***


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
 7601e4c 
  ambari-server/src/main/python/ambari_server/checkDatabase.py 2deca0a 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java
 17d7e4e 

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


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi



Re: Review Request 45306: ambari-server check-database has errors after upgrade from 170 to ambari 2.2.2.0 [service SLIDER]

2016-03-24 Thread Sumit Mohanty

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


Ship it!




Fix the minor type and ship.

- Sumit Mohanty


On March 24, 2016, 7:09 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45306/
> ---
> 
> (Updated March 24, 2016, 7:09 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen and Myroslav Papirkovskyy.
> 
> 
> Bugs: AMBARI-15568
> https://issues.apache.org/jira/browse/AMBARI-15568
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR: Gateway: 172.22.74.38:8080
> 1)Deploy old version 
> 2)Make Ambari only Upgrade 
> 4)'ambari-server check-database'
> 2016-03-23 10:22:31,276 INFO - *** Check database 
> started ***
> 2016-03-23 10:22:56,229 ERROR - Required config(s): slider-client is(are) not 
> available for service SLIDER with service config version 1 in cluster cl1
> 2016-03-23 10:22:56,469 INFO - *** Check database 
> completed ***
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
>  7601e4c 
>   ambari-server/src/main/python/ambari_server/checkDatabase.py 2deca0a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java
>  17d7e4e 
> 
> Diff: https://reviews.apache.org/r/45306/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 45306: ambari-server check-database has errors after upgrade from 170 to ambari 2.2.2.0 [service SLIDER]

2016-03-24 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On March 24, 2016, 7:54 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45306/
> ---
> 
> (Updated March 24, 2016, 7:54 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen and Myroslav Papirkovskyy.
> 
> 
> Bugs: AMBARI-15568
> https://issues.apache.org/jira/browse/AMBARI-15568
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR: Gateway: 172.22.74.38:8080
> 1)Deploy old version 
> 2)Make Ambari only Upgrade 
> 4)'ambari-server check-database'
> 2016-03-23 10:22:31,276 INFO - *** Check database 
> started ***
> 2016-03-23 10:22:56,229 ERROR - Required config(s): slider-client is(are) not 
> available for service SLIDER with service config version 1 in cluster cl1
> 2016-03-23 10:22:56,469 INFO - *** Check database 
> completed ***
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
>  7601e4c 
>   ambari-server/src/main/python/ambari_server/checkDatabase.py 2deca0a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java
>  17d7e4e 
> 
> Diff: https://reviews.apache.org/r/45306/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 44724: AMBARI-12906: Alert notifications are created even if credential fields are left empty

2016-03-24 Thread Richard Zang

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


Ship it!




Ship It!

- Richard Zang


On March 20, 2016, 5:50 a.m., Qin Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44724/
> ---
> 
> (Updated March 20, 2016, 5:50 a.m.)
> 
> 
> Review request for Ambari, Di Li and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-12906
> https://issues.apache.org/jira/browse/AMBARI-12906
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> User should not be allowed to save changes if the credential fields are left 
> empty when creating new Alert Notifications.
> 
> Steps to reproduce:
> 1. Create New Alert Notification
> 2. Enter Name = test
> 3. Tick the checkbox for 'Use Authentication'
> 4. Keep username and password empty
> 5. Click on Save
> 6. New alert notifications is created.
> 
> 
> Diffs
> -
> 
>   
> ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
>  79e524e 
>   ambari-web/app/messages.js 421143a 
>   ambari-web/app/templates/main/alerts/create_alert_notification.hbs 0a83f63 
>   ambari-web/app/utils/validator.js 6426163 
>   
> ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
>  f16bf4d 
> 
> Diff: https://reviews.apache.org/r/44724/diff/
> 
> 
> Testing
> ---
> 
> FIX:
> 1. With the fix, user won't be allowd to to save changes if Email is selected 
> for alert notification and Use authentication is chosen and the credential 
> fields are left empty when creating new Alert Notifications or editing 
> existing Alert Notifications.
> 2. The error message "Username is required" will be shown if the Username is 
> empty.
> 3. The error message "Password is required" will be shown if the password is 
> empty. 
> The fix here uses a similar approach that was used for the Password 
> Confirmation error handling.
> 
> TESTS:
> The fix has been tested with HDP UI.
> manage_alert_notifications_controller_test.js has also been modified to test 
> changes.
> 
> The following is the result of running ambari-web tests:
> 
> 24957 tests complete (31 seconds)
> 145 tests pending
> 
> 
> Thanks,
> 
> Qin Liu
> 
>



Re: Review Request 45306: ambari-server check-database has errors after upgrade from 170 to ambari 2.2.2.0 [service SLIDER]

2016-03-24 Thread Vitalyi Brodetskyi

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

(Updated Березень 24, 2016, 7:54 після полудня)


Review request for Ambari, Dmytro Sen and Myroslav Papirkovskyy.


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


Repository: ambari


Description
---

STR: Gateway: 172.22.74.38:8080
1)Deploy old version 
2)Make Ambari only Upgrade 
4)'ambari-server check-database'
2016-03-23 10:22:31,276 INFO - *** Check database 
started ***
2016-03-23 10:22:56,229 ERROR - Required config(s): slider-client is(are) not 
available for service SLIDER with service config version 1 in cluster cl1
2016-03-23 10:22:56,469 INFO - *** Check database 
completed ***


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
 7601e4c 
  ambari-server/src/main/python/ambari_server/checkDatabase.py 2deca0a 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java
 17d7e4e 

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


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi



Re: Review Request 45254: Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ service

2016-03-24 Thread Juanjo Marron


> On March 24, 2016, 6:59 p.m., Jayush Luniya wrote:
> > Ship It!
> 
> Jayush Luniya wrote:
> Committed to trunk

Thanks for the review and for commiting!


- Juanjo


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


On March 24, 2016, 6:22 p.m., Juanjo  Marron wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45254/
> ---
> 
> (Updated March 24, 2016, 6:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jayush Luniya.
> 
> 
> Bugs: AMBARI-15137
> https://issues.apache.org/jira/browse/AMBARI-15137
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ 
> service
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/params_linux.py
>  0165c0b 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/pre_upgrade.py
>  1faedf9 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/service_check.py
>  c0c66af 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez_client.py
>  e770d9b 
> 
> Diff: https://reviews.apache.org/r/45254/diff/
> 
> 
> Testing
> ---
> 
> TEZ fresh installation
> 
> 
> Thanks,
> 
> Juanjo  Marron
> 
>



Re: Review Request 45254: Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ service

2016-03-24 Thread Jayush Luniya

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


Ship it!




Ship It!

- Jayush Luniya


On March 24, 2016, 6:22 p.m., Juanjo  Marron wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45254/
> ---
> 
> (Updated March 24, 2016, 6:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jayush Luniya.
> 
> 
> Bugs: AMBARI-15137
> https://issues.apache.org/jira/browse/AMBARI-15137
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ 
> service
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/params_linux.py
>  0165c0b 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/pre_upgrade.py
>  1faedf9 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/service_check.py
>  c0c66af 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez_client.py
>  e770d9b 
> 
> Diff: https://reviews.apache.org/r/45254/diff/
> 
> 
> Testing
> ---
> 
> TEZ fresh installation
> 
> 
> Thanks,
> 
> Juanjo  Marron
> 
>



Re: Review Request 45306: ambari-server check-database has errors after upgrade from 170 to ambari 2.2.2.0 [service SLIDER]

2016-03-24 Thread Alejandro Fernandez

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




ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
 (line 199)


Add a comment as to why this is needed


- Alejandro Fernandez


On March 24, 2016, 7:35 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45306/
> ---
> 
> (Updated March 24, 2016, 7:35 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen and Myroslav Papirkovskyy.
> 
> 
> Bugs: AMBARI-15568
> https://issues.apache.org/jira/browse/AMBARI-15568
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR: Gateway: 172.22.74.38:8080
> 1)Deploy old version 
> 2)Make Ambari only Upgrade 
> 4)'ambari-server check-database'
> 2016-03-23 10:22:31,276 INFO - *** Check database 
> started ***
> 2016-03-23 10:22:56,229 ERROR - Required config(s): slider-client is(are) not 
> available for service SLIDER with service config version 1 in cluster cl1
> 2016-03-23 10:22:56,469 INFO - *** Check database 
> completed ***
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
>  7601e4c 
>   ambari-server/src/main/python/ambari_server/checkDatabase.py 2deca0a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog222Test.java
>  17d7e4e 
> 
> Diff: https://reviews.apache.org/r/45306/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 45254: Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ service

2016-03-24 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On March 24, 2016, 6:22 p.m., Juanjo  Marron wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45254/
> ---
> 
> (Updated March 24, 2016, 6:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jayush Luniya.
> 
> 
> Bugs: AMBARI-15137
> https://issues.apache.org/jira/browse/AMBARI-15137
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Apply the stack featurization prototype detailed on AMBARI-13364 to TEZ 
> service
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/params_linux.py
>  0165c0b 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/pre_upgrade.py
>  1faedf9 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/service_check.py
>  c0c66af 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez_client.py
>  e770d9b 
> 
> Diff: https://reviews.apache.org/r/45254/diff/
> 
> 
> Testing
> ---
> 
> TEZ fresh installation
> 
> 
> Thanks,
> 
> Juanjo  Marron
> 
>



Re: Review Request 45322: AMBARI-15571 : Disable YARN Container metrics from AMS

2016-03-24 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On March 24, 2016, 10:58 p.m., Aravindan Vijayan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45322/
> ---
> 
> (Updated March 24, 2016, 10:58 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-15571
> https://issues.apache.org/jira/browse/AMBARI-15571
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Disable YARN Container metrics from AMS
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
>  3c9c5c5 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/templates/hadoop-metrics2.properties.j2
>  fcd9b23 
> 
> Diff: https://reviews.apache.org/r/45322/diff/
> 
> 
> Testing
> ---
> 
> Manually tested.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>



Re: Review Request 44725: After exporting blueprint from ranger enabled cluster ranger.service.https.attrib.keystore.pass is exported

2016-03-24 Thread Amruta Borkar


> On March 23, 2016, 12:31 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java,
> >  line 2723
> > 
> >
> > This is a great idea. I am suprised we haven't done this already.  
> > However, I don't see where this new filter class is being used, so how was 
> > the issue in the description addressed?
> 
> Robert Nettleton wrote:
> Hi Rob, the Blueprint export filters have been around for a while, check 
> out:
> 
> 
> org.apache.ambari.server.controller.internal.BlueprintConfigurationProcessor#shouldPropertyBeExcludedForBlueprintExport
> 
> Basically, this method iterates over the registered filters to determine 
> if a property should be excluded. 
> 
> Thanks.
> 
> Robert Levas wrote:
> Thnaks for the clarification Bob.  Droppng my issue.
> 
> Amruta Borkar wrote:
> Thank you for the review. I don't have the commit rights on trunk. Could 
> you please help push this change?
> 
> Robert Levas wrote:
> I'll commit this.

Thank you Robert, could you please update when committed. Thanks.


- Amruta


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


On March 23, 2016, 1:40 a.m., Amruta Borkar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44725/
> ---
> 
> (Updated March 23, 2016, 1:40 a.m.)
> 
> 
> Review request for Ambari, Robert Levas and Robert Nettleton.
> 
> 
> Bugs: AMBARI-15338
> https://issues.apache.org/jira/browse/AMBARI-15338
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> After exporting blueprint from ranger enabled cluster 
> ranger.service.https.attrib.keystore.pass is exported.
> Which needs to be removed before using the same blueprint to create another 
> cluster
> Error Show when used same blueprint:
> { "status" : 400, "message" : "Blueprint configuration validation failed: 
> Secret references are not allowed in blueprints, replace following properties 
> with real passwords:\n Config:ranger-admin-site 
> Property:ranger.service.https.attrib.keystore.pass\n" }
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
>  4230862 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
>  0f62b2c 
> 
> Diff: https://reviews.apache.org/r/44725/diff/
> 
> 
> Testing
> ---
> 
> Modified test cases to test for if the properties that end with "pass" are 
> getting filtered. Other properties which have 'pass' else where in the name 
> will not get filtered.
> 
> 
> Thanks,
> 
> Amruta Borkar
> 
>



Review Request 45322: AMBARI-15571 : Disable YARN Container metrics from AMS

2016-03-24 Thread Aravindan Vijayan

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

Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.


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


Repository: ambari


Description
---

Disable YARN Container metrics from AMS


Diffs
-

  
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/templates/hadoop-metrics2.properties.j2
 fcd9b23 

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


Testing
---

Manually tested.


Thanks,

Aravindan Vijayan



Re: Review Request 45321: Ambari calculates stack downgrade as ABORTED under incorrect conditions. UI shows 'Downgrade paused' and button to resume downgrade even when progress is happening

2016-03-24 Thread Alejandro Fernandez

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

(Updated March 24, 2016, 10:28 p.m.)


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


Summary (updated)
-

Ambari calculates stack downgrade as ABORTED under incorrect conditions. UI 
shows 'Downgrade paused' and button to resume downgrade even when progress is 
happening


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


Repository: ambari


Description
---

*STR:*
1. Install Ambari 2.2.0
2. Upgrade stack from HDP-2.2.4 to HDP-2.3.2
3. At finalize step, choose downgrade option
4. Introduce failures in some clients such as Zookeeper and Yarn.

In this case, the status of some tasks are marked as ABORTED.
This causes the overall status of the Downgrade to be ABORTED, and hence the UI 
shows an incorrect message and button.
Technically, the Downgrade is still progressing, yet the UI shows "Downgrade 
paused" and a button to "Resume Downgrade"

This means that the calculations of the stages is incorrect.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
 1d8df9b 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 d43daca 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
 fd866a1 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CalculatedStatusTest.java
 8d80fa6 

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


Testing
---

Verified on live cluster and ran unit tests in CalculateStatusTest.java


Thanks,

Alejandro Fernandez



Review Request 45321: Ambari calculates stack downgrade as ABORTED under incorrect conditions. UI shows 'Downgrade paused' and button to resume downgrade even when progress is hapenning

2016-03-24 Thread Alejandro Fernandez

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

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


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


Repository: ambari


Description
---

*STR:*
1. Install Ambari 2.2.0
2. Upgrade stack from HDP-2.2.4 to HDP-2.3.2
3. At finalize step, choose downgrade option
4. Introduce failures in some clients such as Zookeeper and Yarn.

In this case, the status of some tasks are marked as ABORTED.
This causes the overall status of the Downgrade to be ABORTED, and hence the UI 
shows an incorrect message and button.
Technically, the Downgrade is still progressing, yet the UI shows "Downgrade 
paused" and a button to "Resume Downgrade"

This means that the calculations of the stages is incorrect.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
 1d8df9b 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 d43daca 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
 fd866a1 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CalculatedStatusTest.java
 8d80fa6 

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


Testing
---

Verified on live cluster and ran unit tests in CalculateStatusTest.java


Thanks,

Alejandro Fernandez



Re: Review Request 45321: Ambari calculates stack downgrade as ABORTED under incorrect conditions. UI shows 'Downgrade paused' and button to resume downgrade even when progress is hapenning

2016-03-24 Thread Alejandro Fernandez

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




ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
 (line 382)


The old logic was concise but harder to read.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
 (line 402)


This was the bug fix. ABORTED only if there are no other active tasks.

I created a Jira for the UI to switch to the "suspended" property to 
determine if an RU/EU is paused.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 (line 537)


Expose this property.


- Alejandro Fernandez


On March 24, 2016, 9:59 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45321/
> ---
> 
> (Updated March 24, 2016, 9:59 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-15569
> https://issues.apache.org/jira/browse/AMBARI-15569
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> *STR:*
> 1. Install Ambari 2.2.0
> 2. Upgrade stack from HDP-2.2.4 to HDP-2.3.2
> 3. At finalize step, choose downgrade option
> 4. Introduce failures in some clients such as Zookeeper and Yarn.
> 
> In this case, the status of some tasks are marked as ABORTED.
> This causes the overall status of the Downgrade to be ABORTED, and hence the 
> UI shows an incorrect message and button.
> Technically, the Downgrade is still progressing, yet the UI shows "Downgrade 
> paused" and a button to "Resume Downgrade"
> 
> This means that the calculations of the stages is incorrect.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
>  1d8df9b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  d43daca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
>  fd866a1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CalculatedStatusTest.java
>  8d80fa6 
> 
> Diff: https://reviews.apache.org/r/45321/diff/
> 
> 
> Testing
> ---
> 
> Verified on live cluster and ran unit tests in CalculateStatusTest.java
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Re: Review Request 45208: Cleanup LDAP sync process

2016-03-24 Thread Sebastian Toader

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




ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java
 (line 508)


Why not use regexp here? Regexp may just provide the functionallity and 
flexibilty needed here out of the box.


- Sebastian Toader


On March 23, 2016, 2:28 p.m., Oliver Szabo wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45208/
> ---
> 
> (Updated March 23, 2016, 2:28 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Robert Levas, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-15383
> https://issues.apache.org/jira/browse/AMBARI-15383
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Cleanup LDAP sync process:
> - speedup sync with "--all" (do not check nested groups recursively...ambari 
> gather all of the groups first, and it's enough to just process them 
> sequentially)
> - fixing issue: uppercase member attributes (in ambari.properties) don't work 
> well with the queries
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java
>  75df9cc 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
>  3ea 
> 
> Diff: https://reviews.apache.org/r/45208/diff/
> 
> 
> Testing
> ---
> 
> Testing done.
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 1:02:31.664s
> [INFO] Finished at: Wed Mar 23 13:45:38 CET 2016
> [INFO] Final Memory: 38M/607M
> [INFO] 
> 
> 
> 
> Thanks,
> 
> Oliver Szabo
> 
>



Re: Review Request 45253: AMBARI-15544: Creating multinode cluster using Blueprints fails.

2016-03-24 Thread Nate Cole

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


Ship it!





ambari-server/src/main/java/org/apache/ambari/server/agent/RecoveryConfigHelper.java
 (lines 150 - 152)


Is there a unit test that can be added to make sure we don't accidentally 
revert this fix somehow?


- Nate Cole


On March 23, 2016, 6:45 p.m., Nahappan Somasundaram wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45253/
> ---
> 
> (Updated March 23, 2016, 6:45 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, 
> Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-15544
> https://issues.apache.org/jira/browse/AMBARI-15544
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-15544: Creating multinode cluster using Blueprints fails.
> 
> ** Issue **:
> 
> This issue happens when there are multiple agents running before deployment 
> happens. During registration, there is no cluster, so the recovery 
> configuration is not obtained. Subsequently, when hosts become a part of a 
> cluster, agents attempt to get the recovery configuration during the 
> heartbeats. The first agent successfully gets the configuration because the 
> timestamp map is empty. When the next agent heartbeats, it checks to see if 
> the configuration is stale. While there is an entry for the cluster name in 
> the timestamp map created by the previous agent, there is no hostname entry 
> for the current agent which causes the timestamp returned for that hostname 
> to be null.
> 
> ** Fix **:
> 
> Check the returned Timestamp object for null before accessing it.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/RecoveryConfigHelper.java
>  dca4a9b9a32377a2d7d620d6f939e7250cc40590 
> 
> Diff: https://reviews.apache.org/r/45253/diff/
> 
> 
> Testing
> ---
> 
> ** 1. mvn clean install -DskipTests **
> 
> [INFO] 
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Ambari Main ... SUCCESS [5.199s]
> [INFO] Apache Ambari Project POM . SUCCESS [0.037s]
> [INFO] Ambari Web  SUCCESS [31.250s]
> [INFO] Ambari Views .. SUCCESS [1.140s]
> [INFO] Ambari Admin View . SUCCESS [5.628s]
> [INFO] ambari-metrics  SUCCESS [0.355s]
> [INFO] Ambari Metrics Common . SUCCESS [0.476s]
> [INFO] Ambari Metrics Hadoop Sink  SUCCESS [1.067s]
> [INFO] Ambari Metrics Flume Sink . SUCCESS [0.562s]
> [INFO] Ambari Metrics Kafka Sink . SUCCESS [0.595s]
> [INFO] Ambari Metrics Storm Sink . SUCCESS [1.437s]
> [INFO] Ambari Metrics Collector .. SUCCESS [6.724s]
> [INFO] Ambari Metrics Monitor  SUCCESS [2.089s]
> [INFO] Ambari Metrics Grafana  SUCCESS [0.862s]
> [INFO] Ambari Metrics Assembly ... SUCCESS [1:17.652s]
> [INFO] Ambari Server . SUCCESS [2:31.754s]
> [INFO] Ambari Functional Tests ... SUCCESS [1.281s]
> [INFO] Ambari Agent .. SUCCESS [22.491s]
> [INFO] Ambari Client . SUCCESS [0.061s]
> [INFO] Ambari Python Client .. SUCCESS [1.008s]
> [INFO] Ambari Groovy Client .. SUCCESS [2.175s]
> [INFO] Ambari Shell .. SUCCESS [0.058s]
> [INFO] Ambari Python Shell ... SUCCESS [0.694s]
> [INFO] Ambari Groovy Shell ... SUCCESS [1.028s]
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 5:16.311s
> [INFO] Finished at: Wed Mar 23 15:30:45 PDT 2016
> [INFO] Final Memory: 261M/1167M
> [INFO] 
> 
> 
> ** 2. Manual tests **
> 
> Deployed a cluster with 3 nodes, registered a blueprint and template. Noticed 
> that the second agent now gets a **true** value for 
> **isConfigStale(clusterName, hostName, timestamp)**, allowing it to get the 
> recovery configuration.
> 
> ** 3. Unit tests **
> 
> 
> 

Re: Review Request 45328: AMBARI-14451: Stack Featurize HDFS service

2016-03-24 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On March 24, 2016, 11:26 p.m., Juanjo  Marron wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45328/
> ---
> 
> (Updated March 24, 2016, 11:26 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jayush Luniya.
> 
> 
> Bugs: AMBARI-14451
> https://issues.apache.org/jira/browse/AMBARI-14451
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Featurize HDP specific logic from HDFS service
> 
> 
> Diffs
> -
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/constants.py
>  1d59d9d 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
>  d1343ec 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
>  98f20e7 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_ha_namenode_health.py
>  70b1970 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
>  3c9c5c5 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py
>  3cdfda9 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py
>  c5ae35e 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py
>  6f26b40 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode_upgrade.py
>  d598840 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
>  acd10e8 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/nfsgateway.py
>  c705fca 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
>  9fa3cd4 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
>  209ac91 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/snamenode.py
>  f96ac01 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
>  c626028 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
>  bb974f1 
> 
> Diff: https://reviews.apache.org/r/45328/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test -DskipSurefireTests
> 
> Found 1 error. It seems related to PXF and not to the patch:
> 
> Failed tests:
> ERROR: test_get_pxf_protocol_version 
> (test_alerts_api_status.TestAlertsApiStatus)
> --
> Traceback (most recent call last):
>   File "/home/jmarron/git/ambari/ambari-common/src/test/python/mock/mock.py", 
> line 1199, in patched
> return func(*args, **keywargs)
>   File 
> "/home/jmarron/git/ambari/ambari-server/src/test/python/stacks/2.3/PXF/test_alerts_api_status.py",
>  line 51, in test_get_pxf_protocol_version
> version = api_status._get_pxf_protocol_version()
> TypeError: _get_pxf_protocol_version() takes exactly 1 argument (0 given)
> 
> --
> Total run:928
> Total errors:1
> Total failures:0
> 
> 
> Thanks,
> 
> Juanjo  Marron
> 
>



Re: Review Request 45303: Update HAWQ default_hash_table_bucket_number property logic

2016-03-24 Thread bhuvnesh chaudhary

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




ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py (line 
693)


nice.


- bhuvnesh chaudhary


On March 24, 2016, 6:34 p.m., Alexander Denissov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45303/
> ---
> 
> (Updated March 24, 2016, 6:34 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, bhuvnesh chaudhary, Goutam 
> Tadi, Jayush Luniya, Lav Jain, Matt, Oleksandr Diachenko, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-15566
> https://issues.apache.org/jira/browse/AMBARI-15566
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Update HAWQ default_hash_table_bucket_number property logic
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
> 4635199 
>   ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py 
> 682e1c2 
> 
> Diff: https://reviews.apache.org/r/45303/diff/
> 
> 
> Testing
> ---
> 
> manual
> 
> --
> Ran 246 tests in 7.045s
> 
> OK
> --
> Total run:911
> Total errors:0
> Total failures:0
> 
> 
> Thanks,
> 
> Alexander Denissov
> 
>