Bug 876725 - RFE - consumer/agent - support option to perform 'best effort' install of content
RFE - consumer/agent - support option to perform 'best effort' install of con...
Product: Pulp
Classification: Community
Component: consumers (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.1.0
Assigned To: Sayli Karmarkar
Preethi Thomas
: FutureFeature, Triaged
Depends On:
Blocks: katello-v2-pulp
  Show dependency treegraph
Reported: 2012-11-14 14:38 EST by Brad Buckingham
Modified: 2015-03-22 21:11 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-04-08 12:03:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Brad Buckingham 2012-11-14 14:38:42 EST
Description of problem:

There is an inconsistency in behavior between a client-initiated yum install and server-initiated install of packages when one or more of the packages doesn't exist.

For example, (assuming unknownpkg doesn't exist)

action: client-initiated "yum install unknownpkg xterm"
result: xterm is installed

action: server (e.g. katello) initiated install of unknownpkg xterm
result: No package(s) available to install

From a user-perspective, I'd expect the behavior to be the same.  Based on discussion with Jeff, perhaps this could be allowed by introducing a new option on the server-initiated interface to support a 'best effort' install.  

Alternatively, if it cannot be supported the error message should be updated to be more accurate, since in this case xterm is available, but unknownpkg is not.

Version-Release number of selected component (if applicable):

How reproducible:

Additional info:

The following is the complete result from pulp when attempting the server initiated install:

{"trace"=>"Traceback (most recent call last):\n\n  File \"/usr/lib/python2.7/site-packages/pulp/agent/lib/dispatcher.py\", line 75, in install\n    r = handler.install(conduit, units, dict(options))\n\n  File \"/usr/lib/pulp/agent/handlers/rpm.py\", line 99, in install\n    details = pkg.install(names)\n\n  File \"/usr/lib/python2.7/site-packages/pulp_rpm/handler/rpmtools.py\", line 124, in install\n    yb.install(pattern=info)\n\n  File \"/usr/lib/python2.7/site-packages/yum/__init__.py\", line 4157, in install\n    raise Errors.InstallError, _('No package(s) available to install')\n\nInstallError: No package(s) available to install\n", "message"=>"No package(s) available to install"}
Comment 1 Sayli Karmarkar 2013-01-23 05:12:45 EST

$ pulp-admin rpm consumer package install run --consumer-id test-consumer -n pulp-test-package -n pulp-dot-2.0-test -n fail-pkg1 -n fail-pkg2
Install task created with id [106f4674-b3f6-44f4-b4be-0d1ef33cccfb]

This command may be exited via ctrl+c without affecting the install.

Refresh Repository Metadata [ OK ]
Downloading Packages [ OK ]
Check Package Signatures [ OK ]
Running Test Transaction [ OK ]
Running Transaction [ OK ]
Install Completed


Name: pulp-test-package
Version: 0.3.1
Arch: x86_64
Repoid: test-repo

Name: pulp-dot-2.0-test
Version: 0.1.2
Arch: x86_64
Repoid: test-repo

Failed to install following packages:

fail-pkg2 : No package(s) available to install

fail-pkg1 : No package(s) available to install
Comment 2 Sayli Karmarkar 2013-01-29 14:15:03 EST
Merged changes. 

commit a69225421bc19d21022199e958ca70ccbea12143
Merge: f1f8558 59c9103
Author: skarmark <skarmark@redhat.com>
Date:   Tue Jan 29 11:13:08 2013 -0800

    Merge pull request #98 from pulp/skarmark-876725
    876725 - adding support for best effort install of content and unit tests

Moving to modified.
Comment 3 Jeff Ortel 2013-02-05 15:57:10 EST
build: 2.1.0-0.3.alpha
Comment 4 Preethi Thomas 2013-03-19 09:42:02 EDT

[root@cloud-qe-8 ~]# rpm -q pulp-server
[root@cloud-qe-8 ~]#
Comment 5 Preethi Thomas 2013-04-08 12:03:03 EDT
Pulp 2.1 released 


Note You need to log in before you can comment on or make changes to this bug.