ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doroszlai, Attila (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (AMBARI-21713) Python tests started under uid=0 and uid > 0 works differently
Date Wed, 16 Aug 2017 09:34:00 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-21713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Doroszlai, Attila reopened AMBARI-21713:
----------------------------------------

[~dgrinenko], this change causes failure of 2 unit tests in ambari-agent.  Can you please
check?

{noformat:title=https://builds.apache.org/job/Ambari-trunk-Commit/7887/consoleText}
======================================================================
ERROR: test_get_installed_package_version_centos_suse (TestPackagesAnalyzer.TestPackagesAnalyzer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-common/src/test/python/mock/mock.py",
line 1199, in patched
    return func(*args, **keywargs)
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py",
line 39, in test_get_installed_package_version_centos_suse
    result = packages_analyzer.getInstalledPackageVersion("package1")
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py",
line 319, in getInstalledPackageVersion
    code, out = rmf_shell.checked_call("rpm -q --queryformat '%{{version}}-%{{release}}' {0}
| sed -e 's/\.el[0-9]//g'".format(package_name))
ValueError: too many values to unpack

======================================================================
ERROR: test_get_installed_package_version_ubuntu (TestPackagesAnalyzer.TestPackagesAnalyzer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-common/src/test/python/mock/mock.py",
line 1199, in patched
    return func(*args, **keywargs)
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py",
line 30, in test_get_installed_package_version_ubuntu
    result = packages_analyzer.getInstalledPackageVersion("package1")
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py",
line 317, in getInstalledPackageVersion
    code, out = rmf_shell.checked_call("dpkg -s {0} | grep Version | awk '{{print $2}}'".format(package_name))
ValueError: too many values to unpack

----------------------------------------------------------------------
Ran 467 tests in 28.363s

FAILED (errors=2)
{noformat}

> Python tests started under uid=0 and uid > 0 works differently
> --------------------------------------------------------------
>
>                 Key: AMBARI-21713
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21713
>             Project: Ambari
>          Issue Type: Bug
>    Affects Versions: trunk
>            Reporter: Dmytro Grinenko
>            Assignee: Dmytro Grinenko
>            Priority: Critical
>             Fix For: trunk
>
>
> The cause is sudo.py and same meaning modules, which implements different logic depends
on user uid. Coz of that us tests covering only uid > 0 logic and starting them from root
(on VM or docker) causing them to fail



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message