Bug 850905 - repo units errors out for errata search
repo units errors out for errata search
Status: CLOSED DUPLICATE of bug 867577
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
Master
Unspecified Unspecified
high Severity high
: ---
: Sprint 39
Assigned To: Jay Dobies
Preethi Thomas
: Triaged
Depends On: 850875
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-22 13:02 EDT by Preethi Thomas
Modified: 2013-09-09 12:29 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 850875
Environment:
Last Closed: 2012-10-18 08:58:45 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 Preethi Thomas 2012-08-22 13:02:30 EDT
clone for master
+++ This bug was initially created as a clone of Bug #850875 +++

Description of problem:
repo units search on errata seems to be erroring out

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


How reproducible:


Steps to Reproduce:
1. create a repo
2. create an errata in the repo
3. run repo units errata on the repo
  
Actual results:

[root@pulp-candidate scripts]# pulp-admin repo units errata --repo-id errata_demo --erratum-id DEMO_ID_1345649112
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

Expected results:


Additional info:

2012-08-22 11:30:38,123 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 475, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 891, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 184, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/pulp/admin/extensions/rpm_units_search/pulp_cli.py", line 221, in run
    self.details(**kwargs)
  File "/usr/lib/pulp/admin/extensions/rpm_units_search/pulp_cli.py", line 267, in details
    errata = self.context.server.repo_unit_search.search(repo_id, criteria).response_body
AttributeError: 'Bindings' object has no attribute 'repo_unit_search'
Comment 1 Jay Dobies 2012-09-05 08:59:05 EDT
At some point, this was fixed in master. I was able to see it in the CR-2 build but not master:

$ pulp-admin repo units errata --repo-id bugs
Description:       ErrD
From Str:          jdob@redhat.com
Id:                err
Issued:            2012-01-01 01:00:00
Pkglist:           
  Name:     1
  Packages: 
    Arch:     i386
    Epoch:    0
    Filename: xen-3.0.3-105.el5_5.2.i386.rpm
    Name:     xen
    Release:  105.el5_5.2
    Src:      xen-3.0.3-105.el5_5.2.src.rpm
    Sums:     0f1174b38383b01a77278b0d9f289987
    Type:     md5
    Version:  3.0.3
    Arch:     i386
    Epoch:    0
    Filename: xen-devel-3.0.3-105.el5_5.2.i386.rpm
    Name:     xen-devel
    Release:  105.el5_5.2
    Src:      xen-3.0.3-105.el5_5.2.src.rpm
    Sums:     3680d1dde276fd155ead7203508fed30
    Type:     md5
    Version:  3.0.3
  Short:    
Pushcount:         1
Reboot Suggested:  False
References:        
Release:           1
Rights:            None
Severity:          None
Solution:          None
Status:            final
Summary:           None
Title:             Err
Type:              bugzilla
Updated:           2012-01-01 12:00:00
Version:           1.0.0
Comment 2 Jeff Ortel 2012-09-11 09:31:39 EDT
build: 0.327
Comment 3 Preethi Thomas 2012-09-26 16:28:03 EDT
looks like the fix did not make it into master
[root@pulp-master scripts]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.328-1.fc17.noarch
[root@pulp-master scripts]# 

[root@pulp-master scripts]# pulp-admin repo units errata --repo-id errata_demo
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

2012-09-26 16:24:18,327 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 476, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 933, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/pulp/admin/extensions/rpm_units_search/pulp_cli.py", line 182, in errata
    _content_command([TYPE_ERRATUM], write_erratum, **kwargs)
  File "/usr/lib/pulp/admin/extensions/rpm_units_search/pulp_cli.py", line 219, in _content_command
    out_func(unit['metadata'])
  File "/usr/lib/pulp/admin/extensions/rpm_units_search/pulp_cli.py", line 238, in write_erratum
    CONTEXT.prompt.render_document(erratum['metadata'])
KeyError: 'metadata'
Comment 4 Preethi Thomas 2012-10-18 08:02:03 EDT

[root@pulp-master ~]# pulp-admin rpm repo content errata --repo-id zoo
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.


[root@pulp-master ~]# pulp-admin rpm repo content errata --repo-id zoo
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

[root@pulp-master ~]# 

2012-10-18 07:48:42,931 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 476, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 933, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 259, in errata
    _content_command(self.context, [TYPE_ERRATUM], self.write_erratum, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 372, in _content_command
    out_func(units)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 277, in write_erratum
    self.context.prompt.render_document(erratum_list[0]['metadata'])
IndexError: list index out of range
2012-10-18 07:55:19,562 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 476, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 933, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 259, in errata
    _content_command(self.context, [TYPE_ERRATUM], self.write_erratum, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 372, in _content_command
    out_func(units)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 277, in write_erratum
    self.context.prompt.render_document(erratum_list[0]['metadata'])
KeyError: 'metadata'


2012-10-18 08:00:35,441 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 476, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 933, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 259, in errata
    _content_command(self.context, [TYPE_ERRATUM], self.write_erratum, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 372, in _content_command
    out_func(units)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/extension/admin/contents.py", line 277, in write_erratum
    self.context.prompt.render_document(erratum_list[0]['metadata'])
KeyError: 'metadata'
Comment 5 Jay Dobies 2012-10-18 08:58:45 EDT
I filed this yesterday not realizing there was already a bug. It's fixed and waiting on a pull request review. I'm going to close this one out as the pull request was filed against the one I created.

*** This bug has been marked as a duplicate of bug 867577 ***

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