Actions
Bug #17756
closed"hammer csv content-hosts --export" fails with "Error: undefined method `[]' for nil:NilClass" if any host doesn't have a valid subscription
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1405525
++ This bug was initially created as a clone of Bug #1394218 ++
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.
--- Additional comment from pm-rhel@redhat.com on 20161111T12:52:28
Since this issue was entered in Red Hat Bugzilla, the pm_ack has been
set to + automatically for the next planned release
--- Additional comment from tstrachota@redhat.com on 20161111T14:14:08
Julio,
can you please attach output of `hammer -d csv content-hosts --export` and relevant part of server logs? That will help us to triage the issue.
--- Additional comment from jentrena@redhat.com on 20161111T17:00:43
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
--- Additional comment from tstrachota@redhat.com on 20161114T08:15:59
Created attachment 1220296
Hammer logs for the export command
--- Additional comment from tstrachota@redhat.com on 20161114T08:22:36
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).
--- Additional comment from ktordeur@redhat.com on 20161124T11:40:19
Hi,
Any update on this?
Thanks
--- Additional comment from mhulan@redhat.com on 20161124T12:30:22
just redirecting the need info to the person who might know more
--- Additional comment from jentrena@redhat.com on 20161128T11:04:17
We choke when we come across a host that has been created but not yet provisioned.
It seems that we need some error handling to ignore these hosts (they have no subs attached) and carry on with the rest.
--- Additional comment from cdonnell@redhat.com on 20161130T15:32:35
- Bug 1399884 has been marked as a duplicate of this bug. ***
--- Additional comment from tstrachota@redhat.com on 20161202T14:03:02
This is already fixed in upstream:
https://github.com/Katello/hammer-cli-csv/commit/660e2ae48e7b7682e6300c1587a77bd61652e842#diff-9698f2c095c029cd068542138d03b6d5R388
It was fixed with rather a large patch for different issue which I don't think we should backport. The fix for 6.2 will be a one-liner.
Mike do we want it into 6.2.z?
Updated by Andrew Kofink about 8 years ago
- Subject changed from "hammer csv content-hosts --export" fails with "Error: undefined method `[]' for nil:NilClass" if any host doesn't have a valid subscription to "hammer csv content-hosts --export" fails with "Error: undefined method `[]' for nil:NilClass" if any host doesn't have a valid subscription
- Status changed from New to Duplicate
- Translation missing: en.field_release set to 166
Duplicates #16852
Actions