robottelo
robottelo copied to clipboard
Add logging to Satellite-xdist worker assignment process
Problem Statement
There were situations in the past where I would be more than grateful for a context of what is happening in align_to_satellite
fixture.
Solution
This PR adds logging to the fixture. That should help during the log investigation.
Related Issues
none
trigger: test-robottelo
PRT Result
Build Number: 6221
Build Status: SUCCESS
PRT Comment: pytest /opt/app-root/src/robottelo/tests/foreman -v -m build_sanity --external-logging
Test Result : ======== 11 passed, 6093 deselected, 85 warnings in 1787.94s (0:29:47) =========
trigger: test-robottelo pytest: -m build_sanity -n2
PRT Result
Build Number: 6234
Build Status: UNSTABLE
PRT Comment: pytest -m build_sanity -n2 --external-logging
Test Result : ======= 4 failed, 3 passed, 70 warnings, 4 errors in 1789.11s (0:29:49) ========
trigger: test-robottelo pytest: tests/foreman -n2 -k 'test_negative_list_ignored_by_name[memoryfree] or test_positive_ping[root]'
In robottelo_gw0.log
in the artifacts of build 6235, I see:
2024-03-28 10:17:06 - gw0 - robottelo - INFO - gw0: Attempting to add Satellite hosts using inventory filter: 'sat-jenkins' in @inv.name
2024-03-28 10:17:06 - gw0 - broker - DEBUG - Broker instantiated with kwargs={'host_class': <class 'robottelo.hosts.Satellite'>}
2024-03-28 10:17:06 - gw0 - robottelo - DEBUG - Found 0 instances from inventory by filter: 'sat-jenkins' in @inv.name
2024-03-28 10:17:06 - gw0 - robottelo - DEBUG - gw0: settings.server.xdist_behavior='on-demand', settings.server.hostnames=<BoxList: []>, settings.server.auto_checkin=True
.
.
.
2024-03-28 10:28:01 - gw0 - robottelo - INFO - xdist worker gw0 is checking in on-demand Satellite yes-this-was-redacted.com
PRT Result
Build Number: 6240
Build Status: SUCCESS
PRT Comment: pytest tests/foreman -n2 -k test_negative_list_ignored_by_name[memoryfree] or test_positive_ping[root] --external-logging
Test Result : ================== 2 passed, 9 warnings in 772.00s (0:12:51) ===================
PRT Result
Build Number: 6242
Build Status: SUCCESS
PRT Comment: pytest tests/foreman -n2 -k test_negative_list_ignored_by_name[memoryfree] or test_positive_ping[root] --external-logging
Test Result : ================== 2 passed, 9 warnings in 863.37s (0:14:23) ===================
PRT Result
Build Number: 6245
Build Status: SUCCESS
PRT Comment: pytest tests/foreman -n2 -k test_negative_list_ignored_by_name[memoryfree] or test_positive_ping[root] --external-logging
Test Result : ================== 2 passed, 9 warnings in 784.18s (0:13:04) ===================
trigger: test-robottelo pytest: tests/foreman -n2 -k 'test_negative_list_ignored_by_name[memoryfree] or test_positive_ping[root]'
PRT Result
Build Number: 6488
Build Status: SUCCESS
PRT Comment: pytest tests/foreman -n2 -k test_negative_list_ignored_by_name[memoryfree] or test_positive_ping[root] --external-logging
Test Result : ================ 2 passed, 11025 warnings in 756.29s (0:12:36) =================
2024-04-12 15:28:36 - gw1 - robottelo - INFO - worker_id='gw1': Attempting to add Satellite hosts using inventory filter: 'sat-jenkins' in @inv.name
2024-04-12 15:28:36 - gw1 - robottelo - DEBUG - worker_id='gw1': settings.server.xdist_behavior='on-demand', settings.server.hostnames=<BoxList: []>, settings.server.auto_checkin=True
2024-04-12 15:37:56 - gw1 - robottelo - INFO - worker_id='gw1': Worker was assigned hostname the.host.acme.corp
2024-04-12 15:38:02 - gw1 - robottelo - INFO - worker_id='gw1': Checking in on-demand Satellite the.host.acme.corp