Actions
Bug #21301
closedcert-based auth causes hypervisor checkin to fail
Difficulty:
easy
Triaged:
Bugzilla link:
Description
Using cert based auth (that is leaving out the rhsm_username option), causes the hypervisor checkin to fail, as /lib/actions/foreman_virt_who_configure/config/report.rb is expecting an actual user to be set.
Steps to Reproduce: 1. Have a client with virt-who registered to capsule and VMWare ESX 2. Run virt-who to report data from ESX7 [root@client ~]# virt-who --one-shot --debug 3. Tail logs on Satellite Actual results: ==> /var/log/foreman/production.log <== 2017-10-10 08:33:37 681d0b61 [app] [I] Completed 200 OK in 480ms (Views: 0.3ms | ActiveRecord: 22.4ms) 2017-10-10 08:33:37 01a08f78 [app] [I] Started GET "/rhsm/status/" for 192.168.122.183 at 2017-10-10 08:33:37 -0400 2017-10-10 08:33:37 01a08f78 [app] [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON 2017-10-10 08:33:37 01a08f78 [app] [I] Completed 200 OK in 17ms (Views: 0.3ms | ActiveRecord: 0.0ms) 2017-10-10 08:33:37 8c1b4068 [app] [I] Started GET "/rhsm/jobs/hypervisor_update_e7ed7bed-b8e9-4ddf-8852-4830c8c91b0a?result_data=True" for 192.168.122.183 at 2017-10-10 08:33:37 -0400 2017-10-10 08:33:37 8c1b4068 [app] [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON 2017-10-10 08:33:37 8c1b4068 [app] [I] Parameters: {"result_data"=>"True", "jobId"=>"hypervisor_update_e7ed7bed-b8e9-4ddf-8852-4830c8c91b0a"} 2017-10-10 08:33:37 8c1b4068 [app] [I] Current user: c02fdff1-08fd-4324-a7bc-feab94262ea7 (regular user) 2017-10-10 08:33:37 8c1b4068 [app] [I] Completed 200 OK in 25ms (Views: 0.1ms | ActiveRecord: 0.5ms) 2017-10-10 08:33:38 [foreman-tasks/action] [E] Couldn't find User without an ID (ActiveRecord::RecordNotFound) | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/relation/finder_methods.rb:421:in `find_with_ids' | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/relation/finder_methods.rb:71:in `find' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/app/lib/actions/middleware/keep_current_user.rb:50:in `restore_curent_user' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/app/lib/actions/middleware/keep_current_user.rb:28:in `run' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware/stack.rb:22:in `call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware/stack.rb:26:in `pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware.rb:17:in `pass'
Updated by The Foreman Bot about 7 years ago
- Pull request https://github.com/theforeman/foreman_virt_who_configure/pull/73 added
Updated by Marek Hulán about 7 years ago
- Status changed from New to Closed
- Translation missing: en.field_release set to 319
Actions