You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2018/09/27 10:23:00 UTC

[jira] [Commented] (AMBARI-24632) APT/DPKG existence check doesn't work for system packages

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

Hudson commented on AMBARI-24632:
---------------------------------

FAILURE: Integrated in Jenkins build Ambari-trunk-Commit #10149 (See [https://builds.apache.org/job/Ambari-trunk-Commit/10149/])
[AMBARI-24632] APT/DPKG existence check doesn't work for system packages (github: [https://gitbox.apache.org/repos/asf?p=ambari.git&a=commit&h=f277631dec36a442999327026a030e463e4c67e1])
* (edit) ambari-common/src/main/python/ambari_commons/shell.py
* (edit) ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py
* (edit) ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py
* (edit) ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
* (edit) ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py
* (edit) ambari-server/src/test/python/custom_actions/TestInstallPackages.py
* (edit) ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py


> APT/DPKG existence check doesn't work for system packages
> ---------------------------------------------------------
>
>                 Key: AMBARI-24632
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24632
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Doroszlai, Attila
>            Assignee: Dmytro Grinenko
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.0.0
>
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Package existence check for APT/DPKG is a bit too strict:
> {noformat:title=https://github.com/apache/ambari/blob/c17762bdd91fddc0cca87d3aa24e4121c7b5e675/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py#L70}
> check_cmd = pkg_manager_bin + " --get-selections | grep -v deinstall | awk '{print $1}' | grep ^%s$"
> {noformat}
> Also in previous versions: https://github.com/apache/ambari/blob/64cc76bfc7c83707f395d8487ea983dc8fddb267/ambari-common/src/main/python/resource_management/core/providers/package/apt.py#L51
> System packages are postfixed by architecture, hence {{grep}} fails to find these due to {{$}}.  Examples where the existence check fails:
> {noformat}
> $ dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep -e '^liblzo2-2' -e '^libsnappy-dev'
> liblzo2-2:amd64
> libsnappy-dev:amd64
> {noformat}
> This results in {{Installing package ...}} being logged, which is a bit confusing.  Plus an unnecessary {{apt-get}} call, including wait for {{apt.lock}}, which the {{dpkg}} command was supposed to avoid.  Once {{apt-get}} gets to run, it returns quickly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)