Project

Profile

Help

Issue #2753

closed

Cannot search rpm content from the CLI

Added by daviddavis over 7 years ago. Updated over 5 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

I believe this error might be due to the metadata stored on this particular rpm. It's probably not utf8.

Steps:

sudo yum install -y wget
wget ftp://195.220.108.108/linux/fedora-secondary/development/rawhide/Everything/aarch64/os/Packages/v/vim-enhanced-8.0.596-1.fc27.aarch64.rpm
pulp-admin rpm repo uploads rpm --file vim-enhanced-8.0.596-1.fc27.aarch64.rpm --repo-id zoo
pulp-admin -vvvv rpm repo content rpm --repo-id zoo

Error:

May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320) Traceback (most recent call last):
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     response = wrapped_callback(request, *callback_args, **callback_kwargs)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     return self.dispatch(request, *args, **kwargs)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 88, in dispatch
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     return handler(request, *args, **kwargs)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/decorators.py", line 241, in
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     return _verify_auth(self, operation, super_user_only, method, *args, **kwargs)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/decorators.py", line 195, in
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     value = method(self, *args, **kwargs)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/util.py", line 132, in wrapp
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     return decorator
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/search.py", line 127, in pos
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     return self._generate_response(query, options, *args, **kwargs)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/repositories.py", line 294, 
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     return generate_json_response_with_pulp_encoder(units)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/util.py", line 54, in genera
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/usr/lib64/python2.7/json/__init__.py", line 251, in dumps
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     sort_keys=sort_keys, **kw).encode(obj)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     chunks = self.iterencode(o, _one_shot=True)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)   File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320)     return _iterencode(o, 0)
May 12 12:42:28 dev.example.com pulp[14948]: pulp.server.webservices.middleware.exception:ERROR: (14948-36320) UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte

This hack seemed to fix it for me but I don't think it's the correct solution:

https://gist.github.com/daviddavis/5bd1a3a2f87f947e431cabb3a2321925


Related issues

Is duplicate of RPM Support - Issue #2620: All RPM repo searches are brokenCLOSED - CURRENTRELEASEttereshcActions
Actions #1

Updated by daviddavis over 7 years ago

  • Description updated (diff)
Actions #2

Updated by daviddavis over 7 years ago

  • Is duplicate of Issue #2620: All RPM repo searches are broken added
Actions #3

Updated by daviddavis over 7 years ago

  • Status changed from NEW to CLOSED - DUPLICATE
Actions #4

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF