Start openvpn before registering to master.

parent bc2222ff
...@@ -33,6 +33,7 @@ import pkg_resources ...@@ -33,6 +33,7 @@ import pkg_resources
import socket import socket
import subprocess import subprocess
import sys import sys
import time
import urllib2 import urllib2
from pwd import getpwnam from pwd import getpwnam
...@@ -531,6 +532,11 @@ def prepare_from_scratch(config): ...@@ -531,6 +532,11 @@ def prepare_from_scratch(config):
# Prepare Slapos Configuration # Prepare Slapos Configuration
if config.certificates: if config.certificates:
if config.force_vpn:
print "Starting IPv6 tunnel..."
_call(['systemctl', 'start', 'openvpn.service'])
# XXX better way to check
time.sleep(10)
slapos_register_parameter_list = [ slapos_register_parameter_list = [
'slapos', 'node', 'register', config.computer_name, 'slapos', 'node', 'register', config.computer_name,
'--interface-name', 'br0', '--interface-name', 'br0',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment