Bug #22321

hammer csv content-hosts create empty csv file

Added by Djebran Lezzoum almost 5 years ago. Updated over 4 years ago.

Target version:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:


hammer csv content-hosts create empty csv file
The automation test case cover customer bug
The test in question seems randomly passing and failing, but when debugging that command we realize that command lead to other operations, where one of them is retrieving organizations, noticed that when the organization is not in that list (the list seems to be sorted by org name with limit 20) the csv file is empty, there is no error logged

Related issues

Related to Katello - Bug #22319: hammer csv content-hosts create empty csv fileDuplicate2018-01-18


#1 Updated by Djebran Lezzoum almost 5 years ago

Cloned from

How reproducible:
Always when have more than 20 organizations and org name is not returned by GET /katello/api/organizations (as seems to have a default limit of 20)

Steps to Reproduce:
1. Create more than 20 organizations that begin with "a"
2. Create 1 organization with name that begin with "z" like "z_org"
(when sorted by name the last org will not be in list of the first 20 orgs)
3. Setup 2 content hosts within the latest org and attach subscriptions
4. execute

hammer csv content-hosts --organization="z_org" --export --file="/tmp/chs_export_z_org.csv"

Actual results:
the csv file is created with no content-host records (the file contain only the columns header)

Expected results:
the csv file should contain the content hosts records with subscriptions data

Additional info:
1- The same behavior noticed for command "hammer csv subscriptions"
2- The "hammer csv activation-keys" is working as expected

3- In the attached file: "csv content-host debug command" notice the line that contain "[ INFO 2018-01-17 07:57:21 API] GET /katello/api/organizations"
and notice that organization "vzFt3K" is not in the list of the returned organizations

#2 Updated by Thomas McKay almost 5 years ago

  • Related to Bug #22319: hammer csv content-hosts create empty csv file added

#3 Updated by Thomas McKay over 4 years ago

  • Triaged set to Yes

Also available in: Atom PDF