> On May 22, 2015, 6 p.m., Alejandro Fernandez wrote: > > Hi Di, this is good. Can you add "Ambari" to the group, set "trunk" as the > > branch, and add the AMBARI-##### value to the bug first so that others are > > aware of this change?
Hello Alenjandro, sorry I didn't set those few fields up properly. They are set per your comment. Could you please review and if it's ok to ship it, could you please also help commit it to the trunk? - Di ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34269/#review84942 ----------------------------------------------------------- On May 22, 2015, 6:28 p.m., Di Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34269/ > ----------------------------------------------------------- > > (Updated May 22, 2015, 6:28 p.m.) > > > Review request for Ambari and Alejandro Fernandez. > > > Bugs: AMBARI-10968 > https://issues.apache.org/jira/browse/AMBARI-10968 > > > Repository: ambari > > > Description > ------- > > 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' > > > Diffs > ----- > > ambari-server/src/main/python/ambari_server/utils.py f09a95c > ambari-server/src/test/python/TestUtils.py bbd40bf > > Diff: https://reviews.apache.org/r/34269/diff/ > > > Testing > ------- > > test_compare_versions (TestUtils.TestUtils) ... ok > ... ... > ---------------------------------------------------------------------- > Ran 265 tests in 7.355s > > OK > ---------------------------------------------------------------------- > Total run:773 > Total errors:0 > Total failures:0 > > > Thanks, > > Di Li > >
