SatelliteQE / broker

The infrastructure middleman

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: `AssertionError: can only join a child process` when trying to run the process in the background

ogajduse opened this issue · comments

$ python -V
Python 3.10.2

$ broker --version
Version: 0.1.35
Broker Directory: /home/ogajduse/repos/broker
Settings File: /home/ogajduse/repos/broker/broker_settings.yaml
Inventory File: /home/ogajduse/repos/broker/inventory.yaml
Log File: /home/ogajduse/repos/broker/logs/broker.log
$ broker extend ogajduse-sat-jenkins-6.11.0-18.0-rhel8.5-118a8f2b ogajduse-sat-jenkins-6.11.0-18.5-rhel8.5-3b881d52 --new-expire-time '2026-12-31 23:59'
[INFO 220513 13:18:05] Using token authentication
[INFO 220513 13:18:06] Using token authentication
[INFO 220513 13:18:07] Extending host None
[INFO 220513 13:18:07] Extending host None
[INFO 220513 13:18:07] Using token authentication
[INFO 220513 13:18:07] Using token authentication
[INFO 220513 13:18:10] Waiting for job: 
    API: https://some-aap.com/api/v2/workflow_jobs/445559/
    UI: https://some-aap.com/#/jobs/workflow/445559/output
[INFO 220513 13:18:10] Waiting for job: 
    API: https://some-aap.com/api/v2/workflow_jobs/445560/
    UI: https://some-aap.com/#/jobs/workflow/445560/output
^C
Ending Broker while running won't end processes being monitored.
Would you like to switch Broker to run in the background?
[y/n]: 
Ending Broker while running won't end processes being monitored.
Would you like to switch Broker to run in the background?
[y/n]: 
Ending Broker while running won't end processes being monitored.
Would you like to switch Broker to run in the background?
[y/n]: y
[INFO 220513 13:18:34] Running broker in the background with pid: 19954

Aborted!
Exception ignored in atexit callback: <function _exit_function at 0x7fd03406a440>
Traceback (most recent call last):
  File "/usr/lib64/python3.10/multiprocessing/util.py", line 357, in _exit_function
    p.join()
  File "/usr/lib64/python3.10/multiprocessing/process.py", line 147, in join
    assert self._parent_pid == os.getpid(), 'can only join a child process'
AssertionError: can only join a child process

This should be resolved in recent versions of Broker now that we're not using multiprocessing-based parallelism.