Bug 1004981 - The Pulp RPM agent installs RPMs by name, ignoring epoch, version, release, and architecture
The Pulp RPM agent installs RPMs by name, ignoring epoch, version, release, a...
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: consumers (Show other bugs)
Master
All All
high Severity high
: ---
: 2.4.0
Assigned To: Barnaby Court
Preethi Thomas
: Triaged
Depends On:
Blocks: 1004986 1104742
  Show dependency treegraph
 
Reported: 2013-09-05 19:04 EDT by Randy Barlow
Modified: 2014-08-09 02:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1104742 (view as bug list)
Environment:
Last Closed: 2014-08-09 02:55:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Randy Barlow 2013-09-05 19:04:15 EDT
Our API offers users the ability to request units to be installed on consumers using the full NEVRA information, but the agent handler for RPM content only considers the name when installing packages. This could be surprising to some of our users, who might have provided a specific version that wasn't the latest available version of a package to be installed on a consumer.
Comment 1 Barnaby Court 2013-11-05 10:54:00 EST
PR: https://github.com/pulp/pulp_rpm/pull/374
Comment 2 Jeff Ortel 2014-04-03 09:36:17 EDT
build: 2.4.0-0.7.beta
Comment 3 Preethi Thomas 2014-06-04 11:04:36 EDT
verified
[root@hp-dl380pgen8-01 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.19.beta.fc20.noarch
[root@hp-dl380pgen8-01 ~]# 

The options are available in API

In [24]: pic.POST('/v2/consumers/kitkat/actions/content/install/',body={'units':[{'unit_key':{'name':'whale','version':'0.2'},'type_id':'rpm'}], 'options':{} })
Request Body
{
  "units": [
    {
      "unit_key": {
        "version": "0.2", 
        "name": "whale"
      }, 
      "type_id": "rpm"
    }
  ], 
  "options": {}
}
Response Body
{
  "spawned_tasks": [
    {
      "_href": "/pulp/api/v2/tasks/0357aa3b-e4cf-4dba-ac04-48ed3ebf114c/", 
      "task_id": "0357aa3b-e4cf-4dba-ac04-48ed3ebf114c"
    }
  ], 
  "result": null, 
  "error": null
}
Out[24]: 
(202,
 {u'error': None,
  u'result': None,
  u'spawned_tasks': [{u'_href': u'/pulp/api/v2/tasks/0357aa3b-e4cf-4dba-ac04-48ed3ebf114c/',
    u'task_id': u'0357aa3b-e4cf-4dba-ac04-48ed3ebf114c'}]})

In [25]: 



In [17]: pic.POST('/v2/consumers/kitkat/actions/content/install/',body={'units':[{'unit_key':{'name':'zebra','epoch':'0'},'type_id':'rpm'}], 'options':{} })
Request Body
{
  "units": [
    {
      "unit_key": {
        "epoch": "0", 
        "name": "zebra"
      }, 
      "type_id": "rpm"
    }
  ], 
  "options": {}
}
Response Body
{
  "spawned_tasks": [
    {
      "_href": "/pulp/api/v2/tasks/c2f3081e-89fb-4ca6-8ce1-cfc67834cbbc/", 
      "task_id": "c2f3081e-89fb-4ca6-8ce1-cfc67834cbbc"
    }
  ], 
  "result": null, 
  "error": null
}
Out[17]: 
(202,
 {u'error': None,
  u'result': None,
  u'spawned_tasks': [{u'_href': u'/pulp/api/v2/tasks/c2f3081e-89fb-4ca6-8ce1-cfc67834cbbc/',
    u'task_id': u'c2f3081e-89fb-4ca6-8ce1-cfc67834cbbc'}]})
Comment 4 Randy Barlow 2014-08-09 02:55:15 EDT
This has been fixed in Pulp 2.4.0-1.

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