-
Sub-task
-
Resolution: Done
-
Normal
-
None
-
None
Description of problem:
deploy virt-who config successfully but get the "unknown" status
Version-Release number of selected component (if applicable):
satellite6.14.3 snapshot2.0
How reproducible:
100%
Steps to Reproduce:
1. Create a virt-who config
2. deploy the virt-who config and get the correct mapping info in /var/log/rhsm/rhsm.log
[root@ip-10-0-167-2 ~]# hammer virt-who-config deploy --id 1 --organization-id 1
== [1/5] Installing virt-who ==
Running unlocking of package versions
================================================================================
Unlock packages: [OK]
--------------------------------------------------------------------------------
Running ForemanMaintain::Scenario
================================================================================
Install packages: [OK]
--------------------------------------------------------------------------------
Running locking of package versions
================================================================================
Lock packages: [OK]
--------------------------------------------------------------------------------
== [2/5] Encrypting password ==
== [3/5] Creating virt-who configuration ==
== [4/5] Creating sysconfig virt-who configuration ==
== [5/5] Enabling and restarting the virt-who service ==
Created symlink /etc/systemd/system/multi-user.target.wants/virt-who.service → /usr/lib/systemd/system/virt-who.service.
== Finished ==
Finished successfully
2024-03-28 06:25:32,214 [virtwho.parser WARNING] MainProcess(25215):MainThread @parser.py:read_config_env_variables:237 - The use of environment variables and the use of the sysconfig file to configure virt-who are deprecated. Their use will be ignored in the next major release.
2024-03-28 06:25:32,245 [virtwho.rhsm_log DEBUG] MainProcess(25215):MainThread @config.py:init_config:1594 - [global]: Value for "print_" not set, using default: False
2024-03-28 06:25:32,245 [virtwho.rhsm_log DEBUG] MainProcess(25215):MainThread @config.py:init_config:1594 - [global]: Value for "log_per_config" not set, using default: False
2024-03-28 06:25:32,245 [virtwho.rhsm_log DEBUG] MainProcess(25215):MainThread @config.py:init_config:1594 - [global]: Value for "configs" not set, using default: []
2024-03-28 06:25:32,246 [virtwho.rhsm_log DEBUG] MainProcess(25215):MainThread @config.py:init_config:1594 - [global]: Value for "reporter_id" not set, using default: ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com-01b47dcfcb30a7b8e3755a6f8532212f
2024-03-28 06:25:32,246 [virtwho.rhsm_log DEBUG] MainProcess(25215):MainThread @config.py:init_config:1594 - [global]: Value for "log_file" not set, using default: rhsm.log
2024-03-28 06:25:32,246 [virtwho.rhsm_log DEBUG] MainProcess(25215):MainThread @config.py:init_config:1594 - [global]: Value for "log_dir" not set, using default: /var/log/rhsm
2024-03-28 06:25:32,246 [virtwho.rhsm_log WARNING] MainProcess(25215):MainThread @config.py:init_config:1594 - [global]: Ignoring unknown configuration option "no_proxy"
2024-03-28 06:25:32,246 [virtwho.rhsm_log DEBUG] MainProcess(25215):MainThread @config.py:init_config:1594 - [virt-who-config-1]: Value for "simplified_vim" not set, using default: True
2024-03-28 06:25:32,246 [virtwho.rhsm_log INFO] MainProcess(25215):MainThread @executor.py:_init_:54 - Using config named 'virt-who-config-1'
2024-03-28 06:25:32,246 [virtwho.rhsm_log INFO] MainProcess(25215):MainThread @main.py:main:176 - Using configuration "virt-who-config-1" ("esx" mode)
2024-03-28 06:25:32,246 [virtwho.rhsm_log INFO] MainProcess(25215):MainThread @main.py:main:178 - Using reporter_id='ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com-01b47dcfcb30a7b8e3755a6f8532212f'
2024-03-28 06:25:32,248 [virtwho.main DEBUG] MainProcess(25215):MainThread @executor.py:run:187 - Starting infinite loop with 7200 seconds interval
2024-03-28 06:25:32,255 [rhsm.https DEBUG] MainProcess(25215):MainThread @https.py:<module>:56 - Using standard libs to provide httplib and ssl
2024-03-28 06:25:32,270 [virtwho.main DEBUG] MainProcess(25215):Thread-2 @virt.py:run:407 - Thread 'virt-who-config-1' started
2024-03-28 06:25:32,270 [virtwho.main DEBUG] MainProcess(25215):Thread-2 @esx.py:_prepare:136 - Log into ESX
2024-03-28 06:25:32,271 [virtwho.destination_4089048013409708749 DEBUG] MainProcess(25215):Thread-3 @virt.py:run:407 - Thread 'destination_4089048013409708749' started
2024-03-28 06:25:33,876 [virtwho.main DEBUG] MainProcess(25215):Thread-2 @esx.py:_prepare:139 - Creating ESX event filter
2024-03-28 06:25:34,198 [virtwho.main DEBUG] MainProcess(25215):Thread-2 @esx.py:_run:170 - calling esx service
2024-03-28 06:25:34,563 [virtwho.main INFO] MainProcess(25215):Thread-2 @virt.py:_send_data:986 - Report for config "virt-who-config-1" gathered, placing in datastore
2024-03-28 06:25:35,275 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_init_:211 - Environment variable NO_PROXY= will be used
2024-03-28 06:25:35,275 [virtwho.destination_4089048013409708749 DEBUG] MainProcess(25215):Thread-3 @subscriptionmanager.py:_connect:148 - Authenticating with RHSM username virt_who_reporter_1
2024-03-28 06:25:35,275 [virtwho.destination_4089048013409708749 INFO] MainProcess(25215):Thread-3 @subscriptionmanager.py:_connect:159 - X-Correlation-ID: 27e4c3d250064e5a9998cdbc7ac1e113
2024-03-28 06:25:35,277 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_init_:310 - Connection built: host=ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com port=443 handler=/rhsm auth=basic username=virt_who_reporter_1
2024-03-28 06:25:35,278 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:779 - Making request: GET /rhsm/status/
2024-03-28 06:25:35,322 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_update_smoothed_response_time:884 - Response time: 0.007632255554199219, Smoothed response time: 0.007632255554199219
2024-03-28 06:25:35,322 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:861 - Response: status=200, request="GET /rhsm/status/"
2024-03-28 06:25:35,323 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:779 - Making request: GET /rhsm/status
2024-03-28 06:25:35,360 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_update_smoothed_response_time:884 - Response time: 0.0062830448150634766, Smoothed response time: 0.007497334480285644
2024-03-28 06:25:35,360 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:861 - Response: status=200, request="GET /rhsm/status"
2024-03-28 06:25:35,360 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_load_manager_capabilities:1112 - Server has the following capabilities: ['instance_multiplier', 'derived_product', 'vcpu', 'cert_v3', 'hypervisors_heartbeat', 'remove_by_pool_id', 'syspurpose', 'storage_band', 'cores', 'multi_environment', 'hypervisors_async', 'org_level_content_access', 'guest_limit', 'ram', 'batch_bind', 'combined_reporting']
2024-03-28 06:25:35,360 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:779 - Making request: PUT /rhsm/hypervisors/Default_Organization/heartbeat?reporter_id=ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com-01b47dcfcb30a7b8e3755a6f8532212f
2024-03-28 06:25:35,563 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_update_smoothed_response_time:884 - Response time: 0.0062749385833740234, Smoothed response time: 0.007375094890594482
2024-03-28 06:25:35,563 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:861 - Response: status=200, request="PUT /rhsm/hypervisors/Default_Organization/heartbeat?reporter_id=ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com-01b47dcfcb30a7b8e3755a6f8532212f"
2024-03-28 06:25:35,564 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_init_:211 - Environment variable NO_PROXY= will be used
2024-03-28 06:25:35,565 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_init_:310 - Connection built: host=ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com port=443 handler=/rhsm auth=basic username=virt_who_reporter_1
2024-03-28 06:25:35,565 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:779 - Making request: GET /rhsm/status/
2024-03-28 06:25:35,564 [virtwho.destination_4089048013409708749 INFO] MainProcess(25215):Thread-3 @virt.py:_send_data:651 - Hosts-to-guests mapping for config "virt-who-config-1": 4 hypervisors and 9 guests found
2024-03-28 06:25:35,564 [virtwho.destination_4089048013409708749 INFO] MainProcess(25215):Thread-3 @virt.py:_send_data:687 - Sending updated Host-to-guest mapping to "Default_Organization" including 4 hypervisors and 9 guests
2024-03-28 06:25:35,564 [virtwho.destination_4089048013409708749 DEBUG] MainProcess(25215):Thread-3 @subscriptionmanager.py:_connect:148 - Authenticating with RHSM username virt_who_reporter_1
2024-03-28 06:25:35,564 [virtwho.destination_4089048013409708749 INFO] MainProcess(25215):Thread-3 @subscriptionmanager.py:_connect:159 - X-Correlation-ID: 27e4c3d250064e5a9998cdbc7ac1e113
2024-03-28 06:25:35,605 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_update_smoothed_response_time:884 - Response time: 0.006645679473876953, Smoothed response time: 0.006645679473876953
2024-03-28 06:25:35,605 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:861 - Response: status=200, request="GET /rhsm/status/"
2024-03-28 06:25:35,605 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:779 - Making request: GET /rhsm/status
2024-03-28 06:25:35,605 [virtwho.destination_4089048013409708749 DEBUG] MainProcess(25215):Thread-3 @subscriptionmanager.py:_is_rhsm_server_async:292 - Checking if server has capability 'hypervisor_async'
2024-03-28 06:25:35,640 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_update_smoothed_response_time:884 - Response time: 0.006272315979003906, Smoothed response time: 0.006608343124389649
2024-03-28 06:25:35,641 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:861 - Response: status=200, request="GET /rhsm/status"
2024-03-28 06:25:35,641 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_load_manager_capabilities:1112 - Server has the following capabilities: ['instance_multiplier', 'derived_product', 'vcpu', 'cert_v3', 'hypervisors_heartbeat', 'remove_by_pool_id', 'syspurpose', 'storage_band', 'cores', 'multi_environment', 'hypervisors_async', 'org_level_content_access', 'guest_limit', 'ram', 'batch_bind', 'combined_reporting']
2024-03-28 06:25:35,642 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:779 - Making request: POST /rhsm/hypervisors/Default_Organization?env=&cloaked=False&reporter_id=ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com-01b47dcfcb30a7b8e3755a6f8532212f
2024-03-28 06:25:35,641 [virtwho.destination_4089048013409708749 DEBUG] MainProcess(25215):Thread-3 @subscriptionmanager.py:_is_rhsm_server_async:296 - Server has capability 'hypervisors_async'
2024-03-28 06:25:35,642 [virtwho.destination_4089048013409708749 DEBUG] MainProcess(25215):Thread-3 @subscriptionmanager.py:hypervisorCheckIn:213 - Host-to-guest mapping being sent to 'Default_Organization': {
"hypervisors": [
{
"hypervisorId":
,
"name": "bootp-73-213-144.lab.eng.pek2.redhat.com",
"guestIds": [
{
"guestId": "423bd245-0e9d-d482-955c-495fd8e21f3f",
"state": 1,
"attributes":
},
{
"guestId": "c56c3b42-c106-a838-f680-a62f9a7e0144",
"state": 1,
"attributes":
}
],
"facts":
},
{
"hypervisorId":
,
"name": "vm-212-147.lab.eng.pek2.redhat.com",
"guestIds": [
{
"guestId": "423b5f04-6966-2fd3-fc68-c2696a537cce",
"state": 1,
"attributes":
},
{
"guestId": "8df43b42-738e-88a6-2bd6-b8413bdf4437",
"state": 5,
"attributes":
},
{
"guestId": "f2bc3b42-1c7d-c4e6-325c-b2d7ac5fc22b",
"state": 1,
"attributes":
},
{
"guestId": "fb633b42-78f1-5ec3-da83-5971d5b919a6",
"state": 5,
"attributes":
}
],
"facts":
},
{
"hypervisorId":
,
"name": "bootp-73-213-211.lab.eng.pek2.redhat.com",
"guestIds": [
{
"guestId": "423b3dcf-23ab-bb56-2bff-0b6aae4e9528",
"state": 1,
"attributes":
},
{
"guestId": "c25b3b42-d6d0-5ccb-e92b-c7b7018a6565",
"state": 1,
"attributes":
}
],
"facts":
},
{
"hypervisorId":
,
"name": "vm-212-255.lab.eng.pek2.redhat.com",
"guestIds": [
{
"guestId": "564d9498-c6bf-1bd4-1b08-5494679c2e83",
"state": 1,
"attributes":
}
],
"facts":
}
]
}
2024-03-28 06:25:35,986 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_update_smoothed_response_time:884 - Response time: 0.006619453430175781, Smoothed response time: 0.006609454154968262
2024-03-28 06:25:35,986 [rhsm.connection DEBUG] MainProcess(25215):Thread-3 @connection.py:_request:861 - Response: status=200, request="POST /rhsm/hypervisors/Default_Organization?env=&cloaked=False&reporter_id=ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com-01b47dcfcb30a7b8e3755a6f8532212f"
3. check the status of the virt-who config by cli and api
[root@ip-10-0-167-2 ~]# hammer virt-who-config info --id 1
General information:
Id: 1
Name: esx_ui
Hypervisor type: esx
Hypervisor server: 10.73.213.123
Hypervisor username: administrator@vsphere.local
Status: No Report Yet ------------> it display the wrong status
Schedule:
Interval: every 2 hours
Last Report At:
Connection:
Satellite server: ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com
Hypervisor ID: hostname
Filtering: Unlimited
Filter host parents:
Exclude host parents:
Debug mode: yes
Ignore proxy:
HTTP Proxy:
By API:
[root@ip-10-0-167-2 ~]# curl -X GET -k -u admin:admin https://ip-10-0-167-2.rhos-01.prod.psi.rdu2.redhat.com/foreman_virt_who_configure/api/v2/organizations/1/configs
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort":
,
"results": [
]
}
"status":"unknown"
Actual results:
The API virt-who status display "unknown"
The CLI virt-who config status display "No Report Yet"
Expected results:
The API virt-who status display "ok"
The CLI virt-who config status display "OK"
Additional info:
DEV Tracker for https://issues.redhat.com/browse/SAT-24223
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2272036