Merge pull request #2322 from GNS3/release-v2.2.44.1

Release v2.2.44.1
pull/2328/head
Jeremy Grossmann 7 months ago committed by GitHub
commit de27a57a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,10 @@
# Change Log # Change Log
## 2.2.44.1 07/11/2023
* Catch exceptions when computing image checksums. Ref https://github.com/GNS3/gns3-server/issues/2228
* Add freeze_support() for multiprocessing
## 2.2.44 06/11/2023 ## 2.2.44 06/11/2023
* Bundle web-ui v2.2.44 * Bundle web-ui v2.2.44

@ -57,7 +57,7 @@ class CrashReport:
Report crash to a third party service Report crash to a third party service
""" """
DSN = "https://dcbac52ef824b8386b67cc8f07c4de70@o19455.ingest.sentry.io/38482" DSN = "https://eb1150edfa1530053154ff1fcb67afd1@o19455.ingest.sentry.io/38482"
_instance = None _instance = None
def __init__(self): def __init__(self):

@ -31,6 +31,7 @@ import gns3server.utils.get_resource
import os import os
import sys import sys
import types import types
import multiprocessing
# To avoid strange bug later we switch the event loop before any other operation # To avoid strange bug later we switch the event loop before any other operation
if sys.platform.startswith("win"): if sys.platform.startswith("win"):
@ -79,6 +80,9 @@ def main():
if not sys.platform.startswith("win"): if not sys.platform.startswith("win"):
if "--daemon" in sys.argv: if "--daemon" in sys.argv:
daemonize() daemonize()
else:
multiprocessing.freeze_support()
from gns3server.run import run from gns3server.run import run
run() run()

@ -23,8 +23,8 @@
# or negative for a release candidate or beta (after the base version # or negative for a release candidate or beta (after the base version
# number has been incremented) # number has been incremented)
__version__ = "2.2.44" __version__ = "2.2.44.1"
__version_info__ = (2, 2, 44, 0) __version_info__ = (2, 2, 44, -99)
if "dev" in __version__: if "dev" in __version__:
try: try:

@ -29,7 +29,6 @@ import functools
import time import time
import atexit import atexit
import weakref import weakref
import concurrent.futures
# Import encoding now, to avoid implicit import later. # Import encoding now, to avoid implicit import later.
# Implicit import within threads may cause LookupError when standard library is in a ZIP # Implicit import within threads may cause LookupError when standard library is in a ZIP
@ -238,11 +237,18 @@ class WebServer:
Compute image checksums. Compute image checksums.
""" """
if sys.platform.startswith("darwin") and hasattr(sys, "frozen"):
# do not compute on macOS because errors
return
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
import concurrent.futures
with concurrent.futures.ProcessPoolExecutor(max_workers=1) as pool: with concurrent.futures.ProcessPoolExecutor(max_workers=1) as pool:
log.info("Computing image checksums...") try:
await loop.run_in_executor(pool, list_images, "qemu") log.info("Computing image checksums...")
log.info("Finished computing image checksums") await loop.run_in_executor(pool, list_images, "qemu")
log.info("Finished computing image checksums")
except OSError as e:
log.warning("Could not compute image checksums: {}".format(e))
async def _on_startup(self, *args): async def _on_startup(self, *args):
""" """

Loading…
Cancel
Save