Skip to content

Commit

Permalink
Merge pull request #2322 from GNS3/release-v2.2.44.1
Browse files Browse the repository at this point in the history
Release v2.2.44.1
  • Loading branch information
grossmj authored Nov 7, 2023
2 parents 46d9ada + c88f76b commit de27a57
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 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

* Bundle web-ui v2.2.44
Expand Down
2 changes: 1 addition & 1 deletion gns3server/crash_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CrashReport:
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

def __init__(self):
Expand Down
4 changes: 4 additions & 0 deletions gns3server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import os
import sys
import types
import multiprocessing

# To avoid strange bug later we switch the event loop before any other operation
if sys.platform.startswith("win"):
Expand Down Expand Up @@ -79,6 +80,9 @@ def main():
if not sys.platform.startswith("win"):
if "--daemon" in sys.argv:
daemonize()
else:
multiprocessing.freeze_support()

from gns3server.run import run
run()

Expand Down
4 changes: 2 additions & 2 deletions gns3server/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
# or negative for a release candidate or beta (after the base version
# number has been incremented)

__version__ = "2.2.44"
__version_info__ = (2, 2, 44, 0)
__version__ = "2.2.44.1"
__version_info__ = (2, 2, 44, -99)

if "dev" in __version__:
try:
Expand Down
14 changes: 10 additions & 4 deletions gns3server/web/web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import time
import atexit
import weakref
import concurrent.futures

# Import encoding now, to avoid implicit import later.
# Implicit import within threads may cause LookupError when standard library is in a ZIP
Expand Down Expand Up @@ -238,11 +237,18 @@ async def _compute_image_checksums(self):
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()
import concurrent.futures
with concurrent.futures.ProcessPoolExecutor(max_workers=1) as pool:
log.info("Computing image checksums...")
await loop.run_in_executor(pool, list_images, "qemu")
log.info("Finished computing image checksums")
try:
log.info("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):
"""
Expand Down

0 comments on commit de27a57

Please sign in to comment.