Bug 638288

Summary: errata install failing
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: high    
Version: unspecifiedCC: whayutin
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 14:20:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 641987    

Description Preethi Thomas 2010-09-28 17:01:19 UTC
Description of problem:

pulp-admin errata install failing

[root@preethi ~]# pulp-admin errata install FEDORA-2010-9419 --consumerid=preethi.usersys.redhat.com
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py\", line 51, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 368, in POST\n    return action(id)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py\", line 102, in check_roles\n    result = f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 315, in installerrata\n    return self.ok(consumer_api.installerrata(id, eids, types))\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/consumer.py\", line 319, in installerrata\n    errata_titles.append(applicable_errata[eid]['title'])\nKeyError: u'FEDORA-2010-9419'\n"


from pulp.log


2010-09-28 13:10:01,242 [INFO][Dummy-3] open() @ consumer.py:112 - {3e35fb34-40d2-40f1-a546-160ee17b4c60} opening 3e35fb34-40d2-40f1-a546-160ee17b4c60;{create:always,delete:receiver,node:{type:queue},link:{durable:True}}
2010-09-28 13:10:15,705 [ERROR][Dummy-3] report_error() @ base.py:55 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py", line 51, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py", line 368, in POST
    return action(id)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py", line 102, in check_roles
    result = f(instance, *fargs, **kw)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py", line 315, in installerrata
    return self.ok(consumer_api.installerrata(id, eids, types))
  File "/usr/lib/python2.6/site-packages/pulp/server/api/consumer.py", line 319, in installerrata
    errata_titles.append(applicable_errata[eid]['title'])
KeyError: u'FEDORA-2010-9419'

Comment 1 Jay Dobies 2010-10-15 12:24:16 UTC
Fixed in the 0.73 release.

Comment 2 Preethi Thomas 2010-10-21 19:31:35 UTC
fails_qa

[root@preethi ~]# pulp-admin errata  install --help
Usage: pulp-admin <options> errata install <options>

Options:
  -h, --help            show this help message and exit

  Consumer or Consumer Group id (one is required):
    --consumerid=CONSUMERID
                        consumer id
    --consumergroupid=CONSUMERGROUPID
                        consumer group id
[root@preethi ~]# pulp-admin errata  install FEDORA-2010-12528 --consumerid=preethi.usersys.redhat.com
Specify an errata id to install

Comment 3 Pradeep Kilambi 2010-10-27 18:52:15 UTC
fixed!

commit b7b39aeaaa03d3cac0fbc1cb67ea563d25a3009d
Author: Pradeep Kilambi <pkilambi>
Date:   Wed Oct 27 14:45:01 2010 -0400

    bz#638288 - errata installs should now be successfully scheduled

$  sudo pulp-admin errata install --consumerid=test-consumer FEDORA-2010-14675 
Created task id: 9471fa23-e1f9-11df-a828-0023ae793dbc
.........................................................................................
[[u'policycoreutils-gui-2.0.83-28.fc13.x86_64', u'policycoreutils-gui-2.0.83-28.fc13.x86_64', u'policycoreutils-2.0.83-28.fc13.x86_64', u'policycoreutils-2.0.83-28.fc13.x86_64', u'policycoreutils-python-2.0.83-28.fc13.x86_64', u'policycoreutils-python-2.0.83-28.fc13.x86_64', u'policycoreutils-gui-2.0.83-28.fc13.x86_64', u'policycoreutils-gui-2.0.83-28.fc13.x86_64', u'policycoreutils-2.0.83-28.fc13.x86_64', u'policycoreutils-2.0.83-28.fc13.x86_64', u'policycoreutils-python-2.0.83-28.fc13.x86_64', u'policycoreutils-python-2.0.83-28.fc13.x86_64']] installed on test-consumer

Comment 4 Jay Dobies 2010-10-29 16:58:24 UTC
Fixed in 0.77.

Comment 5 Jay Dobies 2010-11-03 19:35:24 UTC
Fixed in build 0.78.

Comment 6 Preethi Thomas 2010-11-08 19:01:44 UTC
fails_qa
I still get the following error

[root@preethi ~]# pulp-admin errata install FEDORA-2010-12147 --consumerid=preethi.usersys.redhat.com
error: operation failed: "Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py\", line 53, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 423, in POST\n    return action(id)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py\", line 105, in check_roles\n    result = f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 367, in installerrata\n    task = consumer_api.installerrata(id, eids, types)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/consumer.py\", line 412, in installerrata\n    for pobj in applicable_errata[eid]:\nKeyError: u'FEDORA-2010-12147'\n"

Comment 7 Pradeep Kilambi 2010-11-17 17:08:22 UTC
commit f54cdcf538504f59693abc7d769fc2d0f55ae54f
Author: Pradeep Kilambi <pkilambi>
Date:   Wed Nov 17 12:02:51 2010 -0500

    bug#638288 - If errata is not applicable to a system, raise a meaningful error

The issue here is the errata you're trying to apply is not applicable to your consumer. Fixed, now we should catch the exception and tell the user the errata are not applicable.

An errata list, lists all errata. errata list --consumer only lists ones to your consumer. 


$ sudo pulp-admin errata install --consumerid=praddy FEDORA-2010-14669
Created task id: 31eca175-f26b-11df-8a6d-0023ae793dbc
...........................
[[u'meld-1.3.1-3.fc13.noarch', u'meld-1.3.1-3.fc13.noarch']] installed on praddy


[pkilambi@prad pulp{master}]$ sudo pulp-admin errata install --consumerid=praddy FEDORA-2010-56756
The requested errataids ['FEDORA-2010-56756'] are not applicable for your system

Comment 8 Jay Dobies 2010-11-29 14:16:06 UTC
Fixed in 0.109.

Comment 9 Preethi Thomas 2010-12-14 17:50:23 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.114-1.fc14.noarch


[root@preethi ~]# pulp-admin errata install FEDORA-2010-18657 --consumerid=preethi.usersys.redhat.com
Created task id: 7e5d218c-07ab-11e0-94e2-002564a85a58
......
[['1:xorg-x11-font-utils-7.4-3.fc14.x86_64', '1:xorg-x11-font-utils-7.4-3.fc14.x86_64', '1:xorg-x11-font-utils-7.4-3.fc14.x86_64', '1:xorg-x11-font-utils-7.4-3.fc14.x86_64']] installed on preethi.usersys.redhat.com

Comment 10 Preethi Thomas 2011-08-16 14:20:14 UTC
Closing with Community Release 15

pulp-0.0.223-4.