Commit Graph
23 Commits
Author SHA1 Message Date
YueGuobin 8c98142d26 feat: report Docker pull progress and add an idle timeout
A pull now reports docker.image.pull notifications on the controller
stream: started, throttled downloading events with the layer counts
and the latest daemon message, then completed or failed. An optional
progress_id is echoed in every event so a client can correlate them
with its own request. Image operations belong to a compute, not to a
project, so the events go to the controller stream and reach clients
that have no project open.

The pull also has an idle socket read timeout of 60 seconds. Without
it an unreachable registry left the pull, the compute request and the
client request hanging forever with no feedback at all. The timeout
is idle time, not total time: the daemon streams progress during the
whole pull, so a minute without data means the registry is gone. When
it fires, the daemon connection closes and Docker cancels the pull.

Docker.http_query now accepts an aiohttp ClientTimeout object so a
caller can ask for a policy finer than a total timeout.
2026-11-06 15:03:34 +08:00
Mark Paronyan 55df230864 style: sort imports in controller 2026-10-02 12:43:26 +03:00
YueGuobin 2ac0bb7d25 marker: route marker.match to a dedicated project WS channel
High-frequency marker.matches shared the single project notification queue with topology events (node.*/link.*), causing head-of-line blocking. Add a separate marker channel: Notification.project_marker_queue/marker_emit, dispatch routes marker.* off the main project queue, plus a new WS /{project_id}/notifications/markers/ws endpoint. Fully migrated (the main project WS no longer carries marker.match); marker listeners are independent of project auto_close. Compute side unchanged.
2026-08-11 11:19:56 +08:00
grossmj a00f53fbaa Fix error 500 on PUT for cloud, nat, vmware and vpcs nodes. Fixes #2426 2024-11-19 12:21:35 +10:00
grossmj b37db57bb9 Fix tests 2024-11-17 15:00:13 +10:00
grossmj 31a2cb998d Fix issue with asyncio.Queue which is not thread safe. 2024-11-17 14:39:22 +10:00
grossmj cefab8d362 Rename __json__() to asdict() 2021-04-17 23:34:28 +09:30
grossmj 44074ff7c9 Some cleaning. 2021-04-17 18:36:32 +09:30
grossmj c021e21309 Use black with -l 120 param. 2021-04-13 18:46:50 +09:30
grossmj c043830e3f Move endpoints to routes & preparations to use a database. 2020-11-19 15:21:03 +10:30
grossmj acc5c7ebfa Update package versions.
Do not use Path in schemas (causes issues with empty paths).
Change how notifications are handled.
Run tests with Python 3.9
2020-11-11 17:18:41 +10:30
grossmj eb3cb8a41f Migration to FastAPI 2020-10-02 16:07:50 +09:30
grossmj 135d56371d Fix tests for project notifications. 2019-02-23 23:20:11 +07:00
grossmj 7fe8f7e716 Fix long-polling request for project notifications. 2019-02-23 21:08:52 +07:00
grossmj a896346c77 Fix issue with notification queue that prevented to properly close projects. Fix #1493 2019-01-12 16:02:36 +07:00
grossmj 76af98404a Drop Python 3.4 and switch to async / await syntax for asyncio. Fixes #1425 2018-10-15 17:05:49 +07:00
grossmj 7f72b90b0e The server has now 2 notification streams
* A new one for controller related events (compute, appliance templates etc.)
* The existing one for project related events (links, nodes etc.)
2018-08-16 21:31:57 +07:00
Julien Duponchelle 89d98bc528 Fix sometimes you have an exception when closing GNS3
Fix #869
2017-01-18 18:38:25 +01:00
Julien Duponchelle 875051d05e Prevent capture on non running node
Fix https://github.com/GNS3/gns3-gui/issues/1656
2016-11-22 16:05:57 +01:00
Julien Duponchelle 9694850465 Option for auto close project when no client listen
And fix websocket not correctly detected has closed.

Ref https://github.com/GNS3/gns3-gui/issues/1331
2016-08-16 17:35:43 +02:00
Julien Duponchelle 758a427a76 Add documentation about notifications 2016-06-30 11:08:01 +02:00
Julien Duponchelle fa0af7f4a2 Correctly process node.updated event on controller 2016-05-18 16:12:57 +02:00
Julien Duponchelle 694e1a2e68 Extract the notification part of controller to a dedicated class 2016-05-18 14:56:23 +02:00