Project

General

Profile

Actions

Bug #18616

closed

Unable to hammer csv import products : 422 Unprocessable Entity

Added by Thomas McKay about 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
products
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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,,
Actions #1

Updated by Thomas McKay about 7 years 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
  • Assignee set to Thomas McKay
Actions #2

Updated by Thomas McKay about 7 years ago

  • Target version set to 166
Actions #3

Updated by The Foreman Bot about 7 years ago

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

Updated by Thomas McKay almost 7 years ago

  • Target version changed from 166 to 193
Actions #5

Updated by Thomas McKay almost 7 years ago

  • Target version changed from 193 to 194
Actions #6

Updated by Thomas McKay almost 7 years ago

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

Also available in: Atom PDF