Issue #429
closedUploading rpm fails with error: Invalid unit type for repository
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.
#
- ~/.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":
- 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:
- 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 +
Updated by mhrivnak about 9 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 +
Updated by ashbyj@imsweb.com about 9 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 +
Updated by bmbouter about 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter about 5 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.