Project

Profile

Help

Issue #487

closed

Malformed Puppet Modules Cause Pulp Exception

Added by bmbouter about 9 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.4 Beta
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem: If a puppet module is malformed Pulp shows the user an exception. Malformed could be that the full module name is missing an author (0 dashed is full module name) or that the name portion of the full module name contains additional dashes. The second case is one example in the traceback below for the puppet module named "windows_xmltask-0.0.3".

How reproducible: Always, as long as puppet modules on puppetforge are malformed as described above.

Steps to Reproduce:
1. Add a puppet repo setup to sync puppet forget with no filter
2. Perform a sync
3. Observe the traceback

Actual results:
Most of it sync's, but you'll receive output like this:
progress_report:
puppet_importer:
modules:
traceback:
execution_time: 3
total_count: 138
error_message:
finished_count: 2
state: success
error_count: 136
error: None
individual_errors:
- exception: need more than 1 value to unpack
traceback:
- - /usr/lib/python2.6/site-packages/pulp_puppet/plugins/importers/forge.py
- 270
- _do_import_modules
- self._add_new_module(downloader, module)
- - /usr/lib/python2.6/site-packages/pulp_puppet/plugins/importers/forge.py
- 318
- _add_new_module
- module = Module.from_json(metadata_json)
- - /usr/lib/python2.6/site-packages/pulp_puppet/common/model.py
- 124
- from_json
- author, name = module_json.get('name').split("-", 1)
module: windows_xmltask-0.0.3
author: noma4i
- exception: need more than 1 value to unpack
traceback:
- - /usr/lib/python2.6/site-packages/pulp_puppet/plugins/importers/forge.py
- 270
- _do_import_modules
- self._add_new_module(downloader, module)
- - /usr/lib/python2.6/site-packages/pulp_puppet/plugins/importers/forge.py
- 318
- _add_new_module
- module = Module.from_json(metadata_json)
- - /usr/lib/python2.6/site-packages/pulp_puppet/common/model.py
- 124
- from_json
- author, name = module_json.get('name').split("-", 1)

I expect two behaviors:
1. Pulp should handle named puppet modules without exactly one dash in them more gracefully.
2. If it absolutely can't handle the puppet module a coded exception or nicer message should be shown to the user.

+ This bug was cloned from Bugzilla Bug #1128269 +

Also available in: Atom PDF