ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-9682) should not show traceback on exception during setup
Date Wed, 18 Feb 2015 16:07:14 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-9682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14326101#comment-14326101
] 

Hudson commented on AMBARI-9682:
--------------------------------

FAILURE: Integrated in Ambari-contrib-views #6 (See [https://builds.apache.org/job/Ambari-contrib-views/6/])
AMBARI-9682. should not show traceback on exception during setup (dlysnichenko) (dlysnichenko:
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=2e1d9c6b2aeddaa02a59f9b6a5cfc6f0e89c8c52)
* ambari-server/src/test/python/TestAmbariServer.py
* ambari-server/src/main/python/ambari-server.py


> should not show traceback on exception during setup
> ---------------------------------------------------
>
>                 Key: AMBARI-9682
>                 URL: https://issues.apache.org/jira/browse/AMBARI-9682
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 1.6.1
>            Reporter: Dmitry Lysnichenko
>            Assignee: Dmitry Lysnichenko
>             Fix For: 2.0.0
>
>         Attachments: AMBARI-9682.patch
>
>
> I run ambari-server setup on a machine that has a suspect OS version (testing out how
well we check OS type).
> On ambari-server setup, setup fails with the following:
> {code}
> [root@8 yum.repos.d]# ambari-server setup -s
> Using python  /usr/bin/python2.6
> Setup ambari-server
> Traceback (most recent call last):
>   File "/usr/sbin/ambari-server.py", line 53, in <module>
>     OS_VERSION = OSCheck().get_os_major_version()
>   File "/usr/lib/python2.6/site-packages/common_functions/os_check.py", line 110, in
get_os_major_version
>     return OSCheck.get_os_version().split('.')[0]
>   File "/usr/lib/python2.6/site-packages/common_functions/os_check.py", line 101, in
get_os_version
>     raise Exception("Cannot detect os version. Exiting...")
> Exception: Cannot detect os version. Exiting...
> [root@8 yum.repos.d]# 
> {code}
> 1) Setup should not be dumping the traceback to the user.
> 2) ambari-server supports a "--verbose" option. If verbose is set, then dump the traceback.
Otherwise, just print the Exception.
> 3) All exception handling in setup should be reviewed for this traceback scenario
> 4) This same OS call is made during agent registration. Should avoid tracebacks there
too.
> One scenario to test this failing is when folks use the Amazon Linux AMI.
> {code}
> [root@8 etc]# more /etc/system-release
> Amazon Linux AMI release 2014.03
> {code}
> And if this is helpful:
> {code}
> [root@8 etc]# python
> Python 2.6.9 (unknown, Mar 28 2014, 00:06:37) 
> [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import platform;
> >>> platform.dist();
> ('', '', '')
> >>> platform.linux_distribution();
> ('', '', '')
> >>> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message