vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
796 stars 265 forks source link

Ghost tasks remain after launching SSH session via XO Console tab #5259

Open Danp2 opened 4 years ago

Danp2 commented 4 years ago

Context

Expected behavior

No ghost tasks

Current behavior

Each time the SSH button is clicked, the embedded console in XO get disconnected, resulting in a ghost task in XO

julien-f commented 4 years ago

Probable explanation: when clicking on the SSH button, the location of the current page is changed which leads the browser to close all resources of the current page, in our case, the WebSocket connection to the console. The task MAYBE does not disappear because XO does not properly detect that the client connection has closed and therefore does not close the connection to the XCP-ng/XenServer host.

Solutions:

  1. Don't change location of current page but open link in new window
  2. Properly detect connection closure in xo-server and close connection to XCP-ng/XenServer host