Bug 862356 - User with non-UTF-8 characters in name causes task queue to quit
Summary: User with non-UTF-8 characters in name causes task queue to quit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 40
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 862068
TreeView+ depends on / blocked
 
Reported: 2012-10-02 17:30 UTC by Mike McCune
Modified: 2014-03-31 01:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:08:31 UTC
Embargoed:


Attachments (Terms of Use)
full traceback (1.80 KB, text/plain)
2012-10-02 17:32 UTC, Mike McCune
no flags Details

Description Mike McCune 2012-10-02 17:30:08 UTC
Making a call to sync a repo with a pulp-user with utf8 chars in the header:

Resource POST request: /pulp/api/repositories/Cuiaba-777433b3-23f6-4e47-bbfd-68a691d1d708-repo1/sync/, {"threads":4}, {"accept"=>"application/json", "content-type"=>"application/json", "accept-language"=>:en, "pulp-user"=>"Mané"}


causes the below exception:

2012-10-01 10:48:16,450 11917:140154905814784: pulp.server.webservices.controllers.repositories:INFO: repositories:1179 sync timeout passed : None
2012-10-01 10:48:16,500 11917:140155184740096: pulp:CRITICAL: queue:130 Exception in FIFO Queue Dispatch Thread
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/taskqueue/queue.py", line 124, in _dispatch
    self.run(task)
[snip]
    return dict([(k, _process_value(v)) for k, v in serialized_task.items()])
  File "/usr/lib/python2.6/site-packages/pulp/server/db/model/persistence.py", line 55, in _process_value
    value = value.decode('utf-8')
  File "/usr/lib64/python2.6/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 270: invalid continuation byte

after this the task queue appears to die and all subsequent calls will be stuck in waiting

Comment 1 Mike McCune 2012-10-02 17:32:24 UTC
Created attachment 620409 [details]
full traceback

full traceback from pulp.log

Comment 2 Mike McCune 2012-10-02 17:32:49 UTC
pulp version:


pulp-1.1.11-1.el6.noarch
pulp-admin-1.1.11-1.el6.noarch
pulp-client-lib-1.1.11-1.el6.noarch
pulp-common-1.1.11-1.el6.noarch
pulp-selinux-server-1.1.11-1.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch

Comment 3 Mike McCune 2012-10-02 19:37:28 UTC
see the patch mentioned here:

https://bugzilla.redhat.com/show_bug.cgi?id=835586#c9

Comment 4 Jeff Ortel 2012-10-04 13:23:39 UTC
build: 1.1.13

Comment 5 Preethi Thomas 2012-10-04 20:59:40 UTC
This has been fixed
[root@pulp-v1-server ~]# rpm -q pulp
pulp-1.1.13-1.el6.noarch
[root@pulp-v1-server ~]# 
I get the failure for sync for a repo created with user name that hasutf-8 characters. And after that I tried another sync and it completed

[root@pulp-v1-server ~]# pulp-admin -u Månə -p redhat repo sync --id pulp -F
Sync for repository pulp started
Waiting /
Task not found: 55505e0a-0e64-11e2-bc4a-52540067ae07
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 823, in run
    self._foreground_final_output(final_task)
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 977, in _foreground_final_output
    state = task['state']
TypeError: 'NoneType' object is unsubscriptable
[root@pulp-v1-server ~]# pulp-admin -u Månə -p redhat repo sync --id pulp -F
Sync for repository pulp started
Waiting /
Task not found: 5944b723-0e64-11e2-9635-52540067ae07
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 823, in run
    self._foreground_final_output(final_task)
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 977, in _foreground_final_output
    state = task['state']
TypeError: 'NoneType' object is unsubscriptable
[root@pulp-v1-server ~]# 
[root@pulp-v1-server ~]# 
[root@pulp-v1-server ~]# pulp-admin -u Månə -p redhat repo sync --id pulp -F
Sync for repository pulp started
Waiting /
Task not found: 5ed50a47-0e64-11e2-baab-52540067ae07
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 823, in run
    self._foreground_final_output(final_task)
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/repo.py", line 977, in _foreground_final_output
    state = task['state']
TypeError: 'NoneType' object is unsubscriptable
[root@pulp-v1-server ~]# 
[root@pulp-v1-server ~]# 
[root@pulp-v1-server ~]# pulp-admin -u admin -p admin repo sync --id zoo -FSync for repository zoo started
Sync: Finished
0/32 new items downloaded
32/32 existing items processed

Item Details: 
RPMs: 32/32

[root@pulp-v1-server ~]#

Comment 6 Preethi Thomas 2013-01-09 17:08:31 UTC
Pulp v2.0 released


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