Commit 0080bebf by Tycho Andersen Committed by Stéphane Graber

c/r: put lxc-restore-net in /usr/share

On restore, we pass criu a script to manage the network interfaces (i.e. the full path to lxc-restore-net), which we previously installed into /var/lib/<tuple>/lxc. However, this is also the directory that is the default for use in mounting the rootfs locally before pivot_root()ing. So, we mounted the rootfs and then happliy called criu, pointing it to this directory which didn't have lxc-restore-net any more, it just had the container's rootfs. Instead, we should put lxc-restore-net somewhere else, so that criu can still see it after the rootfs is mounted. Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent bf1e8636
...@@ -533,6 +533,9 @@ AS_AC_EXPAND(LOGPATH, "$with_log_path") ...@@ -533,6 +533,9 @@ AS_AC_EXPAND(LOGPATH, "$with_log_path")
AS_AC_EXPAND(RUNTIME_PATH, "$with_runtime_path") AS_AC_EXPAND(RUNTIME_PATH, "$with_runtime_path")
AC_SUBST(DEFAULT_CGROUP_PATTERN, ["$with_cgroup_pattern"]) AC_SUBST(DEFAULT_CGROUP_PATTERN, ["$with_cgroup_pattern"])
# We need the install path so criu knows where to reference the hook scripts.
AC_DEFINE_UNQUOTED([DATADIR], "$DATADIR", ["Prefix for shared files."])
# Check for some standard kernel headers # Check for some standard kernel headers
AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h], AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h],
[], [],
......
...@@ -202,8 +202,6 @@ sbin_PROGRAMS = init.lxc ...@@ -202,8 +202,6 @@ sbin_PROGRAMS = init.lxc
pkglibexec_PROGRAMS = \ pkglibexec_PROGRAMS = \
lxc-monitord \ lxc-monitord \
lxc-user-nic lxc-user-nic
pkglibexec_SCRIPTS = \
lxc-restore-net
AM_LDFLAGS = -Wl,-E AM_LDFLAGS = -Wl,-E
if ENABLE_RPATH if ENABLE_RPATH
...@@ -263,5 +261,8 @@ install-exec-local: install-soPROGRAMS ...@@ -263,5 +261,8 @@ install-exec-local: install-soPROGRAMS
install-exec-hook: install-exec-hook:
chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
install-data-local:
install -c -m 755 lxc-restore-net $(DESTDIR)$(datadir)/lxc
uninstall-local: uninstall-local:
$(RM) $(DESTDIR)$(libdir)/liblxc.so* $(RM) $(DESTDIR)$(libdir)/liblxc.so*
...@@ -3604,7 +3604,7 @@ static void exec_criu(struct criu_opts *opts) ...@@ -3604,7 +3604,7 @@ static void exec_criu(struct criu_opts *opts)
DECLARE_ARG("--force-irmap"); DECLARE_ARG("--force-irmap");
DECLARE_ARG("--manage-cgroups"); DECLARE_ARG("--manage-cgroups");
DECLARE_ARG("--action-script"); DECLARE_ARG("--action-script");
DECLARE_ARG(LIBEXECDIR "/lxc/lxc-restore-net"); DECLARE_ARG(DATADIR "/lxc/lxc-restore-net");
DECLARE_ARG("-D"); DECLARE_ARG("-D");
DECLARE_ARG(opts->directory); DECLARE_ARG(opts->directory);
DECLARE_ARG("-o"); DECLARE_ARG("-o");
......
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