From 97c6a8bb1847febe8bda5f95e19f527cabc060b9 Mon Sep 17 00:00:00 2001 From: Marcel Enguehard Date: Mon, 29 May 2017 15:54:39 +0200 Subject: Misc bug fixes: VPP, deb package detection, lxd Change-Id: Ib3d339e636c0ec62dc0fe3227af85bcc167445cf Signed-off-by: Marcel Enguehard --- vicn/resource/lxd/lxc_container.py | 1 + vicn/resource/lxd/lxd_hypervisor.py | 3 ++- vicn/resource/lxd/lxd_profile.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'vicn/resource/lxd') diff --git a/vicn/resource/lxd/lxc_container.py b/vicn/resource/lxd/lxc_container.py index 654b3bc5..8c8b4816 100644 --- a/vicn/resource/lxd/lxc_container.py +++ b/vicn/resource/lxd/lxc_container.py @@ -154,6 +154,7 @@ class LxcContainer(Node): container = self._get_container_description() log.debug('Container description: {}'.format(container)) client = self.node.lxd_hypervisor.client + self._container = client.containers.create(container, wait=True) def _get_container_description(self): diff --git a/vicn/resource/lxd/lxd_hypervisor.py b/vicn/resource/lxd/lxd_hypervisor.py index f9952e4f..bbdba7c6 100644 --- a/vicn/resource/lxd/lxd_hypervisor.py +++ b/vicn/resource/lxd/lxd_hypervisor.py @@ -52,7 +52,6 @@ DEFAULT_CERT_PATH = os.path.expanduser(os.path.join( DEFAULT_KEY_PATH = os.path.expanduser(os.path.join( '~', '.vicn', 'lxd_client_cert', 'client_key.pem')) -# FIXME hardcoded password for LXD server LXD_TRUST_PWD_DEFAULT = 'vicn' LXD_STORAGE_SIZE_DEFAULT = 100 # GB @@ -199,6 +198,8 @@ class LxdHypervisor(Service): owner = self) lxd_cert_install = LxdInstallCert(certificate = lxd_local_cert, owner = self) + # XXX BUG network has to exist before profile, although as an attribute it + # will be setup after lxd_vicn_profile = LxdProfile(name=LXD_PROFILE_NAME_DEFAULT, node=self.node, description='vICN profile', diff --git a/vicn/resource/lxd/lxd_profile.py b/vicn/resource/lxd/lxd_profile.py index e7afee4a..db871671 100644 --- a/vicn/resource/lxd/lxd_profile.py +++ b/vicn/resource/lxd/lxd_profile.py @@ -28,6 +28,8 @@ lxc profile device add {profile.name} root disk pool={profile.pool} path=/ lxc profile device add {profile.name} {profile.iface_name} nic name={profile.iface_name} nictype=bridged parent={profile.network} lxc profile unset {profile.name} environment.http_proxy lxc profile unset {profile.name} user.network_mode +# Temp fix for VPP +lxc profile create vpp ''' CMD_LXD_PROFILE_GET = 'lxc profile list | grep {profile.name}' -- cgit 1.2.3-korg