Bug 623897 - errata = repo KeyError:Pulp Client errata list
Summary: errata = repo KeyError:Pulp Client errata list
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-08-13 05:20 UTC by Shveta
Modified: 2011-08-16 13:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 13:58:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Shveta 2010-08-13 05:20:36 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.register a consumer
2.list consumable repos
3.bind *this* consumer to a repo
4.list available errata

  
Actual results:


Expected results:


Additional info:  Repo list 
=======================================
[root@shveta noarch]# pulp-client -u admin -p admin repo list
+-------------------------------------------+
    List of Available Repositories 
+-------------------------------------------+

Label                   TAKE3rhel-i386-server-5  
Name                    rhel-i386-server-5       
Feed                    {u'url': u'satellite.rhn.redhat.com/rhel-i386-server-5', u'type': u'rhn', u'supported_types': [u'yum', u'local', u'rhn']}
Arch                    i386                     
Sync Schedule           None                     
Packages                /repositories/TAKE3rhel-i386-server-5/packages/


Label                   rhel-i386-server-5       
Name                    rhel-i386-server-5       
Feed                    {u'url': u'satellite.rhn.redhat.com/rhel-i386-server-5', u'type': u'rhn', u'supported_types': [u'yum', u'local', u'rhn']}
Arch                    i386                     
Sync Schedule           None                     
Packages                /repositories/rhel-i386-server-5/packages/


Label                   rhel-i386-server5        
Name                    f12                      
Feed                    {u'url': u'http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/', u'type': u'yum', u'supported_types': [u'yum', u'local', u'rhn']}
Arch                    i386                     
Sync Schedule           None                     
Packages                /repositories/rhel-i386-server5/packages/


Label                   f12_i386                 
Name                    f12                      
Feed                    {u'url': u'http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/', u'type': u'yum', u'supported_types': [u'yum', u'local', u'rhn']}
Arch                    i386                     
Sync Schedule           None                     
Packages                /repositories/f12_i386/packages/


Label                   f12_x86                  
Name                    f12_x86                  
Feed                    None                     
Arch                    noarch                   
Sync Schedule           None                     
Packages                /repositories/f12_x86/packages/


Label                   f12_x64                  
Name                    f12                      
Feed                    {u'url': u'http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/', u'type': u'yum', u'supported_types': [u'yum', u'local', u'rhn']}
Arch                    i386                     
Sync Schedule           None                     
Packages                /repositories/f12_x64/packages/

Create Consumer
==============================================
[root@shveta noarch]# pulp-client -u admin -p admin consumer create --id=10.65.193.75 --description=system 
"Consumer with id: 10.65.193.75, already exists"
[root@shveta noarch]# pulp-client -u admin -p admin consumer create --id=10.65.193.29 --description=system 
 Successfully created Consumer [ 10.65.193.29 ]

Bind Consumer 
=====================================================

[root@shveta noarch]# pulp-client -u admin -p admin consumer bind --repoid=f12_i386
 Successfully subscribed Consumer [10.65.193.29] to Repo [f12_i386]
[root@shveta noarch]# pulp-client -u admin -p admin errata
usage: pulp-client -u <username> -p <password> errata [OPTIONS]
Supported Actions:
        list           List applicable errata   

=========================================
List Errata
==================================================
[root@shveta noarch]# pulp-client -u admin -p admin errata list
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n    ret=f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/consumers.py\", line 288, in listerrata\n    return self.ok(api.listerrata(id, data['types']))\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 246, in listerrata\n    return self._applicable_errata(consumer, types).keys()\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 268, in _applicable_errata\n    for eid in self.repoapi.errata(repoid, types) ]\n  File \"/usr/lib/python2.6/site-packages/pulp/api/repo.py\", line 219, in errata\n    errata = repo['errata']\nKeyError: 'errata'\n"
[root@shveta noarch]#

Comment 1 Shveta 2010-08-13 05:25:17 UTC
Getting different error for different consumer id 
=========================================================

[root@shveta ~]# pulp-admin -u admin -p admin errata list --consumerid=10.65.193.9
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n    ret=f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/consumers.py\", line 288, in listerrata\n    return self.ok(api.listerrata(id, data['types']))\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 246, in listerrata\n    return self._applicable_errata(consumer, types).keys()\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 268, in _applicable_errata\n    for eid in self.repoapi.errata(repoid, types) ]\n  File \"/usr/lib/python2.6/site-packages/pulp/api/repo.py\", line 219, in errata\n    errata = repo['errata']\nKeyError: 'errata'\n"
[root@shveta ~]# pulp-admin -u admin -p admin errata list --consumerid=10.65.193.29
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n    ret=f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/consumers.py\", line 288, in listerrata\n    return self.ok(api.listerrata(id, data['types']))\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 246, in listerrata\n    return self._applicable_errata(consumer, types).keys()\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 261, in _applicable_errata\n    pkg_profile = consumer[\"package_profile\"]\nTypeError: 'NoneType' object is unsubscriptable\n"
[root@shveta ~]# pulp-admin -u admin -p admin errata list --consumerid=10.65.193.26
No errata available to list
[root@shveta ~]# pulp-admin -u admin -p admin errata list --consumerid=10.65.193.75
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n    ret=f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/consumers.py\", line 288, in listerrata\n    return self.ok(api.listerrata(id, data['types']))\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 246, in listerrata\n    return self._applicable_errata(consumer, types).keys()\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 263, in _applicable_errata\n    pkg_profile_dict = [dict(pkg) for pkg in pkg_profile]\nValueError: dictionary update sequence element #0 has length 1; 2 is required\n"
[root@shveta ~]#

Comment 2 Pradeep Kilambi 2010-08-17 14:52:51 UTC
This should be working. Please re-test

Comment 3 Shveta 2010-08-18 05:24:54 UTC
[root@fedora12g2 ~]# pulp-client -u admin -p admin errata list
No errata available to list

Comment 4 Preethi Thomas 2011-08-16 13:58:56 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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