RuntimeError: cannot reuse already awaited coroutine

Bug #2055328 reported by Andre Ruiz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Snap
Triaged
Undecided
Unassigned

Bug Description

I have been seeing this error/warning in many deployments lately. They do not seem to be harmful as the deployment just goes on and does finish (or at least does not fail because of this). It can appear in different places in the workflow (in this particular case it was right after adding the hypervisor unit but I have seen it much sooner like during deployment of the control plane services or even when adding microk8s to the unit).

13:51:42 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (19/31)
13:52:04 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (24/31)
13:52:22 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (30/31)
13:53:08 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (31/31)
13:54:16 > Configure MySQL ...
13:54:16 > Patch LoadBalancer service annotations ...
13:54:16 > Initializing Terraform from provider mirror ...
13:54:16 > Deploying OpenStack Hypervisor ...
13:54:16 > Adding Openstack Hypervisor unit to machine(s) ... Task was destroyed but it is pending!
13:54:16 task: <Task pending name='Task-66204' coro=<Connection._pinger.<locals>._do_ping() running at /snap/openstack/426/lib/python3.10/site-packages/juju/client/connection.py:602> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[create_task_with_handler.<locals>._task_result_exp_handler(task_name='tmp', logger=<Logger juju....ction (ERROR)>)() at /snap/openstack/426/lib/python3.10/site-packages/juju/jasyncio.py:39]>
13:54:16 > Adding Openstack Hypervisor unit to machine(s) ... Task tmp raised an exception: cannot reuse already awaited coroutine
13:54:16 Traceback (most recent call last):
13:54:16 File "/snap/openstack/426/lib/python3.10/site-packages/juju/jasyncio.py", line 41, in _task_result_exp_handler
13:54:16 task.result()
13:54:16 RuntimeError: cannot reuse already awaited coroutine

Revision history for this message
Chris Johnston (cjohnston) wrote :

Seeing this during a cluster join:

Disks to attach to MicroCeph (comma separated list): /dev/sda3
⠙ Adding Openstack Hypervisor unit to machine(s) ... Task was destroyed but it is pending!
task: <Task pending name='Task-59' coro=<Connection._pinger.<locals>._do_ping() done, defined at /snap/openstack/462/lib/python3.10/site-packages/juju/client/connection.py:599> wait_for=<Future cancelled> cb=[create_task_with_handler.<locals>._task_result_exp_handler(task_name='tmp', logger=<Logger juju....ction (ERROR)>)() at /snap/openstack/462/lib/python3.10/site-packages/juju/jasyncio.py:39]>
Task tmp raised an exception: cannot reuse already awaited coroutine
Traceback (most recent call last):
  File "/snap/openstack/462/lib/python3.10/site-packages/juju/jasyncio.py", line 41, in _task_result_exp_handler
    task.result()
RuntimeError: cannot reuse already awaited coroutine

Changed in snap-openstack:
status: New → Confirmed
Revision history for this message
Andre Ruiz (andre-ruiz) wrote :

Yeah, it seems harmless but I'm still not sure.

Revision history for this message
Nobuto Murata (nobuto) wrote :

Seconded. It seems not harmful but still it's a user visible traceback. It doesn't happen always though.

$ sunbeam cluster join --role control --role compute --role storage --token eyJuYW1lIjoic3VuYmVhbS0yLmxvY2FsZG9tYWluIiwic2VjcmV0IjoiZTY1
YmZkMTE2OWE1MTdiMGI1OGZiMjNhZTM1NmVjMmJmZjJiZmZiMmVhMmE5YThiNTc1NWVlMTI1ZTFjZTIxMiIsImZpbmdlcnByaW50IjoiOTE3YmNiMzlkZjg5OWZjOGY2MjZhN2JhNGQ4NzYxNmMzMmQwNjdlZjcwMDQ0ZTEwNDcxMjBkZTNjN
jc1N2RlMSIsImpvaW5fYWRkcmVzc2VzIjpbIjEwLjAuMTIzLjE5Mjo3MDAwIl19
⠴ Adding Openstack Hypervisor unit to machine(s) ... Task was destroyed but it is pending!
task: <Task pending name='Task-59' coro=<Connection._pinger.<locals>._do_ping() running at /snap/openstack/505/lib/python3.10/site-packages/juju/client/connection.py:602> wait_for=<
Future pending cb=[Task.task_wakeup()]> cb=[create_task_with_handler.<locals>._task_result_exp_handler(task_name='tmp', logger=<Logger juju....ction (ERROR)>)() at /snap/openstack/5
05/lib/python3.10/site-packages/juju/jasyncio.py:39]>
Task tmp raised an exception: cannot reuse already awaited coroutine
Traceback (most recent call last):
  File "/snap/openstack/505/lib/python3.10/site-packages/juju/jasyncio.py", line 41, in _task_result_exp_handler
    task.result()
RuntimeError: cannot reuse already awaited coroutine
Node joined cluster with roles: control, compute, storage

Changed in snap-openstack:
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.