From f4efe179e426b6e1cad78542382074d7462d3bb4 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Fri, 15 Feb 2019 15:35:01 +0100 Subject: [PATCH] Fix WSGI config reload --- usr/lib/python3.6/vmmgr/vmmgr.py | 2 +- usr/lib/python3.6/vmmgr/wsgiapp.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/usr/lib/python3.6/vmmgr/vmmgr.py b/usr/lib/python3.6/vmmgr/vmmgr.py index b683609..4a8c520 100644 --- a/usr/lib/python3.6/vmmgr/vmmgr.py +++ b/usr/lib/python3.6/vmmgr/vmmgr.py @@ -26,7 +26,7 @@ class VMMgr: self.conf.save() # Attempt to contact running vmmgr WSGI application to reload config try: - requests.get('https://127.0.0.1/reload-config', timeout=3) + requests.get('http://127.0.0.1:8080/reload-config', timeout=3) except: pass diff --git a/usr/lib/python3.6/vmmgr/wsgiapp.py b/usr/lib/python3.6/vmmgr/wsgiapp.py index 5b050a7..2c44dcf 100644 --- a/usr/lib/python3.6/vmmgr/wsgiapp.py +++ b/usr/lib/python3.6/vmmgr/wsgiapp.py @@ -36,7 +36,7 @@ class WSGIApp: Rule('/login', methods=['GET'], endpoint='login_view'), Rule('/login', methods=['POST'], endpoint='login_action'), Rule('/setup-host', redirect_to='/login?redir=setup-host'), - Rule('/setup-apps', redirect_to='/login?redir=setup-apps') + Rule('/setup-apps', redirect_to='/login?redir=setup-apps'), )) self.admin_url_map = Map(( Rule('/', endpoint='portal_view'), @@ -60,10 +60,10 @@ class WSGIApp: Rule('/uninstall-app', endpoint='uninstall_app_action'), Rule('/update-password', endpoint='update_password_action'), Rule('/shutdown-vm', endpoint='shutdown_vm_action'), - Rule('/reboot-vm', endpoint='reboot_vm_action') + Rule('/reboot-vm', endpoint='reboot_vm_action'), )) self.localhost_url_map = Map(( - Rule('/reload-config', endpoint='reload_config_action') + Rule('/reload-config', endpoint='reload_config_action'), )) def __call__(self, environ, start_response): @@ -396,7 +396,7 @@ class WSGIApp: def reload_config_action(self, request): # Reload configuration (called by vmmgr.register_app()) - self.config.load() + self.conf.load() return Response(status=204) def is_app_visible(self, app):