Bug 1394218 - "hammer csv content-hosts --export" fails with "Error: undefined method `[]' for nil:NilClass" if any host doesn't have a valid subscription
Summary: "hammer csv content-hosts --export" fails with "Error: undefined method `[]' ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: 6.2.4
Hardware: All
OS: Linux
urgent
urgent vote
Target Milestone: Unspecified
Assignee: Tom McKay
QA Contact: jcallaha
URL:
Whiteboard:
: 1399884 (view as bug list)
Depends On:
Blocks: 1405525
TreeView+ depends on / blocked
 
Reported: 2016-11-11 12:31 UTC by Julio Entrena Perez
Modified: 2021-03-11 14:48 UTC (History)
15 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_csv-2.2.1.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1405525 (view as bug list)
Environment:
Last Closed: 2017-01-26 10:45:25 UTC
Target Upstream Version:


Attachments (Terms of Use)
Hammer logs for the export command (7.91 KB, text/plain)
2016-11-14 08:15 UTC, Tomas Strachota
no flags Details
verification screenshot (207.43 KB, image/png)
2017-01-12 20:37 UTC, jcallaha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17751 0 None None None 2016-12-19 18:59:12 UTC
Red Hat Product Errata RHBA-2017:0197 0 normal SHIPPED_LIVE Satellite 6.2.7 Async Bug Release 2017-01-26 15:38:38 UTC

Description Julio Entrena Perez 2016-11-11 12:31:18 UTC
Description of problem:
If one or more hosts don't have a valid subscription then running "hammer csv content-hosts --export" to save the current assignment of subscriptions fails with error "Error: undefined method `clear' for nil:NilClass"

Version-Release number of selected component (if applicable):
tfm-rubygem-hammer_cli_import-0.11.2-1.el7sat

How reproducible:
Always

Steps to Reproduce:
1. Ensure that at least one content host does not have a valid subscription
2. Run "hammer csv content-hosts --export --file content-hosts-export.csv --itemized-subscriptions"
3.

Actual results:
Error: undefined method `clear' for nil:NilClass

File content-hosts-export.csv only contains the first header line.

Expected results:
Hosts without subscriptions are skipped and output file is successfully created with correct subscription assignments for hosts with valid subscriptions.

Additional info:
Adding option "--continue-on-error" makes no difference.

Comment 2 Tomas Strachota 2016-11-11 14:14:08 UTC
Julio,
can you please attach output of `hammer -d csv content-hosts --export` and relevant part of satellite server logs? That will help us to triage the issue.

Comment 3 Julio Entrena Perez 2016-11-11 17:00:43 UTC
This issue can not be reproduced by removing a subscription from an already entitled host.
This issue can be reproduced by creating a new host ("Hosts" --> "New host") so the host entry is created but the host hasn't registered yet (e.g. it's still being provisioned).

# date && hammer csv content-hosts --export --file content-hosts-export.csv --itemized-subscriptions
Fri 11 Nov 16:51:13 GMT 2016
Error: undefined method `[]' for nil:NilClass

# cat content-hosts-export.csv
Name,Organization,Environment,Content View,Host Collections,Virtual,Host,OS,Arch,Sockets,RAM,Cores,SLA,Products,Subscription Name,Subscription Type,Subscription Quantity,Subscription SKU,Subscription Contract,Subscription Account,Subscription Start,Subscription End

/var/log/foreman/production.log

2016-11-11 16:51:15 [app] [I] Started GET "/api/status" for 10.33.9.40 at 2016-11-11 16:51:15 +0000
2016-11-11 16:51:15 [app] [I] Processing by Api::V2::HomeController#status as JSON
2016-11-11 16:51:15 [app] [I]   Parameters: {"apiv"=>"v2"}
2016-11-11 16:51:15 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:15 [app] [I]   Rendered api/v2/home/status.json.rabl (0.6ms)
2016-11-11 16:51:15 [app] [I] Completed 200 OK in 24ms (Views: 1.3ms | ActiveRecord: 9.1ms)
2016-11-11 16:51:15 [app] [I] Started GET "/api/v2/plugins" for 10.33.9.40 at 2016-11-11 16:51:15 +0000
2016-11-11 16:51:15 [app] [I] Processing by Api::V2::PluginsController#index as JSON
2016-11-11 16:51:15 [app] [I]   Parameters: {"apiv"=>"v2"}
2016-11-11 16:51:15 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:15 [app] [I]   Rendered api/v2/plugins/index.json.rabl within api/v2/layouts/index_layout (1.1ms)
2016-11-11 16:51:15 [app] [I] Completed 200 OK in 25ms (Views: 5.4ms | ActiveRecord: 5.2ms)
2016-11-11 16:51:15 [app] [I] Started GET "/katello/api/organizations?per_page=999999" for 10.33.9.40 at 2016-11-11 16:51:15 +0000
2016-11-11 16:51:15 [app] [I] Processing by Katello::Api::V2::OrganizationsController#index as JSON
2016-11-11 16:51:15 [app] [I]   Parameters: {"per_page"=>"999999", "api_version"=>"v2", "organization"=>{}}
2016-11-11 16:51:16 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:16 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/views/katello/api/v2/organizations/index.json.rabl within api/v2/layouts/index_layout (3.1ms)
2016-11-11 16:51:16 [app] [I] Completed 200 OK in 29ms (Views: 3.8ms | ActiveRecord: 9.1ms)
2016-11-11 16:51:16 [app] [I] Started GET "/katello/api/organizations?per_page=999999&search=name%3D%22ACME%22" for 10.33.9.40 at 2016-11-11 16:51:16 +0000
2016-11-11 16:51:16 [app] [I] Processing by Katello::Api::V2::OrganizationsController#index as JSON
2016-11-11 16:51:16 [app] [I]   Parameters: {"per_page"=>"999999", "search"=>"name=\"ACME\"", "api_version"=>"v2", "organization"=>{}}
2016-11-11 16:51:16 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:16 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/views/katello/api/v2/organizations/index.json.rabl within api/v2/layouts/index_layout (2.8ms)
2016-11-11 16:51:16 [app] [I] Completed 200 OK in 33ms (Views: 4.4ms | ActiveRecord: 11.7ms)
2016-11-11 16:51:16 [app] [I] Started GET "/api/organizations/1/hosts?per_page=999999" for 10.33.9.40 at 2016-11-11 16:51:16 +0000
2016-11-11 16:51:16 [app] [I] Processing by Api::V2::HostsController#index as JSON
2016-11-11 16:51:16 [app] [I]   Parameters: {"per_page"=>"999999", "apiv"=>"v2", "organization_id"=>"1", :host=>{}}
2016-11-11 16:51:16 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:16 [app] [I]   Rendered api/v2/hosts/index.json.rabl within api/v2/layouts/index_layout (706.0ms)
2016-11-11 16:51:16 [app] [I] Completed 200 OK in 771ms (Views: 626.2ms | ActiveRecord: 101.0ms)
2016-11-11 16:51:16 [app] [I] Started GET "/api/hosts/27" for 10.33.9.40 at 2016-11-11 16:51:16 +0000
2016-11-11 16:51:16 [app] [I] Processing by Api::V2::HostsController#show as JSON
2016-11-11 16:51:16 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"27", :host=>{}}
2016-11-11 16:51:17 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:17 [app] [I]   Rendered api/v2/hosts/show.json.rabl (557.2ms)
2016-11-11 16:51:17 [app] [I] Completed 200 OK in 588ms (Views: 527.0ms | ActiveRecord: 40.3ms)
2016-11-11 16:51:17 [app] [I] Started GET "/api/hosts/20" for 10.33.9.40 at 2016-11-11 16:51:17 +0000
2016-11-11 16:51:17 [app] [I] Processing by Api::V2::HostsController#show as JSON
2016-11-11 16:51:17 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"20", :host=>{}}
2016-11-11 16:51:17 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:18 [app] [I]   Rendered api/v2/hosts/show.json.rabl (546.3ms)
2016-11-11 16:51:18 [app] [I] Completed 200 OK in 579ms (Views: 515.0ms | ActiveRecord: 43.2ms)
2016-11-11 16:51:18 [app] [I] Started GET "/api/hosts/28" for 10.33.9.40 at 2016-11-11 16:51:18 +0000
2016-11-11 16:51:18 [app] [I] Processing by Api::V2::HostsController#show as JSON
2016-11-11 16:51:18 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"28", :host=>{}}
2016-11-11 16:51:18 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:18 [app] [I]   Rendered api/v2/hosts/show.json.rabl (504.5ms)
2016-11-11 16:51:18 [app] [I] Completed 200 OK in 536ms (Views: 480.3ms | ActiveRecord: 34.7ms)
2016-11-11 16:51:18 [app] [I] Started GET "/api/hosts/8" for 10.33.9.40 at 2016-11-11 16:51:18 +0000
2016-11-11 16:51:18 [app] [I] Processing by Api::V2::HostsController#show as JSON
2016-11-11 16:51:18 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"8", :host=>{}}
2016-11-11 16:51:18 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:19 [app] [I]   Rendered api/v2/hosts/show.json.rabl (605.9ms)
2016-11-11 16:51:19 [app] [I] Completed 200 OK in 636ms (Views: 576.1ms | ActiveRecord: 38.9ms)
2016-11-11 16:51:19 [app] [I] Started GET "/api/hosts/9" for 10.33.9.40 at 2016-11-11 16:51:19 +0000
2016-11-11 16:51:19 [app] [I] Processing by Api::V2::HostsController#show as JSON
2016-11-11 16:51:19 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"9", :host=>{}}
2016-11-11 16:51:19 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:20 [app] [I]   Rendered api/v2/hosts/show.json.rabl (583.9ms)
2016-11-11 16:51:20 [app] [I] Completed 200 OK in 616ms (Views: 553.7ms | ActiveRecord: 41.9ms)
2016-11-11 16:51:20 [app] [I] Started GET "/api/hosts/3" for 10.33.9.40 at 2016-11-11 16:51:20 +0000
2016-11-11 16:51:20 [app] [I] Processing by Api::V2::HostsController#show as JSON
2016-11-11 16:51:20 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"3", :host=>{}}
2016-11-11 16:51:20 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:20 [app] [I]   Rendered api/v2/hosts/show.json.rabl (640.9ms)
2016-11-11 16:51:20 [app] [I] Completed 200 OK in 674ms (Views: 608.7ms | ActiveRecord: 42.5ms)
2016-11-11 16:51:20 [app] [I] Started GET "/api/hosts/2" for 10.33.9.40 at 2016-11-11 16:51:20 +0000
2016-11-11 16:51:20 [app] [I] Processing by Api::V2::HostsController#show as JSON
2016-11-11 16:51:20 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"2", :host=>{}}
2016-11-11 16:51:20 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:21 [app] [I]   Rendered api/v2/hosts/show.json.rabl (585.5ms)
2016-11-11 16:51:21 [app] [I] Completed 200 OK in 622ms (Views: 550.9ms | ActiveRecord: 47.0ms)
2016-11-11 16:51:21 [app] [I] Started GET "/api/hosts/29" for 10.33.9.40 at 2016-11-11 16:51:21 +0000
2016-11-11 16:51:21 [app] [I] Processing by Api::V2::HostsController#show as JSON
2016-11-11 16:51:21 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"29", :host=>{}}
2016-11-11 16:51:21 [app] [I] Authorized user admin(Admin User)
2016-11-11 16:51:21 [app] [I]   Rendered api/v2/hosts/show.json.rabl (113.0ms)
2016-11-11 16:51:21 [app] [I] Completed 200 OK in 150ms (Views: 95.4ms | ActiveRecord: 30.4ms)

The new host that has not been registered is host 29 ( https://<fqdn>/content_hosts/29/info )

/var/log/candlepin/candlepin.log
2016-11-11 16:51:17,218 [thread=http-bio-8443-exec-7] [req=3e609262-832f-45e4-8b2e-3ebe8e13a754, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/155925f8-b79b-49c0-a9b4-74c8ca8a07d0/compliance
2016-11-11 16:51:17,300 [thread=http-bio-8443-exec-7] [req=3e609262-832f-45e4-8b2e-3ebe8e13a754, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=82
2016-11-11 16:51:17,335 [thread=http-bio-8443-exec-4] [req=43ed6eba-dad7-4934-89d2-0991cd437248, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/155925f8-b79b-49c0-a9b4-74c8ca8a07d0/host
2016-11-11 16:51:17,386 [thread=http-bio-8443-exec-4] [req=43ed6eba-dad7-4934-89d2-0991cd437248, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=204, content-type="null", time=51
2016-11-11 16:51:17,419 [thread=http-bio-8443-exec-2] [req=9d7c859e-0f70-4383-ac62-fb01f48810c3, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/155925f8-b79b-49c0-a9b4-74c8ca8a07d0/guests
2016-11-11 16:51:17,467 [thread=http-bio-8443-exec-2] [req=9d7c859e-0f70-4383-ac62-fb01f48810c3, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=400, content-type="application/json", time=48
2016-11-11 16:51:17,503 [thread=http-bio-8443-exec-5] [req=92604016-3d80-40d8-907b-bd154a434e39, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/155925f8-b79b-49c0-a9b4-74c8ca8a07d0
2016-11-11 16:51:17,577 [thread=http-bio-8443-exec-5] [req=92604016-3d80-40d8-907b-bd154a434e39, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=74
2016-11-11 16:51:17,843 [thread=http-bio-8443-exec-10] [req=dd4da59b-86ed-48fe-880e-1fbaa22a76e8, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/93b06ec7-c661-44a9-af41-67bcaa24a00c/compliance
2016-11-11 16:51:17,912 [thread=http-bio-8443-exec-10] [req=dd4da59b-86ed-48fe-880e-1fbaa22a76e8, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=69
2016-11-11 16:51:17,946 [thread=http-bio-8443-exec-1] [req=dcdc9275-460a-4bd8-9589-2e1bc06298ff, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/93b06ec7-c661-44a9-af41-67bcaa24a00c/host
2016-11-11 16:51:18,013 [thread=http-bio-8443-exec-1] [req=dcdc9275-460a-4bd8-9589-2e1bc06298ff, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=67
2016-11-11 16:51:18,049 [thread=http-bio-8443-exec-8] [req=6ccd3d3c-06fd-43f2-913c-5cb5bfe0c1e7, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/93b06ec7-c661-44a9-af41-67bcaa24a00c/guests
2016-11-11 16:51:18,096 [thread=http-bio-8443-exec-8] [req=6ccd3d3c-06fd-43f2-913c-5cb5bfe0c1e7, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=400, content-type="application/json", time=47
2016-11-11 16:51:18,132 [thread=http-bio-8443-exec-9] [req=a6c8de74-03ed-45d5-ad59-ff64e016ea38, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/93b06ec7-c661-44a9-af41-67bcaa24a00c
2016-11-11 16:51:18,208 [thread=http-bio-8443-exec-9] [req=a6c8de74-03ed-45d5-ad59-ff64e016ea38, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=76
2016-11-11 16:51:18,474 [thread=http-bio-8443-exec-2] [req=cc422ee7-75f1-4312-a7bc-7a3fcc5572ff, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/319996fb-443b-4d89-ae30-3bd670b4ecab/compliance
2016-11-11 16:51:18,531 [thread=http-bio-8443-exec-2] [req=cc422ee7-75f1-4312-a7bc-7a3fcc5572ff, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=57
2016-11-11 16:51:18,564 [thread=http-bio-8443-exec-5] [req=bbd89270-5d37-4bd8-aee0-7c7bcd0f1bda, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/319996fb-443b-4d89-ae30-3bd670b4ecab/host
2016-11-11 16:51:18,620 [thread=http-bio-8443-exec-5] [req=bbd89270-5d37-4bd8-aee0-7c7bcd0f1bda, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=204, content-type="null", time=56
2016-11-11 16:51:18,653 [thread=http-bio-8443-exec-10] [req=ac606f5b-9fa1-4159-8e83-fa889c7b4c5b, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/319996fb-443b-4d89-ae30-3bd670b4ecab/guests
2016-11-11 16:51:18,701 [thread=http-bio-8443-exec-10] [req=ac606f5b-9fa1-4159-8e83-fa889c7b4c5b, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=400, content-type="application/json", time=48
2016-11-11 16:51:18,736 [thread=http-bio-8443-exec-1] [req=d7fbca77-a35c-4dd7-8eb8-f9e023b9683b, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/319996fb-443b-4d89-ae30-3bd670b4ecab
2016-11-11 16:51:18,795 [thread=http-bio-8443-exec-1] [req=d7fbca77-a35c-4dd7-8eb8-f9e023b9683b, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=59
2016-11-11 16:51:19,074 [thread=http-bio-8443-exec-8] [req=f3479a1f-a51a-43d6-b05f-83080d6a4cd9, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/80eb393e-9864-4c91-b585-d8c33de8120d/compliance
2016-11-11 16:51:19,143 [thread=http-bio-8443-exec-8] [req=f3479a1f-a51a-43d6-b05f-83080d6a4cd9, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=69
2016-11-11 16:51:19,177 [thread=http-bio-8443-exec-9] [req=72765657-c555-471d-bc2a-635c73a6b35a, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/80eb393e-9864-4c91-b585-d8c33de8120d/host
2016-11-11 16:51:19,225 [thread=http-bio-8443-exec-9] [req=72765657-c555-471d-bc2a-635c73a6b35a, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=400, content-type="application/json", time=48
2016-11-11 16:51:19,304 [thread=http-bio-8443-exec-3] [req=3d429c71-3648-4aa1-a57d-6e692d78338b, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/80eb393e-9864-4c91-b585-d8c33de8120d/guests
2016-11-11 16:51:19,373 [thread=http-bio-8443-exec-3] [req=3d429c71-3648-4aa1-a57d-6e692d78338b, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=69
2016-11-11 16:51:19,410 [thread=http-bio-8443-exec-6] [req=343dda63-e14b-4653-9b56-c32e7d14d889, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/80eb393e-9864-4c91-b585-d8c33de8120d
2016-11-11 16:51:19,485 [thread=http-bio-8443-exec-6] [req=343dda63-e14b-4653-9b56-c32e7d14d889, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=75
2016-11-11 16:51:19,773 [thread=http-bio-8443-exec-10] [req=b0877d91-e54d-4597-9987-79ed227d0cfa, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/808acaba-52b2-4f26-bceb-1719546a1434/compliance
2016-11-11 16:51:19,845 [thread=http-bio-8443-exec-10] [req=b0877d91-e54d-4597-9987-79ed227d0cfa, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=72
2016-11-11 16:51:19,881 [thread=http-bio-8443-exec-7] [req=b4eee1f1-5ccd-4b0e-a5a1-ab34ac6f5e53, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/808acaba-52b2-4f26-bceb-1719546a1434/host
2016-11-11 16:51:19,929 [thread=http-bio-8443-exec-7] [req=b4eee1f1-5ccd-4b0e-a5a1-ab34ac6f5e53, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=400, content-type="application/json", time=48
2016-11-11 16:51:19,962 [thread=http-bio-8443-exec-4] [req=597dd346-3945-48ae-8860-2e8b82e8b3b1, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/808acaba-52b2-4f26-bceb-1719546a1434/guests
2016-11-11 16:51:20,013 [thread=http-bio-8443-exec-4] [req=597dd346-3945-48ae-8860-2e8b82e8b3b1, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=51
2016-11-11 16:51:20,051 [thread=http-bio-8443-exec-9] [req=da773d89-076c-48b4-90c7-3d8d1e48d845, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/808acaba-52b2-4f26-bceb-1719546a1434
2016-11-11 16:51:20,163 [thread=http-bio-8443-exec-9] [req=da773d89-076c-48b4-90c7-3d8d1e48d845, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=113
2016-11-11 16:51:20,458 [thread=http-bio-8443-exec-3] [req=ba27596d-94eb-44af-a947-ec8e33e69e25, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/0c485f81-aaed-4987-8cc9-e33dfc124d6d/compliance
2016-11-11 16:51:20,540 [thread=http-bio-8443-exec-3] [req=ba27596d-94eb-44af-a947-ec8e33e69e25, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=82
2016-11-11 16:51:20,581 [thread=http-bio-8443-exec-5] [req=52df92f4-ae03-432c-9a5b-81ddc3bd498a, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/0c485f81-aaed-4987-8cc9-e33dfc124d6d/host
2016-11-11 16:51:20,631 [thread=http-bio-8443-exec-5] [req=52df92f4-ae03-432c-9a5b-81ddc3bd498a, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=204, content-type="null", time=50
2016-11-11 16:51:20,665 [thread=http-bio-8443-exec-10] [req=ba836724-f8d9-45ff-b8cb-244d0e0935a3, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/0c485f81-aaed-4987-8cc9-e33dfc124d6d/guests
2016-11-11 16:51:20,714 [thread=http-bio-8443-exec-10] [req=ba836724-f8d9-45ff-b8cb-244d0e0935a3, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=400, content-type="application/json", time=49
2016-11-11 16:51:20,751 [thread=http-bio-8443-exec-7] [req=63fbda01-ed34-4da5-8393-28b4ddac53f1, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/0c485f81-aaed-4987-8cc9-e33dfc124d6d
2016-11-11 16:51:20,887 [thread=http-bio-8443-exec-7] [req=63fbda01-ed34-4da5-8393-28b4ddac53f1, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=136
2016-11-11 16:51:21,196 [thread=http-bio-8443-exec-4] [req=ea0ce59c-1c19-46c1-aa44-afbb2a3e7b4d, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/384bba9e-6725-4d73-ae07-9cf796f97a45/compliance
2016-11-11 16:51:21,264 [thread=http-bio-8443-exec-4] [req=ea0ce59c-1c19-46c1-aa44-afbb2a3e7b4d, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=68
2016-11-11 16:51:21,301 [thread=http-bio-8443-exec-9] [req=5fb48506-fd58-4c0a-b764-359c37b3d102, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/384bba9e-6725-4d73-ae07-9cf796f97a45/host
2016-11-11 16:51:21,350 [thread=http-bio-8443-exec-9] [req=5fb48506-fd58-4c0a-b764-359c37b3d102, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=204, content-type="null", time=49
2016-11-11 16:51:21,384 [thread=http-bio-8443-exec-3] [req=4032db6b-e206-41c6-8220-e112ba672ae4, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/384bba9e-6725-4d73-ae07-9cf796f97a45/guests
2016-11-11 16:51:21,433 [thread=http-bio-8443-exec-3] [req=4032db6b-e206-41c6-8220-e112ba672ae4, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=400, content-type="application/json", time=49
2016-11-11 16:51:21,470 [thread=http-bio-8443-exec-1] [req=de5b3cdf-b78d-44d0-81fd-6d1578913467, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/384bba9e-6725-4d73-ae07-9cf796f97a45
2016-11-11 16:51:21,564 [thread=http-bio-8443-exec-1] [req=de5b3cdf-b78d-44d0-81fd-6d1578913467, org=ACME] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=94

Comment 4 Tomas Strachota 2016-11-14 08:15:59 UTC
Created attachment 1220296 [details]
Hammer logs for the export command

Comment 5 Tomas Strachota 2016-11-14 08:22:36 UTC
Switching to Hosts since there's no better category.

According to hammer logs (attached) the issue lies in processing of server responses in hammer-cli-csv (adding Tom McKay to CC list).

Comment 9 Craig Donnelly 2016-11-30 15:32:35 UTC
*** Bug 1399884 has been marked as a duplicate of this bug. ***

Comment 12 Andrew Kofink 2016-12-19 18:59:08 UTC
Created redmine issue http://projects.theforeman.org/issues/17751 from this bug

Comment 13 jcallaha 2017-01-12 20:35:08 UTC
Verified in Satellite 6.2.7 Snap 1

hammer csv content-hosts --export --file content-hosts-export.csv --itemized-subscriptions

completed successfully on a system with over 22,000 content hosts that have invalid subscriptions. see attached for screenshot of invalid systems.

Comment 14 jcallaha 2017-01-12 20:37:24 UTC
Created attachment 1240126 [details]
verification screenshot

Comment 16 errata-xmlrpc 2017-01-26 10:45:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0197


Note You need to log in before you can comment on or make changes to this bug.