You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2015/05/07 00:22:00 UTC

[jira] [Commented] (AMBARI-10968) ambari_server/utils.py should be able to parse version with postfix text

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

Hadoop QA commented on AMBARI-10968:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12730925/AMBARI-10968.patch
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of javac compiler warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number of release audit warnings.

    {color:green}+1 core tests{color}.  The patch passed unit tests in ambari-server.

Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/2639//testReport/
Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/2639//console

This message is automatically generated.

> ambari_server/utils.py should be able to parse version with postfix text
> ------------------------------------------------------------------------
>
>                 Key: AMBARI-10968
>                 URL: https://issues.apache.org/jira/browse/AMBARI-10968
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.0.0
>            Reporter: Di Li
>            Assignee: Di Li
>             Fix For: 2.1.0
>
>         Attachments: AMBARI-10968.patch
>
>
> Apache ambari 2.0 has version "2.0.0" in the version file "/var/lib/ambari-server/resources/version". 
> Since ambari is open source, it can be built with version information that has digits plus postfix like "2.0.0._MyCompany" in the version file "/var/lib/ambari-server/resources/version"
> This postfix text causes the "ambari-server upgrade" cmd to fail with an int parser err thrown from the python script
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Traceback (most recent call last):
>   File "/usr/sbin/ambari-server.py", line 608, in <module>
>     mainBody()
>   File "/usr/sbin/ambari-server.py", line 596, in mainBody
>     main(options, args, parser)
>   File "/usr/sbin/ambari-server.py", line 562, in main
>     action_obj.execute()
>   File "/usr/sbin/ambari-server.py", line 58, in execute
>     self.fn(*self.args, **self.kwargs)
>   File "/usr/lib/python2.6/site-packages/ambari_server/serverUpgrade.py", line 320, in upgrade
>     elif compare_versions(ambari_version, "2.0.0") == 0:
>   File "/usr/lib/python2.6/site-packages/ambari_server/utils.py", line 248, in compare_versions
>     return cmp(normalize(version1), normalize(version2))
>   File "/usr/lib/python2.6/site-packages/ambari_server/utils.py", line 247, in normalize
>     return [int(x) for x in re.sub(r'(\.0+)*$', '', v).split(".")]
> ValueError: invalid literal for int() with base 10: '0_MyCompany'



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