ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Lysnichenko (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-9682) should not show traceback on exception during setup
Date Tue, 17 Feb 2015 20:08:11 GMT
Dmitry Lysnichenko created AMBARI-9682:
------------------------------------------

             Summary: 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


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