Problem:
Finally got a virt-who daemon properly configured and reporting to Foreman (1.22). The problem is that after virt-who POSTs the data to rhsm, a task is created within Foreman in the “pending” state that has no running steps, no errors, a open lock on user id 5 (virt_who_reporter_1), and very little in the Raw output. (pasted below)
This task just sits here, never any progress update, can’t find much in logs to see if its actually doing anything (doesn’t appear to be) and no hypervisors listed in content hosts for RHEL subscription management.
I don’t think my issue is with virt-who anymore, but rather what foreman should be doing with the data it received from virt-who.
My project with foreman/katello depends on its ability to manage our RHEL licenses for ESXi hosts, this virt-who functionality is critical. Please help me if you can. I’ll fetch any additional information you need.
Expected outcome:
Eventually, see some content hosts I can associate RHEL licenses to. See any sort of progress on the task output, change from “pending” to running? Something to indicate its doing something.
Foreman and Proxy versions:
Foreman 1.22 / Katello 3.12 / virt-who 0.24-4-1
Foreman and Proxy plugin versions:
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
/etc/virt-who.d/virt-who-config-1.conf:
# cat /etc/virt-who.d/virt-who-config-1.conf
### This configuration file is managed via the virt-who configure plugin
### manual edits will be deleted.
[virt-who-config-1]
type=esx
hypervisor_id=hostname
owner=MYORG
env=Library
server=VSPHEREIPADDRESS
username=MYLOGIN
encrypted_password=LONGPWHASH
rhsm_hostname=FQDN_FOREMAN
rhsm_username=virt_who_reporter_1
rhsm_encrypted_password=LONGPWHASH
rhsm_prefix=/rhsm
#
Final couple lines from virt-who interval execution, seems like virt-who is pulling the correct info from vSphere and POST’ing it back to foreman/rhsm, gets a 200.
<Lots of ESXi host info removed>
2019-08-19 12:00:48,366 [rhsm.connection DEBUG] MainProcess(615):Thread-3 @connection.py:_request:545 - Making request: POST /rhsm/hypervisors/intralinks?reporter_id=bsdv4vlcm01.ilnx.com-43860f2762b4429fa7b7ae8d0fa2b2b6&cloaked=False&env=Library
2019-08-19 12:00:49,018 [rhsm.connection INFO] MainProcess(615):Thread-3 @connection.py:_request:588 - Response: status=200, request="POST /rhsm/hypervisors/intralinks?reporter_id=bsdv4vlcm01.ilnx.com-43860f2762b4429fa7b7ae8d0fa2b2b6&cloaked=False&env=Library"
/var/log/foreman/production.log during virt-who run:
2019-08-19T10:44:04 [I|app|6145eda4] Started GET "/rhsm/status/" for MY_IP_ADDRESS at 2019-08-19 10:44:04 -0400
2019-08-19T10:44:04 [I|app|6145eda4] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2019-08-19T10:44:04 [I|app|6145eda4] Completed 200 OK in 55ms (Views: 1.1ms | ActiveRecord: 4.0ms)
2019-08-19T10:44:04 [I|app|c88ee523] Started GET "/rhsm/status" for MY_IP_ADDRESS at 2019-08-19 10:44:04 -0400
2019-08-19T10:44:04 [I|app|c88ee523] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2019-08-19T10:44:04 [I|app|c88ee523] Completed 200 OK in 51ms (Views: 1.2ms | ActiveRecord: 4.5ms)
2019-08-19T10:44:05 [I|app|45ae62a0] Started POST "/rhsm/hypervisors/MY_ORGANIZATION?reporter_id=[FILTERED]&cloaked=False&env=Library" for MY_IP_ADDRESS at 2019-08-19 10:44:05 -0400
2019-08-19T10:44:05 [I|app|45ae62a0] Processing by Katello::Api::Rhsm::CandlepinProxiesController#async_hypervisors_update as JSON
2019-08-19T10:44:05 [I|app|45ae62a0] Parameters: {"reporter_id"=>"[FILTERED]", "cloaked"=>"False", "env"=>"Library", "owner"=>"MY_ORGANIZATION"}
2019-08-19T10:44:05 [I|kat|45ae62a0] Authorized user virt_who_reporter_1(virt_who_reporter_1)
2019-08-19T10:44:05 [I|bac|45ae62a0] Task {label: Actions::Katello::Host::Hypervisors, id: 5c910ea8-d009-4694-9ad4-afab852b8f94, execution_plan_id: 5345bd12-e154-4ec1-a7d5-85c7fefc19e4} state changed: planning
2019-08-19T10:44:05 [I|bac|] Task {label: Actions::Katello::Host::Hypervisors, id: 5c910ea8-d009-4694-9ad4-afab852b8f94, execution_plan_id: 5345bd12-e154-4ec1-a7d5-85c7fefc19e4} state changed: planned
2019-08-19T10:44:05 [I|app|] Completed 200 OK in 596ms (Views: 0.9ms | ActiveRecord: 80.8ms)
2019-08-19T10:45:53 [I|app|1fad1a54] Started GET "/rhsm/status/" for MY_IP_ADDRESS at 2019-08-19 10:45:53 -0400
2019-08-19T10:45:53 [I|app|1fad1a54] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2019-08-19T10:45:53 [I|app|1fad1a54] Completed 200 OK in 60ms (Views: 1.2ms | ActiveRecord: 4.6ms)
2019-08-19T10:45:53 [I|app|f1460692] Started GET "/rhsm/status" for MY_IP_ADDRESS at 2019-08-19 10:45:53 -0400
2019-08-19T10:45:53 [I|app|f1460692] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2019-08-19T10:45:53 [I|app|f1460692] Completed 200 OK in 50ms (Views: 1.1ms | ActiveRecord: 3.9ms)
2019-08-19T10:45:53 [I|app|92378037] Started POST "/rhsm/hypervisors/MY_ORGANIZATION?reporter_id=[FILTERED]&cloaked=False&env=Library" for MY_IP_ADDRESS at 2019-08-19 10:45:53 -0400
2019-08-19T10:45:53 [I|app|92378037] Processing by Katello::Api::Rhsm::CandlepinProxiesController#async_hypervisors_update as JSON
2019-08-19T10:45:53 [I|app|92378037] Parameters: {"reporter_id"=>"[FILTERED]", "cloaked"=>"False", "env"=>"Library", "owner"=>"MY_ORGANIZATION"}
2019-08-19T10:45:53 [I|kat|92378037] Authorized user virt_who_reporter_1(virt_who_reporter_1)
2019-08-19T10:45:53 [I|bac|92378037] Task {label: Actions::Katello::Host::Hypervisors, id: 46dab7ad-59f6-4825-8706-59bcf9ebc0c0, execution_plan_id: d820ebb3-4a9d-442a-ac71-e04d82434fb9} state changed: planning
2019-08-19T10:45:53 [I|bac|] Task {label: Actions::Katello::Host::Hypervisors, id: 46dab7ad-59f6-4825-8706-59bcf9ebc0c0, execution_plan_id: d820ebb3-4a9d-442a-ac71-e04d82434fb9} state changed: planned
2019-08-19T10:45:53 [I|app|] Completed 200 OK in 335ms (Views: 0.6ms | ActiveRecord: 40.6ms)
2019-08-19T11:10:45 [I|app|04472bef] Started GET "/foreman_tasks/api/tasks?search=action~organization+%27MY_ORGANIZATION%27+and+result%3Dpending+and+label%3DActions::Katello::Organization::ManifestImport+or+Actions::Katello::Organization::ManifestRefresh+or+Actions::Katello::Organization::ManifestDelete+or+Actions::Katello::UpstreamSubscriptions::BindEntitlements+or+Actions::Katello::UpstreamSubscriptions::UpdateEntitlement+or+Actions::Katello::UpstreamSubscriptions::RemoveEntitlements+or+Actions::Katello::UpstreamSubscriptions::UpdateEntitlements" for MY_CLIENT_ADDRESS at 2019-08-19 11:10:45 -0400
2019-08-19T11:10:45 [I|app|04472bef] Processing by ForemanTasks::Api::TasksController#index as JSON
2019-08-19T11:10:45 [I|app|04472bef] Parameters: {"search"=>"action~organization 'MY_ORGANIZATION' and result=pending and label=Actions::Katello::Organization::ManifestImport or Actions::Katello::Organization::ManifestRefresh or Actions::Katello::Organization::ManifestDelete or Actions::Katello::UpstreamSubscriptions::BindEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlement or Actions::Katello::UpstreamSubscriptions::RemoveEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlements"}
2019-08-19T11:10:45 [I|app|04472bef] Current user set to admin (admin)