From 8f7e5fb2b967d49cdaaf966e8921607d39c651ad Mon Sep 17 00:00:00 2001 From: vanzhiganov Date: Sat, 5 Dec 2015 04:55:31 +0300 Subject: [PATCH] up --- node/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/node/__init__.py b/node/__init__.py index 4705334..23bfce1 100644 --- a/node/__init__.py +++ b/node/__init__.py @@ -25,14 +25,19 @@ class NodeClient(): def __container_config_create(container_id, link, ipv4, ipv6): cfg = [] + cfg.append("lxc.network.type = veth") + cfg.append("lxc.network.flags = up") + cfg.append("lxc.network.name = eth0") cfg.append("lxc.network.link = %s" % link) if ipv4['ipv4']: - cfg.append('lxc.network.ipv4 = %s/32' % ipv4['ipv4']) + # cfg.append('lxc.network.ipv4 = %s/32' % ipv4['ipv4']) + cfg.append('lxc.network.ipv4 = %s' % ipv4['ipv4']) cfg.append('lxc.network.ipv4.gateway = %s' % ipv4['ipv4_gateway']) if 'ipv6' in ipv6 and 'ipv6_gateway' in ipv6: - cfg.append('lxc.network.ipv6 = %s/64' % ipv6['ipv6']) + # cfg.append('lxc.network.ipv6 = %s/64' % ipv6['ipv6']) + cfg.append('lxc.network.ipv6 = %s' % ipv6['ipv6']) cfg.append('lxc.network.ipv6.gateway = %s', ipv6['ipv6_gateway']) config_file = '/var/lib/gocloud/node/configs/%s.config' % container_id