Project

Profile

Help

Issue #429

closed

Uploading rpm fails with error: Invalid unit type for repository

Added by ashbyj@imsweb.com about 9 years ago. Updated about 5 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 +

Also available in: Atom PDF