Project

General

Profile

Bug #14615

hammer import content-host fails with ISE - Content View and Environment not set for registration.

Added by Thomas McKay over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1325497
Description of problem:
hammer import content-host fails with ISE - Content View and Environment not set for registration. No content-host are being created.

Version-Release number of selected component (if applicable):
@Sat6.2.0-Beta-Snap6.2
tfm-rubygem-hammer_cli_import-0.10.23-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. # cat users.csv
organization_id,organization,user_id,username,last_name,first_name,position,email,role,creation_time,last_login_time,active
1,SatelliteQE,1,admin,Admin,Admin,,root@localhost,Satellite Administrator,2014-09-10 19:39:59,2016-04-07 01:00:14,enabled

2. # hammer import organization --verbose --csv-file users.csv
Importing from users.csv
Creating new organization: SatelliteQE
Summary
Created 1 organization.

3. # cat system-profiles.csv
server_id,profile_name,hostname,description,organization_id,organization_name,base_channel_id,base_channel_label,child_channel_id,child_channel_label,system_group_id,system_group,release,architecture,virtual_host,virtual_guest,is_virtualized,virt_type
1000010009,profile1,tyan-gt24-01.example.com,,1,Red Hat SatTeam QA,,,,,,,7Server,x86_64,,,No,

4. # hammer -d import content-host --verbose --csv-file system-profiles.csv --export-directory .
...
Importing from system-profiles.csv
Creating new system: profile1
[ INFO 2016-04-09 11:25:42 API] POST /katello/api/systems
[DEBUG 2016-04-09 11:25:42 API] Params: {
:name => "profile1",
:description => "\nsat5_system_id: 1000010009",
:facts => {
"release" => "7Server",
"architecture" => "x86_64"
},
:type => "system",
:organization_id => 8,
:content_view_id => nil,
:host_collection_ids => []
}
[DEBUG 2016-04-09 11:25:42 API] Headers: {}
[DEBUG 2016-04-09 11:25:43 API] 500 Internal Server Error {
"displayMessage" => "Content View and Environment not set for registration.",
"errors" => [
[0] "Content View and Environment not set for registration."
]
}
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line: {"server_id"=>"1000010009", "profile_name"=>"profile1", "hostname"=>"tyan-gt24-01.example.com", "description"=>nil, "organization_id"=>"1", "base_channel_id"=>nil, "base_channel_label"=>nil, "child_channel_id"=>nil, "system_group_id"=>nil, "release"=>"7Server", "architecture"=>"x86_64", "virtual_host"=>nil, "virtual_guest"=>nil}
Summary
No action taken.

Actual results:
ISE, no content-host is created

Expected results:
content-hosts are successfully created


Related issues

Blocks Katello - Feature #11435: Host Unification TrackerNew

Associated revisions

Revision 00542595 (diff)
Added by Thomas McKay over 3 years ago

fixes #14615 - update api calls for hosts

Revision cdd92c63
Added by Thomas McKay over 3 years ago

Merge pull request #26 from thomasmckay/14615-hosts

fixes #14615 - update api calls for hosts

Revision 3133582e (diff)
Added by Thomas McKay over 3 years ago

refs #14615 - handle no host collections, no channels

Revision b497a2fc
Added by Thomas McKay over 3 years ago

Merge pull request #28 from thomasmckay/14615-fixes

refs #14615 - handle no host collections, no channels

Revision 4b5a5328 (diff)
Added by Thomas McKay over 3 years ago

refs #14615 - properly map host id

Revision bae4e1b4
Added by Thomas McKay over 3 years ago

Merge pull request #30 from thomasmckay/14615-moar

refs #14615 - properly map host id

History

#1 Updated by Thomas McKay over 3 years ago

  • Project changed from Katello to Hammer CLI Import

#2 Updated by Lukas Pramuk over 3 years ago

#3 Updated by Thomas McKay over 3 years ago

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

#4 Updated by Thomas McKay over 3 years ago

  • Pull request https://github.com/Katello/hammer-cli-import/pull/26 added

Also available in: Atom PDF