You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Vitalyi Brodetskyi <vb...@hortonworks.com> on 2015/09/07 19:09:05 UTC

Review Request 38163: Need more informative error message on set-current

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

Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, and Dmytro Sen.


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


Repository: ambari


Description
-------

When a user performances a manual upgrade (2.2 -> 2.3 or maint), they have to run set-current at the end and provide cluster name and version display name.

If they incorrectly enter the cluster name, the error looks like this:

{code}
ambari-server set-current --cluster-name=os-rhel6-upgrade-t2-allservices --version-display-name=HDP-2.2.8.0
Using python  /usr/bin/python2.6
Setting current version...
Enter Ambari Admin login: admin
Enter Ambari Admin password:
ERROR: Exiting with exit code 1.
REASON: Error during setting current version. Http status code - 500.
 {
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: Can not perform request"
}
{code}

This error should be a lot more informative to tell the user the cluster was not found, that they should provide the cluster name and to double-check their command.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java be0af16 

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


Testing
-------

mvn clean test


Thanks,

Vitalyi Brodetskyi


Re: Review Request 38163: Need more informative error message on set-current

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38163/#review97979
-----------------------------------------------------------

Ship it!


Ship It!

- Andrew Onischuk


On Sept. 7, 2015, 5:09 p.m., Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38163/
> -----------------------------------------------------------
> 
> (Updated Sept. 7, 2015, 5:09 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, and Dmytro Sen.
> 
> 
> Bugs: AMBARI-13028
>     https://issues.apache.org/jira/browse/AMBARI-13028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When a user performances a manual upgrade (2.2 -> 2.3 or maint), they have to run set-current at the end and provide cluster name and version display name.
> 
> If they incorrectly enter the cluster name, the error looks like this:
> 
> {code}
> ambari-server set-current --cluster-name=os-rhel6-upgrade-t2-allservices --version-display-name=HDP-2.2.8.0
> Using python  /usr/bin/python2.6
> Setting current version...
> Enter Ambari Admin login: admin
> Enter Ambari Admin password:
> ERROR: Exiting with exit code 1.
> REASON: Error during setting current version. Http status code - 500.
>  {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Can not perform request"
> }
> {code}
> 
> This error should be a lot more informative to tell the user the cluster was not found, that they should provide the cluster name and to double-check their command.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java be0af16 
> 
> Diff: https://reviews.apache.org/r/38163/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>


Re: Review Request 38163: Need more informative error message on set-current

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38163/#review97981
-----------------------------------------------------------

Ship it!


Ship It!

- Andrew Onischuk


On Sept. 8, 2015, 8:43 a.m., Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38163/
> -----------------------------------------------------------
> 
> (Updated Sept. 8, 2015, 8:43 a.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, and Dmytro Sen.
> 
> 
> Bugs: AMBARI-13028
>     https://issues.apache.org/jira/browse/AMBARI-13028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When a user performances a manual upgrade (2.2 -> 2.3 or maint), they have to run set-current at the end and provide cluster name and version display name.
> 
> If they incorrectly enter the cluster name, the error looks like this:
> 
> {code}
> ambari-server set-current --cluster-name=os-rhel6-upgrade-t2-allservices --version-display-name=HDP-2.2.8.0
> Using python  /usr/bin/python2.6
> Setting current version...
> Enter Ambari Admin login: admin
> Enter Ambari Admin password:
> ERROR: Exiting with exit code 1.
> REASON: Error during setting current version. Http status code - 500.
>  {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Can not perform request"
> }
> {code}
> 
> This error should be a lot more informative to tell the user the cluster was not found, that they should provide the cluster name and to double-check their command.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java be0af16 
> 
> Diff: https://reviews.apache.org/r/38163/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>


Re: Review Request 38163: Need more informative error message on set-current

Posted by Vitalyi Brodetskyi <vb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38163/
-----------------------------------------------------------

(Updated Вер. 8, 2015, 8:43 до полудня)


Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, and Dmytro Sen.


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


Repository: ambari


Description
-------

When a user performances a manual upgrade (2.2 -> 2.3 or maint), they have to run set-current at the end and provide cluster name and version display name.

If they incorrectly enter the cluster name, the error looks like this:

{code}
ambari-server set-current --cluster-name=os-rhel6-upgrade-t2-allservices --version-display-name=HDP-2.2.8.0
Using python  /usr/bin/python2.6
Setting current version...
Enter Ambari Admin login: admin
Enter Ambari Admin password:
ERROR: Exiting with exit code 1.
REASON: Error during setting current version. Http status code - 500.
 {
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: Can not perform request"
}
{code}

This error should be a lot more informative to tell the user the cluster was not found, that they should provide the cluster name and to double-check their command.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java be0af16 

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


Testing
-------

mvn clean test


Thanks,

Vitalyi Brodetskyi


Re: Review Request 38163: Need more informative error message on set-current

Posted by Vitalyi Brodetskyi <vb...@hortonworks.com>.

> On Вер. 7, 2015, 5:31 після полудня, Andrew Onischuk wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java, line 630
> > <https://reviews.apache.org/r/38163/diff/1/?file=1064867#file1064867line630>
> >
> >     Will this print stacktrace as well or only the message?

http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#getMessage()


> On Вер. 7, 2015, 5:31 після полудня, Andrew Onischuk wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java, line 630
> > <https://reviews.apache.org/r/38163/diff/1/?file=1064867#file1064867line630>
> >
> >     Will this print stacktrace as well or only the message?

http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#getMessage()


- Vitalyi


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


On Вер. 7, 2015, 5:09 після полудня, Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38163/
> -----------------------------------------------------------
> 
> (Updated Вер. 7, 2015, 5:09 після полудня)
> 
> 
> Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, and Dmytro Sen.
> 
> 
> Bugs: AMBARI-13028
>     https://issues.apache.org/jira/browse/AMBARI-13028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When a user performances a manual upgrade (2.2 -> 2.3 or maint), they have to run set-current at the end and provide cluster name and version display name.
> 
> If they incorrectly enter the cluster name, the error looks like this:
> 
> {code}
> ambari-server set-current --cluster-name=os-rhel6-upgrade-t2-allservices --version-display-name=HDP-2.2.8.0
> Using python  /usr/bin/python2.6
> Setting current version...
> Enter Ambari Admin login: admin
> Enter Ambari Admin password:
> ERROR: Exiting with exit code 1.
> REASON: Error during setting current version. Http status code - 500.
>  {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Can not perform request"
> }
> {code}
> 
> This error should be a lot more informative to tell the user the cluster was not found, that they should provide the cluster name and to double-check their command.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java be0af16 
> 
> Diff: https://reviews.apache.org/r/38163/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>


Re: Review Request 38163: Need more informative error message on set-current

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38163/#review97934
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java (line 622)
<https://reviews.apache.org/r/38163/#comment154041>

    Will this print stacktrace as well or only the message?



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java (line 622)
<https://reviews.apache.org/r/38163/#comment154042>

    Will this print stacktrace as well or only the message?


- Andrew Onischuk


On Sept. 7, 2015, 5:09 p.m., Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38163/
> -----------------------------------------------------------
> 
> (Updated Sept. 7, 2015, 5:09 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, and Dmytro Sen.
> 
> 
> Bugs: AMBARI-13028
>     https://issues.apache.org/jira/browse/AMBARI-13028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When a user performances a manual upgrade (2.2 -> 2.3 or maint), they have to run set-current at the end and provide cluster name and version display name.
> 
> If they incorrectly enter the cluster name, the error looks like this:
> 
> {code}
> ambari-server set-current --cluster-name=os-rhel6-upgrade-t2-allservices --version-display-name=HDP-2.2.8.0
> Using python  /usr/bin/python2.6
> Setting current version...
> Enter Ambari Admin login: admin
> Enter Ambari Admin password:
> ERROR: Exiting with exit code 1.
> REASON: Error during setting current version. Http status code - 500.
>  {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Can not perform request"
> }
> {code}
> 
> This error should be a lot more informative to tell the user the cluster was not found, that they should provide the cluster name and to double-check their command.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java be0af16 
> 
> Diff: https://reviews.apache.org/r/38163/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>