The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/3626
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <[email protected]>
From 737fec185d6bac3d853e4b8e85582a0f2dd33c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]> Date: Thu, 3 Aug 2017 12:50:49 -0400 Subject: [PATCH] lxc-to-lxd: Properly handle lxc.seccomp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <[email protected]> --- scripts/lxc-to-lxd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/lxc-to-lxd b/scripts/lxc-to-lxd index 6c3ddd3c7..14104a6fa 100755 --- a/scripts/lxc-to-lxd +++ b/scripts/lxc-to-lxd @@ -89,7 +89,7 @@ keys_to_check = [ 'lxc.mount.entry', 'lxc.cap.drop' # 'lxc.cap.keep', - # 'lxc.seccomp', + 'lxc.seccomp', # 'lxc.se_context', ] @@ -218,7 +218,7 @@ def convert_container(lxd_socket, container_name, args): # Load the container try: container = lxc.Container(container_name, args.lxcpath) - except: + except Exception: print("Invalid container configuration, skipping...") return False @@ -326,7 +326,7 @@ def convert_container(lxd_socket, container_name, args): print("Processing network configuration") try: count = len(container.get_config_item("lxc.network")) - except: + except Exception: count = 0 for i in range(count): @@ -457,7 +457,7 @@ def convert_container(lxd_socket, container_name, args): # Convert seccomp print("Processing container seccomp configuration") value = config_get(lxc_config, "lxc.seccomp") - if value: + if value and value != "/usr/share/lxc/config/common.seccomp": print("Custom seccomp profiles aren't supported, skipping...") return False @@ -506,7 +506,7 @@ def convert_container(lxd_socket, container_name, args): new['architecture'] = arches[arch[0]] else: print("Unknown architecture, assuming native.") - except: + except Exception: print("Couldn't find container architecture, assuming native.") # Define the container in LXD
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
