Bug 810396 - pulp-admin tracebacks if sync plan has i18n character
pulp-admin tracebacks if sync plan has i18n character
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
1.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-05 16:48 EDT by Og Maciel
Modified: 2015-03-22 21:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-25 10:16:37 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)
Script to reproduce this. (1.44 KB, application/x-shellscript)
2012-04-05 16:48 EDT, Og Maciel
no flags Details

  None (edit)
Description Og Maciel 2012-04-05 16:48:52 EDT
Created attachment 575551 [details]
Script to reproduce this.

Description of problem:

Running pulp-admin against a CFSE system that has sync plans with i18n names raise an exception.

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

pulp-1.0.4-1.el6.noarch
pulp-admin-1.0.4-1.el6.noarch

How reproducible:


Steps to Reproduce:
1. Run the attached script
2. run: pulp-admin task list
3.
  
Actual results:

# pulp-admin  task list
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/task.py", line 93, in run
    print '\n'.join(self.format_task(t) for t in tasks)
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/task.py", line 93, in <genexpr>
    print '\n'.join(self.format_task(t) for t in tasks)
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/task.py", line 64, in format_task
    ', '.join([str(a) for a in task['args']]),
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 4: ordinal not in range(128)

Expected results:


Additional info:
Comment 1 Og Maciel 2012-04-05 17:11:26 EDT
This is what's making it choke:

{u'scheduled_time': u'2012-04-05T21:13:57Z', u'exception': None, u'args': [u'Bras\xedlia-SE-SE_x86_64'], u'job_id': None, u'class_name': None, u'start_time': None, u'traceback': None, u'method_name': u'_sync', u'finish_time': None, u'state': u'waiting', u'result': None, u'scheduler': u'interval', u'snapshot_id': None, u'progress': None, u'id': u'7b3a5c8f-7f61-11e1-9b44-52540094ff01'}
Comment 2 Sayli Karmarkar 2012-04-18 12:04:44 EDT
This seems to be already fixed in 1.1 branch as part of the fix for https://bugzilla.redhat.com/show_bug.cgi?id=796854. Moving to on_qa.
Comment 3 Preethi Thomas 2012-04-19 12:07:00 EDT
verified

[root@pulp-v1-1-server ~]# rpm -q pulp
pulp-1.1.2-1.fc16.noarch

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo create --id=Brasília --feed=http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/fedora-16/x86_64/
Successfully created repository [ Brasília ]

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo sync --id=Brasília --interval=PT5M --start=2012-02-07T12:40:00-01:00:00
Sync schedule for repo [ Brasília ] changed to [ 2012-02-07T12:40:00-01:00/PT5M ]
[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+



Id                 	Brasília                 
Name               	Brasília                 
Repo URL           	https://pulp-v1-1-server.usersys.redhat.com/pulp/repos/repos/pulp/pulp/v1/stable/fedora-16/x86_64/
Feed URL           	http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/fedora-16/x86_64/
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	2012-02-07T08:40:00-05:00/PT5M
Packages           	21                       
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	False                    
Checksum Type      	sha256                   


          


[root@pulp-v1-1-server ~]#
Comment 4 Preethi Thomas 2012-05-25 10:16:37 EDT
Pulp v1.1 Release

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