Re: Review Request 50396: Bad error message if user has not performed ambari-server setup for jdbc driver before configuring custom DB

2016-07-26 Thread Robert Levas

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


Ship it!




Ship It!

- Robert Levas


On July 26, 2016, 8:40 a.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50396/
> ---
> 
> (Updated July 26, 2016, 8:40 a.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Dmytro Sen, Robert Levas, and 
> Sumit Mohanty.
> 
> 
> Bugs: AMBARI-17889
> https://issues.apache.org/jira/browse/AMBARI-17889
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While installing a cluster, I forgot to call:
> {{ambari-server setup --jdbc-db=mysql 
> --jdbc-driver=/usr/share/java/mysql-connector-java.jar}}
> 
> Check DB connection failed with:
> {code}
> 2016-07-13 00:56:32,751 - There was an unknown error while checking database 
> connectivity: cannot concatenate 'str' and 'NoneType' objects
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 144, in actionexecute
> db_connection_check_structured_output = 
> self.execute_db_connection_check(config, tmp_dir)
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 285, in execute_db_connection_check
> jdbc_url = jdk_location + jdbc_driver_mysql_name
> TypeError: cannot concatenate 'str' and 'NoneType' objects
> 2016-07-13 00:56:32,752 - Check db_connection_check was unsuccessful. Exit 
> code: 1. Message: cannot concatenate 'str' and 'NoneType' objects
> 
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 506, in 
> CheckHost().execute()
>   File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 280, in execute
> method(env)
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 206, in actionexecute
> raise Fail(error_message)
> resource_management.core.exceptions.Fail: Check db_connection_check was 
> unsuccessful. Exit code: 1. Message: cannot concatenate 'str' and 'NoneType' 
> objects
> {code}
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/custom_actions/scripts/check_host.py 
> 3d9dfa8 
> 
> Diff: https://reviews.apache.org/r/50396/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 50396: Bad error message if user has not performed ambari-server setup for jdbc driver before configuring custom DB

2016-07-26 Thread Dmytro Sen

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


Ship it!




Ship It!

- Dmytro Sen


On Июль 26, 2016, 12:40 п.п., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50396/
> ---
> 
> (Updated Июль 26, 2016, 12:40 п.п.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Dmytro Sen, Robert Levas, and 
> Sumit Mohanty.
> 
> 
> Bugs: AMBARI-17889
> https://issues.apache.org/jira/browse/AMBARI-17889
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While installing a cluster, I forgot to call:
> {{ambari-server setup --jdbc-db=mysql 
> --jdbc-driver=/usr/share/java/mysql-connector-java.jar}}
> 
> Check DB connection failed with:
> {code}
> 2016-07-13 00:56:32,751 - There was an unknown error while checking database 
> connectivity: cannot concatenate 'str' and 'NoneType' objects
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 144, in actionexecute
> db_connection_check_structured_output = 
> self.execute_db_connection_check(config, tmp_dir)
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 285, in execute_db_connection_check
> jdbc_url = jdk_location + jdbc_driver_mysql_name
> TypeError: cannot concatenate 'str' and 'NoneType' objects
> 2016-07-13 00:56:32,752 - Check db_connection_check was unsuccessful. Exit 
> code: 1. Message: cannot concatenate 'str' and 'NoneType' objects
> 
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 506, in 
> CheckHost().execute()
>   File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 280, in execute
> method(env)
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 206, in actionexecute
> raise Fail(error_message)
> resource_management.core.exceptions.Fail: Check db_connection_check was 
> unsuccessful. Exit code: 1. Message: cannot concatenate 'str' and 'NoneType' 
> objects
> {code}
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/custom_actions/scripts/check_host.py 
> 3d9dfa8 
> 
> Diff: https://reviews.apache.org/r/50396/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 50396: Bad error message if user has not performed ambari-server setup for jdbc driver before configuring custom DB

2016-07-26 Thread Vitalyi Brodetskyi

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

(Updated Липень 26, 2016, 12:40 після полудня)


Review request for Ambari, Dmitro Lisnichenko, Dmytro Sen, Robert Levas, and 
Sumit Mohanty.


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


Repository: ambari


Description
---

While installing a cluster, I forgot to call:
{{ambari-server setup --jdbc-db=mysql 
--jdbc-driver=/usr/share/java/mysql-connector-java.jar}}

Check DB connection failed with:
{code}
2016-07-13 00:56:32,751 - There was an unknown error while checking database 
connectivity: cannot concatenate 'str' and 'NoneType' objects
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 
144, in actionexecute
db_connection_check_structured_output = 
self.execute_db_connection_check(config, tmp_dir)
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 
285, in execute_db_connection_check
jdbc_url = jdk_location + jdbc_driver_mysql_name
TypeError: cannot concatenate 'str' and 'NoneType' objects
2016-07-13 00:56:32,752 - Check db_connection_check was unsuccessful. Exit 
code: 1. Message: cannot concatenate 'str' and 'NoneType' objects

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 
506, in 
CheckHost().execute()
  File 
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
 line 280, in execute
method(env)
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 
206, in actionexecute
raise Fail(error_message)
resource_management.core.exceptions.Fail: Check db_connection_check was 
unsuccessful. Exit code: 1. Message: cannot concatenate 'str' and 'NoneType' 
objects
{code}


Diffs (updated)
-

  ambari-server/src/main/resources/custom_actions/scripts/check_host.py 3d9dfa8 

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


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi



Re: Review Request 50396: Bad error message if user has not performed ambari-server setup for jdbc driver before configuring custom DB

2016-07-25 Thread Robert Levas


> On July 25, 2016, 1:42 p.m., Robert Levas wrote:
> > Ship It!

I nit-picked on the wording of the error messages.  Esstually all is good, but 
I think the error messages could have been clearer.  My comment read "may not 
be correct", but I really meant "may not be clear".  That is ironc, being that 
my comment wasn't clear. ;)


- Robert


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


On July 25, 2016, 1:18 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50396/
> ---
> 
> (Updated July 25, 2016, 1:18 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Dmytro Sen, Robert Levas, and 
> Sumit Mohanty.
> 
> 
> Bugs: AMBARI-17889
> https://issues.apache.org/jira/browse/AMBARI-17889
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While installing a cluster, I forgot to call:
> {{ambari-server setup --jdbc-db=mysql 
> --jdbc-driver=/usr/share/java/mysql-connector-java.jar}}
> 
> Check DB connection failed with:
> {code}
> 2016-07-13 00:56:32,751 - There was an unknown error while checking database 
> connectivity: cannot concatenate 'str' and 'NoneType' objects
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 144, in actionexecute
> db_connection_check_structured_output = 
> self.execute_db_connection_check(config, tmp_dir)
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 285, in execute_db_connection_check
> jdbc_url = jdk_location + jdbc_driver_mysql_name
> TypeError: cannot concatenate 'str' and 'NoneType' objects
> 2016-07-13 00:56:32,752 - Check db_connection_check was unsuccessful. Exit 
> code: 1. Message: cannot concatenate 'str' and 'NoneType' objects
> 
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 506, in 
> CheckHost().execute()
>   File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 280, in execute
> method(env)
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 206, in actionexecute
> raise Fail(error_message)
> resource_management.core.exceptions.Fail: Check db_connection_check was 
> unsuccessful. Exit code: 1. Message: cannot concatenate 'str' and 'NoneType' 
> objects
> {code}
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/custom_actions/scripts/check_host.py 
> 3d9dfa8 
> 
> Diff: https://reviews.apache.org/r/50396/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 50396: Bad error message if user has not performed ambari-server setup for jdbc driver before configuring custom DB

2016-07-25 Thread Robert Levas

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


Fix it, then Ship it!




Ship It!


ambari-server/src/main/resources/custom_actions/scripts/check_host.py (line 287)


The error message may not be correct. Maybe use:

"The MySQL JDBC driver has not been set.  Please ensure that you have 
executed 'ambari-server setup --jdbc-db=mysql 
--jdbc-driver=/path/to/jdbc_driver'."



ambari-server/src/main/resources/custom_actions/scripts/check_host.py (line 295)


The error message may not be correct. Maybe use:

"The Oracle JDBC driver has not been set.  Please ensure that you have 
executed 'ambari-server setup --jdbc-db=oracle 
--jdbc-driver=/path/to/jdbc_driver'.



ambari-server/src/main/resources/custom_actions/scripts/check_host.py (line 303)


The error message may not be correct. Maybe use:

"The Postgres JDBC driver has not been set.  Please ensure that you have 
executed 'ambari-server setup --jdbc-db=postgres 
--jdbc-driver=/path/to/jdbc_driver'.



ambari-server/src/main/resources/custom_actions/scripts/check_host.py (line 311)


The error message may not be correct. Maybe use:

"The MSSQL JDBC driver has not been set.  Please ensure that you have 
executed 'ambari-server setup --jdbc-db=mssql 
--jdbc-driver=/path/to/jdbc_driver'.



ambari-server/src/main/resources/custom_actions/scripts/check_host.py (line 319)


The error message may not be correct. Maybe use:

"The SQLAnywhere JDBC driver has not been set.  Please ensure that you have 
executed 'ambari-server setup --jdbc-db=sqlanywhere 
--jdbc-driver=/path/to/jdbc_driver'.


- Robert Levas


On July 25, 2016, 1:18 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50396/
> ---
> 
> (Updated July 25, 2016, 1:18 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Dmytro Sen, Robert Levas, and 
> Sumit Mohanty.
> 
> 
> Bugs: AMBARI-17889
> https://issues.apache.org/jira/browse/AMBARI-17889
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> While installing a cluster, I forgot to call:
> {{ambari-server setup --jdbc-db=mysql 
> --jdbc-driver=/usr/share/java/mysql-connector-java.jar}}
> 
> Check DB connection failed with:
> {code}
> 2016-07-13 00:56:32,751 - There was an unknown error while checking database 
> connectivity: cannot concatenate 'str' and 'NoneType' objects
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 144, in actionexecute
> db_connection_check_structured_output = 
> self.execute_db_connection_check(config, tmp_dir)
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 285, in execute_db_connection_check
> jdbc_url = jdk_location + jdbc_driver_mysql_name
> TypeError: cannot concatenate 'str' and 'NoneType' objects
> 2016-07-13 00:56:32,752 - Check db_connection_check was unsuccessful. Exit 
> code: 1. Message: cannot concatenate 'str' and 'NoneType' objects
> 
> Traceback (most recent call last):
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 506, in 
> CheckHost().execute()
>   File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 280, in execute
> method(env)
>   File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", 
> line 206, in actionexecute
> raise Fail(error_message)
> resource_management.core.exceptions.Fail: Check db_connection_check was 
> unsuccessful. Exit code: 1. Message: cannot concatenate 'str' and 'NoneType' 
> objects
> {code}
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/custom_actions/scripts/check_host.py 
> 3d9dfa8 
> 
> Diff: https://reviews.apache.org/r/50396/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>