You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2015/02/11 19:18:27 UTC
Review Request 30882: LDAP Sync: Port and Protocol hard coded
/usr/sbin/ambari-server.py
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30882/
-----------------------------------------------------------
Review request for Ambari, Jonathan Hurley and Nate Cole.
Bugs: AMBARI-9576
https://issues.apache.org/jira/browse/AMBARI-9576
Repository: ambari
Description
-------
PROBLEM: User is unable to ldap sync with ambari server and LDAP SSL configured.
It appears that /usr/sbin/ambari-server.py has the port of the api hard coded.
root@ml-ambari /var/log>ambari-server sync-ldap --all -v
Using python /usr/bin/python2.6
Syncing with LDAP...
INFO: about to run command: ps -p 54735
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
Enter Ambari Admin login: rayoung
Enter Ambari Admin password:
Syncing all.
Calling API /api/v1/ldap_sync_events : [{'Event': {'specs': [{'principal_type': 'users', 'sync_type': 'all'}, {'principal_type': 'groups', 'sync_type': 'all'}]}}]
ERROR: Exiting with exit code 1.
REASON: Sync event creation failed. Error details: <urlopen error [Errno 111] Connection refused>
It can be worked around by manually editing ...
SERVER_API_PROTOCOL = 'http'
SERVER_API_PORT = '8080'
in the python script or by turning off SSL and restarting Ambari.
Also, fix issue where --users sync mode was broken during recent refactoring and minor command line help text.
Diffs
-----
ambari-server/src/main/python/ambari-server.py 3c4c9c7
ambari-server/src/main/python/ambari_server/serverConfiguration.py aeb2b6c
ambari-server/src/main/python/ambari_server/setupHttps.py 6ec9978
ambari-server/src/main/python/ambari_server/setupSecurity.py 8dcab56
ambari-server/src/test/python/TestAmbariServer.py 825991b
Diff: https://reviews.apache.org/r/30882/diff/
Testing
-------
Manual testing.
New unit tests added.
Waiting for clean trunk build.
Thanks,
Tom Beerbower
Re: Review Request 30882: LDAP Sync: Port and Protocol hard coded
/usr/sbin/ambari-server.py
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30882/#review71997
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On Feb. 11, 2015, 1:18 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30882/
> -----------------------------------------------------------
>
> (Updated Feb. 11, 2015, 1:18 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-9576
> https://issues.apache.org/jira/browse/AMBARI-9576
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PROBLEM: User is unable to ldap sync with ambari server and LDAP SSL configured.
>
> It appears that /usr/sbin/ambari-server.py has the port of the api hard coded.
>
>
> root@ml-ambari /var/log>ambari-server sync-ldap --all -v
> Using python /usr/bin/python2.6
> Syncing with LDAP...
> INFO: about to run command: ps -p 54735
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Enter Ambari Admin login: rayoung
> Enter Ambari Admin password:
> Syncing all.
> Calling API /api/v1/ldap_sync_events : [{'Event': {'specs': [{'principal_type': 'users', 'sync_type': 'all'}, {'principal_type': 'groups', 'sync_type': 'all'}]}}]
> ERROR: Exiting with exit code 1.
> REASON: Sync event creation failed. Error details: <urlopen error [Errno 111] Connection refused>
>
>
> It can be worked around by manually editing ...
>
> SERVER_API_PROTOCOL = 'http'
> SERVER_API_PORT = '8080'
>
> in the python script or by turning off SSL and restarting Ambari.
>
> Also, fix issue where --users sync mode was broken during recent refactoring and minor command line help text.
>
>
> Diffs
> -----
>
> ambari-server/src/main/python/ambari-server.py 3c4c9c7
> ambari-server/src/main/python/ambari_server/serverConfiguration.py aeb2b6c
> ambari-server/src/main/python/ambari_server/setupHttps.py 6ec9978
> ambari-server/src/main/python/ambari_server/setupSecurity.py 8dcab56
> ambari-server/src/test/python/TestAmbariServer.py 825991b
>
> Diff: https://reviews.apache.org/r/30882/diff/
>
>
> Testing
> -------
>
> Manual testing.
> New unit tests added.
>
> Waiting for clean trunk build.
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 30882: LDAP Sync: Port and Protocol hard coded
/usr/sbin/ambari-server.py
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30882/#review72108
-----------------------------------------------------------
Ship it!
Ship It!
- Jonathan Hurley
On Feb. 11, 2015, 2:14 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30882/
> -----------------------------------------------------------
>
> (Updated Feb. 11, 2015, 2:14 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-9576
> https://issues.apache.org/jira/browse/AMBARI-9576
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PROBLEM: User is unable to ldap sync with ambari server and LDAP SSL configured.
>
> It appears that /usr/sbin/ambari-server.py has the port of the api hard coded.
>
>
> root@ml-ambari /var/log>ambari-server sync-ldap --all -v
> Using python /usr/bin/python2.6
> Syncing with LDAP...
> INFO: about to run command: ps -p 54735
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Enter Ambari Admin login: rayoung
> Enter Ambari Admin password:
> Syncing all.
> Calling API /api/v1/ldap_sync_events : [{'Event': {'specs': [{'principal_type': 'users', 'sync_type': 'all'}, {'principal_type': 'groups', 'sync_type': 'all'}]}}]
> ERROR: Exiting with exit code 1.
> REASON: Sync event creation failed. Error details: <urlopen error [Errno 111] Connection refused>
>
>
> It can be worked around by manually editing ...
>
> SERVER_API_PROTOCOL = 'http'
> SERVER_API_PORT = '8080'
>
> in the python script or by turning off SSL and restarting Ambari.
>
> Also, fix issue where --users sync mode was broken during recent refactoring and minor command line help text.
>
>
> Diffs
> -----
>
> ambari-server/src/main/python/ambari-server.py 3c4c9c7
> ambari-server/src/main/python/ambari_server/serverConfiguration.py aeb2b6c
> ambari-server/src/main/python/ambari_server/setupHttps.py 6ec9978
> ambari-server/src/main/python/ambari_server/setupSecurity.py 8dcab56
> ambari-server/src/test/python/TestAmbariServer.py 825991b
>
> Diff: https://reviews.apache.org/r/30882/diff/
>
>
> Testing
> -------
>
> Manual testing.
> New unit tests added.
>
> Waiting for clean trunk build.
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 30882: LDAP Sync: Port and Protocol hard coded
/usr/sbin/ambari-server.py
Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30882/
-----------------------------------------------------------
(Updated Feb. 11, 2015, 7:14 p.m.)
Review request for Ambari, Jonathan Hurley and Nate Cole.
Changes
-------
Updated diff.
Bugs: AMBARI-9576
https://issues.apache.org/jira/browse/AMBARI-9576
Repository: ambari
Description
-------
PROBLEM: User is unable to ldap sync with ambari server and LDAP SSL configured.
It appears that /usr/sbin/ambari-server.py has the port of the api hard coded.
root@ml-ambari /var/log>ambari-server sync-ldap --all -v
Using python /usr/bin/python2.6
Syncing with LDAP...
INFO: about to run command: ps -p 54735
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
Enter Ambari Admin login: rayoung
Enter Ambari Admin password:
Syncing all.
Calling API /api/v1/ldap_sync_events : [{'Event': {'specs': [{'principal_type': 'users', 'sync_type': 'all'}, {'principal_type': 'groups', 'sync_type': 'all'}]}}]
ERROR: Exiting with exit code 1.
REASON: Sync event creation failed. Error details: <urlopen error [Errno 111] Connection refused>
It can be worked around by manually editing ...
SERVER_API_PROTOCOL = 'http'
SERVER_API_PORT = '8080'
in the python script or by turning off SSL and restarting Ambari.
Also, fix issue where --users sync mode was broken during recent refactoring and minor command line help text.
Diffs (updated)
-----
ambari-server/src/main/python/ambari-server.py 3c4c9c7
ambari-server/src/main/python/ambari_server/serverConfiguration.py aeb2b6c
ambari-server/src/main/python/ambari_server/setupHttps.py 6ec9978
ambari-server/src/main/python/ambari_server/setupSecurity.py 8dcab56
ambari-server/src/test/python/TestAmbariServer.py 825991b
Diff: https://reviews.apache.org/r/30882/diff/
Testing
-------
Manual testing.
New unit tests added.
Waiting for clean trunk build.
Thanks,
Tom Beerbower
Re: Review Request 30882: LDAP Sync: Port and Protocol hard coded
/usr/sbin/ambari-server.py
Posted by Tom Beerbower <tb...@hortonworks.com>.
> On Feb. 11, 2015, 6:40 p.m., Jonathan Hurley wrote:
> >
Thanks for the review!
- Tom
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30882/#review71992
-----------------------------------------------------------
On Feb. 11, 2015, 7:14 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30882/
> -----------------------------------------------------------
>
> (Updated Feb. 11, 2015, 7:14 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-9576
> https://issues.apache.org/jira/browse/AMBARI-9576
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PROBLEM: User is unable to ldap sync with ambari server and LDAP SSL configured.
>
> It appears that /usr/sbin/ambari-server.py has the port of the api hard coded.
>
>
> root@ml-ambari /var/log>ambari-server sync-ldap --all -v
> Using python /usr/bin/python2.6
> Syncing with LDAP...
> INFO: about to run command: ps -p 54735
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Enter Ambari Admin login: rayoung
> Enter Ambari Admin password:
> Syncing all.
> Calling API /api/v1/ldap_sync_events : [{'Event': {'specs': [{'principal_type': 'users', 'sync_type': 'all'}, {'principal_type': 'groups', 'sync_type': 'all'}]}}]
> ERROR: Exiting with exit code 1.
> REASON: Sync event creation failed. Error details: <urlopen error [Errno 111] Connection refused>
>
>
> It can be worked around by manually editing ...
>
> SERVER_API_PROTOCOL = 'http'
> SERVER_API_PORT = '8080'
>
> in the python script or by turning off SSL and restarting Ambari.
>
> Also, fix issue where --users sync mode was broken during recent refactoring and minor command line help text.
>
>
> Diffs
> -----
>
> ambari-server/src/main/python/ambari-server.py 3c4c9c7
> ambari-server/src/main/python/ambari_server/serverConfiguration.py aeb2b6c
> ambari-server/src/main/python/ambari_server/setupHttps.py 6ec9978
> ambari-server/src/main/python/ambari_server/setupSecurity.py 8dcab56
> ambari-server/src/test/python/TestAmbariServer.py 825991b
>
> Diff: https://reviews.apache.org/r/30882/diff/
>
>
> Testing
> -------
>
> Manual testing.
> New unit tests added.
>
> Waiting for clean trunk build.
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 30882: LDAP Sync: Port and Protocol hard coded
/usr/sbin/ambari-server.py
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30882/#review71992
-----------------------------------------------------------
Ship it!
ambari-server/src/main/python/ambari_server/setupSecurity.py
<https://reviews.apache.org/r/30882/#comment117918>
Could be an issue if different case is used. Instead, default the ssl property to "false" and then if if exists, do properties.get_property(SSL_API).lower() == "true"
ambari-server/src/main/python/ambari_server/setupSecurity.py
<https://reviews.apache.org/r/30882/#comment117919>
Similar issue to above. Maybe just assign it to the default port value to begin with and if propertys.get_property(SSL_API_PORT) is not None, then assign it?
- Jonathan Hurley
On Feb. 11, 2015, 1:18 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30882/
> -----------------------------------------------------------
>
> (Updated Feb. 11, 2015, 1:18 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-9576
> https://issues.apache.org/jira/browse/AMBARI-9576
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PROBLEM: User is unable to ldap sync with ambari server and LDAP SSL configured.
>
> It appears that /usr/sbin/ambari-server.py has the port of the api hard coded.
>
>
> root@ml-ambari /var/log>ambari-server sync-ldap --all -v
> Using python /usr/bin/python2.6
> Syncing with LDAP...
> INFO: about to run command: ps -p 54735
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Enter Ambari Admin login: rayoung
> Enter Ambari Admin password:
> Syncing all.
> Calling API /api/v1/ldap_sync_events : [{'Event': {'specs': [{'principal_type': 'users', 'sync_type': 'all'}, {'principal_type': 'groups', 'sync_type': 'all'}]}}]
> ERROR: Exiting with exit code 1.
> REASON: Sync event creation failed. Error details: <urlopen error [Errno 111] Connection refused>
>
>
> It can be worked around by manually editing ...
>
> SERVER_API_PROTOCOL = 'http'
> SERVER_API_PORT = '8080'
>
> in the python script or by turning off SSL and restarting Ambari.
>
> Also, fix issue where --users sync mode was broken during recent refactoring and minor command line help text.
>
>
> Diffs
> -----
>
> ambari-server/src/main/python/ambari-server.py 3c4c9c7
> ambari-server/src/main/python/ambari_server/serverConfiguration.py aeb2b6c
> ambari-server/src/main/python/ambari_server/setupHttps.py 6ec9978
> ambari-server/src/main/python/ambari_server/setupSecurity.py 8dcab56
> ambari-server/src/test/python/TestAmbariServer.py 825991b
>
> Diff: https://reviews.apache.org/r/30882/diff/
>
>
> Testing
> -------
>
> Manual testing.
> New unit tests added.
>
> Waiting for clean trunk build.
>
>
> Thanks,
>
> Tom Beerbower
>
>