Project

General

Profile

Bug #22319

hammer csv content-hosts create empty csv file

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

Status:
Duplicate
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:
hammer csv content-hosts create empty csv file
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

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


Related issues

Related to Hammer CLI CSV - Bug #22321: hammer csv content-hosts create empty csv fileNew2018-01-19

History

#1 Updated by Thomas McKay over 3 years ago

  • Legacy Backlogs Release (now unused) set to 166
  • Status changed from New to Duplicate
  • Subject changed from hammer csv content-hosts create empty csv file to hammer csv content-hosts create empty csv file

22321

#2 Updated by Thomas McKay over 3 years ago

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

Also available in: Atom PDF