[CRIU] [PATCH 3/4] p.haul: enable connection on both web-gui hosts
Adrian Reber
adrian at lisas.de
Tue Nov 3 02:16:41 PST 2015
From: Adrian Reber <areber at redhat.com>
It was not possible to connect to the first of the two hosts using the
web-gui. This adds the external accessible name/IP to the first host
involved in the web-gui.
Signed-off-by: Adrian Reber <areber at redhat.com>
---
webgui/p_haul_web_gui.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/webgui/p_haul_web_gui.py b/webgui/p_haul_web_gui.py
index a4ed33e..22aabec 100644
--- a/webgui/p_haul_web_gui.py
+++ b/webgui/p_haul_web_gui.py
@@ -56,7 +56,9 @@ def partners():
@APP.route('/register', methods=['POST'])
def register():
global partner
+ global myself
+ myself = flask.request.form.get("partner")
partner = flask.request.remote_addr
return flask.jsonify({"your_ip": partner})
@@ -104,7 +106,9 @@ def start_web_gui(migration_partner, _rpc_port, _debug=False):
if partner:
try:
myself = requests.post("http://%s:%d/register" %
- (partner, default_port)).json()['your_ip']
+ (partner, default_port),
+ data={"partner": partner}
+ ).json()['your_ip']
except:
pass
APP.run(host='0.0.0.0', port=default_port, debug=_debug, threaded=True)
--
1.8.3.1
More information about the CRIU
mailing list