Bug #18616

Unable to hammer csv import products : 422 Unprocessable Entity

Added by Thomas McKay 4 months ago. Updated 30 days ago.

Status:Closed
Priority:Normal
Assigned To:Thomas McKay
Category:products
Target version:Katello - Team Tom - Iteration 15
Difficulty: Pull request:https://github.com/Katello/hammer-cli-csv/pull/154
Bugzilla link:1425434
Story points-
Velocity based estimate-

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1425434

Description of problem:

I'm trying to import the 'products' CSV generated in one Satellite instance in a new Satellite instance with the same Organization name, and get a "422 Unprocesable Entity" when restoring a product that uses Red Hat CDN repositories.

Digging a bit deeper, it seems that hammer csv is not able to cope with repositories that do not have tagged releasever information (eg: RHEL Extras, Satellite, Cloudforms, others).

Version-Release number of selected component (if applicable):

Satellite 627
tfm-rubygem-hammer_cli_csv-2.2.1.1-1.el7sat.noarch

How reproducible:

Have a CSV that refers to Products without a releasever field and try to import them:

#

  1. hammer csv products --no-sync < products.csv
    Error: 422 Unprocessable Entity
    Red Hat Satellite Capsule,Red_Hat_Satellite_Capsule,MyOrg,,Red Hat Satellite Capsule 6.2 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) (RPMs),,https://cdn.redhat.com/
    content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.2/os,No,No,No,immediate,,

The following message can be found in /var/log/foreman/production.log :

2017-02-21 06:46:54 [app] [E] Katello::Errors::CdnSubstitutionError: ["releasever"] cannot be specified for Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) (RPMs) as that information is not substituable in /content/dist/rhel/server/7/7Server/$basearch/sat-capsule/6.2/os

  1. grep Satellite products.csv
    Red Hat Satellite Capsule,Red_Hat_Satellite_Capsule,MyOrg,,Red Hat Satellite Capsule 6.2 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) (RPMs),,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.2/os,No,No,No,immediate,,
    Red Hat Satellite Capsule,Red_Hat_Satellite_Capsule,MyOrg,,Red Hat Satellite Capsule 6.1 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Capsule 6.1 (for RHEL 7 Server) (RPMs),,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.1/os,No,No,No,immediate,,
    Red Hat Satellite,Red_Hat_Satellite,MyOrg,,Red Hat Satellite 6.2 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite 6.2 (for RHEL 7 Server) (RPMs),,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/satellite/6.2/os,No,No,No,immediate,,
    Red Hat Satellite,Red_Hat_Satellite,MyOrg,,Red Hat Satellite 6.1 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite 6.1 (for RHEL 7 Server) (RPMs),,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/satellite/6.1/os,No,No,No,immediate,,
    Red Hat Enterprise Linux Server,Red_Hat_Enterprise_Linux_Server,MyOrg,,Red Hat Satellite Tools 6.2 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Tools 6.2 (for RHEL 7 Server) (RPMs),,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6.2/os,No,No,No,immediate,,
    Red Hat Enterprise Linux Server,Red_Hat_Enterprise_Linux_Server,MyOrg,,Red Hat Satellite Tools 6.1 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Tools 6.1 (for RHEL 7 Server) (RPMs),,https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6.1/os,No,No,No,immediate,,

Associated revisions

Revision a2c97209
Added by Thomas McKay 30 days ago

fixes #18616 - for import

History

#1 Updated by Thomas McKay 4 months ago

  • Project changed from Katello to Hammer CLI CSV
  • Subject changed from Unable to hammer csv import products : 422 Unprocessable Entity to Unable to hammer csv import products : 422 Unprocessable Entity
  • Category set to products
  • Assigned To set to Thomas McKay

#2 Updated by Thomas McKay 4 months ago

  • Target version set to Team Tom - iteration 11

#3 Updated by The Foreman Bot 3 months ago

  • Pull request https://github.com/Katello/hammer-cli-csv/pull/154 added

#4 Updated by Thomas McKay about 1 month ago

  • Target version changed from Team Tom - iteration 11 to Team Brad - Iteration 15

#5 Updated by Thomas McKay about 1 month ago

  • Target version changed from Team Brad - Iteration 15 to Team Tom - Iteration 15

#6 Updated by Thomas McKay 30 days ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF