Project

Profile

Help

Issue #1962

invalid string formatting for error message

Added by jluza over 4 years ago. Updated over 1 year ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
Platform Release:
2.8.3
Target Release - Docker:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

I ran into this issue when I tried to update redirect url for docker distributor. My url didn't match required format and pulp failed on formatting error during the error reporting procedure.

Jun  1 08:09:57 pulp-docker01 pulp: pulp_docker.plugins.distributors.configuration:ERROR: [Error(code='DKR1001', message="The url specified for %(field) is missing a scheme. The value specified is '%(url)'.", required_fields=['field', 'url']), Error(code='DKR1003', message="The url specified for %(field) is missing a path. The value specified is '%(url)'.", required_fields=['field', 'url'])]
Jun  1 08:09:57 pulp-docker01 pulp: pulp.server.async.tasks:INFO: Task failed : [c15209c5-f651-46b2-8755-821914269bd0] : A validation error occurred.
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848) Task pulp.server.tasks.repository.distributor_update[c15209c5-f651-46b2-8755-821914269bd0] INTERNAL ERROR: TypeError('%d format: a number is required, not str',)
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848) Traceback (most recent call last):
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)   File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 253, in trace_task
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)     I, R, state, retval = on_error(task_request, exc, uuid)
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)   File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 201, in on_error
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)     R = I.handle_error_state(task, eager=eager)
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)   File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 85, in handle_error_state
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)     }[self.state](task, store_errors=store_errors)
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)   File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 120, in handle_failure
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)     task.on_failure(exc, req.id, req.args, req.kwargs, einfo)
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 554, in on_failure
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)     task_status['error'] = exc.to_dict()
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)   File "/usr/lib/python2.6/site-packages/pulp/server/exceptions.py", line 45, in to_dict
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)     result['sub_errors'].append(error.to_dict())
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)   File "/usr/lib/python2.6/site-packages/pulp/server/exceptions.py", line 39, in to_dict
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)     'description': str(self),
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)   File "/usr/lib/python2.6/site-packages/pulp/server/exceptions.py", line 95, in __str__
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848)     msg = self.error_code.message % self.error_data
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:CRITICAL: (11788-62848) TypeError: %d format: a number is required, not str
Jun  1 08:09:57 pulp-docker01 pulp: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[476c9148-40bc-4677-8b6e-e225b2446a38] succeeded in 0.0149725959636s: None

History

#1 Updated by dkliban@redhat.com over 4 years ago

  • Triaged changed from No to Yes

#2 Updated by bmbouter over 4 years ago

  • Description updated (diff)

Adding pre tags for readability.

#3 Updated by bmbouter over 3 years ago

  • Tags RCM added

#4 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - WONTFIX

#5 Updated by bmbouter over 1 year ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#6 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

#7 Updated by bmbouter over 1 year ago

  • Tags deleted (RCM)

Please register to edit this issue

Also available in: Atom PDF