Project

Profile

Help

Issue #2500

closed

ValueError exception is raised when uploading module with invalid name

Added by mhrivnak over 7 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.8.7
Platform Release:
2.11.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Sprint 13
Quarter:

Description

When uploading a puppet module that has an unparsable name, pulp raises a ValueError, which bubbles up and results in:

PLP0047: The importer puppet_importer indicated a failed response when uploading puppet_module unit to repository

Pulp should raise a PulpCodedException with a more helpful error message.

From Bugzilla:

The underlying issue appears to be:

Oct 31 16:21:57 ndhrhnsat2 pulp: pulp_puppet.plugins.importers.importer:ERROR: (17600-26528) File "/usr/lib/python2.7/site-packages/pulp_puppet/plugins/db/models.py", line 166, in split_filename Oct 31 16:21:57 ndhrhnsat2 pulp: pulp_puppet.plugins.importers.importer:ERROR: (17600-26528) author, name = filename.split("/", 1) Oct 31 16:21:57 ndhrhnsat2 pulp: pulp_puppet.plugins.importers.importer:ERROR: (17600-26528) ValueError: need more than 1 value to unpack


Models.py does not seem to like name values in the manifest that use underscores:

For example, changing

  "name": "eodendahl_ssh",

to:

  "name": "eodendahl-ssh",

bypasses the error.

Related issues

Related to Puppet Support - Issue #2512: Puppet Importer swallows exception when one is raised during uploadCLOSED - CURRENTRELEASEdaviddavisActions

Also available in: Atom PDF