mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Bugfixes with cloud server communication
This commit is contained in:
parent
b132c901c9
commit
cf59240bef
@ -11,9 +11,7 @@ mkdir -p /opt/gns3
|
|||||||
pushd /opt/gns3
|
pushd /opt/gns3
|
||||||
git clone --branch ${git_branch} ${git_url}
|
git clone --branch ${git_branch} ${git_url}
|
||||||
cd gns3-server
|
cd gns3-server
|
||||||
pip3 install tornado
|
pip3 install -r dev-requirements.txt
|
||||||
pip3 install pyzmq
|
|
||||||
pip3 install jsonschema
|
|
||||||
python3 ./setup.py install
|
python3 ./setup.py install
|
||||||
|
|
||||||
${rc_local}
|
${rc_local}
|
||||||
|
@ -219,19 +219,19 @@ def get_gns3secrets(cmd_line_option_list):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
gns3secret_paths = [
|
gns3secret_paths = [
|
||||||
os.path.expanduser("~/"),
|
os.path.join(os.path.expanduser("~"), '.config', 'GNS3'),
|
||||||
SCRIPT_PATH,
|
SCRIPT_PATH,
|
||||||
]
|
]
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
|
||||||
for gns3secret_path in gns3secret_paths:
|
for gns3secret_path in gns3secret_paths:
|
||||||
gns3secret_file = "%s/.gns3secrets.conf" % (gns3secret_path)
|
gns3secret_file = "%s/cloud.conf" % (gns3secret_path)
|
||||||
if os.path.isfile(gns3secret_file):
|
if os.path.isfile(gns3secret_file):
|
||||||
config.read(gns3secret_file)
|
config.read(gns3secret_file)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for key, value in config.items("Cloud"):
|
for key, value in config.items("CLOUD_SERVER"):
|
||||||
cmd_line_option_list[key] = value.strip()
|
cmd_line_option_list[key] = value.strip()
|
||||||
except configparser.NoSectionError:
|
except configparser.NoSectionError:
|
||||||
pass
|
pass
|
||||||
|
@ -83,7 +83,7 @@ class DeadMan(IModule):
|
|||||||
cmd.append("--file")
|
cmd.append("--file")
|
||||||
cmd.append("%s" % (self._heartbeat_file))
|
cmd.append("%s" % (self._heartbeat_file))
|
||||||
cmd.append("--background")
|
cmd.append("--background")
|
||||||
log.debug("Deadman: Running command: %s"%(cmd))
|
log.info("Deadman: Running command: %s"%(cmd))
|
||||||
|
|
||||||
process = subprocess.Popen(cmd, stderr=subprocess.STDOUT, shell=False)
|
process = subprocess.Popen(cmd, stderr=subprocess.STDOUT, shell=False)
|
||||||
return process
|
return process
|
||||||
@ -97,7 +97,7 @@ class DeadMan(IModule):
|
|||||||
|
|
||||||
cmd.append("gns3dms")
|
cmd.append("gns3dms")
|
||||||
cmd.append("-k")
|
cmd.append("-k")
|
||||||
log.debug("Deadman: Running command: %s"%(cmd))
|
log.info("Deadman: Running command: %s"%(cmd))
|
||||||
|
|
||||||
process = subprocess.Popen(cmd, shell=False)
|
process = subprocess.Popen(cmd, shell=False)
|
||||||
return process
|
return process
|
||||||
|
@ -168,7 +168,7 @@ def _start_gns3server():
|
|||||||
cmd = []
|
cmd = []
|
||||||
cmd.append("gns3server")
|
cmd.append("gns3server")
|
||||||
|
|
||||||
log.debug("Starting gns3server ...")
|
log.info("Starting gns3server ...")
|
||||||
subprocess.Popen(cmd, shell=False)
|
subprocess.Popen(cmd, shell=False)
|
||||||
|
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ def main():
|
|||||||
except FileExistsError:
|
except FileExistsError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
(server_key, server_crt ) = _generate_certs()
|
(server_key, server_crt) = _generate_certs()
|
||||||
|
|
||||||
cloud_config = configparser.ConfigParser()
|
cloud_config = configparser.ConfigParser()
|
||||||
cloud_config['CLOUD_SERVER'] = {}
|
cloud_config['CLOUD_SERVER'] = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user