Project

Profile

Help

Issue #429

Uploading rpm fails with error: Invalid unit type for repository

Added by ashbyj@imsweb.com over 6 years ago. Updated over 2 years ago.

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

Description

Description of problem:

When uploading an rpm file to a pulp repo, it fails with: Invalid unit type for repository

I have two pulp servers: a parent and a child node. This only happens when uploading to repository "foo" on the child node. I think this is because Repository "foo" on the child has "yum_importer" as the Importer type, whereas the parent has "nodes_http_importer".

It is not clear in the documentation what these various importer plugins are or how to update an existing repo to change which importer is used.

The better solution for me is to upload to the parent and sync the repo to the child node, but that takes forever since I have so many repositories, and in 2.3 it seems I cannot specify a single repository (i.e. --repo-id) in the sync. Looks like that feature has been added in 2.4.

Version-Release number of selected component (if applicable):
pulp 2.3.1
CentOS 6.5

How reproducible:
every time

Steps to Reproduce:
1.

me@child:~> pulp-admin rpm repo uploads rpm --repo-id=foo --file=serf-custom-1.3.5-1.x86_64.rpm

--------------------------------------------------------------------
Unit Upload
--------------------------------------------------------------------

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: serf-custom-1.3.5-1.x86_64.rpm
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing: serf-custom-1.3.5-1.x86_64.rpm
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Uploading: serf-custom-1.3.5-1.x86_64.rpm
[==================================================] 100%
825314/825314 bytes
... completed

Importing into the repository...
The server indicated one or more values were incorrect. The server provided the
following error message:

Invalid unit type for repository

More information can be found in the client log file ~/.pulp/admin.log.

#

  1. ~/.pulp/admin.log
    #
    2014-05-13 08:53:08,734 - ERROR - Exception occurred:
    href: /pulp/api/v2/repositories/foo/actions/import_upload/
    method: POST
    status: 400
    error: Invalid unit type for repository
    traceback: None
    data: {u'args': [u'Invalid unit type for repository']}

Actual results:
Invalid unit type for repository

Expected results:
Successful upload of rpm to repository.

Additional info:
Here are the repo details for the parent and child pulp servers per "pulp-admin repo list --details":

  1. Parent pulp server
    #
    Id: foo
    Display Name: Custom packages for EL6 - Development
    Description: Custom Packages for EL6 - x86_64
    Content Unit Counts:
    Rpm: 96
    Notes:
    Importers:
    Config:
    Manifest URL: https://pulp.example.com/pulp/nodes/https/repos/foo/
    manifest.json
    Strategy: additive
    Id: nodes_http_importer
    Importer Type Id: nodes_http_importer
    Last Sync: 2014-05-12T23:23:08-04:00
    Repo Id: foo
    Scheduled Syncs:
    Distributors:
    Auto Publish: True
    Config:
    Http: False
    Https: True
    Relative URL: foo
    Distributor Type Id: yum_distributor
    Id: yum_distributor
    Last Publish: 2014-05-13T08:12:14-04:00
    Repo Id: foo
    Scheduled Publishes:
    Auto Publish: False
    Config:
    Http: False
    Https: True
    Distributor Type Id: export_distributor
    Id: export_distributor
    Last Publish: None
    Repo Id: foo
    Scheduled Publishes:
  1. Child pulp node
    #
    Id: foo
    Display Name: Custom packages for EL6 - Development
    Description: Custom Packages for EL6 - x86_64
    Content Unit Counts:
    Rpm: 97
    Notes:
    Importers:
    Config:
    Id: yum_importer
    Importer Type Id: yum_importer
    Last Sync: None
    Repo Id: foo
    Scheduled Syncs:
    Distributors:
    Auto Publish: True
    Config:
    Http: False
    Https: True
    Relative URL: foo
    Distributor Type Id: yum_distributor
    Id: yum_distributor
    Last Publish: 2014-05-13T08:11:09-04:00
    Repo Id: foo
    Scheduled Publishes:
    Auto Publish: True
    Config:
    Distributor Type Id: nodes_http_distributor
    Id: nodes_http_distributor
    Last Publish: 2014-05-09T11:37:17-04:00
    Repo Id: foo
    Scheduled Publishes:
    Auto Publish: False
    Config:
    Http: False
    Https: True
    Distributor Type Id: export_distributor
    Id: export_distributor
    Last Publish: None
    Repo Id: foo
    Scheduled Publishes:

+ This bug was cloned from Bugzilla Bug #1097275 +

History

#1 Updated by mhrivnak over 6 years ago

When you sync a repo to a child node, you cannot upload content to that repo on the child.

That said, pulp should have a better error message. We are leaving this bug report open pending an improved user experience.

+ This comment was cloned from Bugzilla #1097275 comment 1 +

#2 Updated by ashbyj@imsweb.com over 6 years ago

(In reply to Michael Hrivnak from comment #1)

When you sync a repo to a child node, you cannot upload content to that repo
on the child.

Good to know. I would expect that to be the case. This sentence made me think I could do such a thing:

It is important to understand that a child node is a complete and fully functional Pulp server capable of operating autonomously.  (per https://pulp-user-guide.readthedocs.org/en/pulp-2.3/nodes.html)

An improved error message in this case would be perfect though, thanks.

+ This comment was cloned from Bugzilla #1097275 comment 2 +

#3 Updated by bmbouter over 6 years ago

  • Severity changed from Low to 1. Low

#4 Updated by bmbouter over 2 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#5 Updated by bmbouter over 2 years 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 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF