Skip to content

Commit b864338

Browse files
committed
checkpoint: ignore ipv6 if CRIU_NOIPV6 is set
Janky executes tests in a docker container and there it is impossible to load kernel modules which are required to dump ipv6 sockets. Signed-off-by: Andrei Vagin <[email protected]>
1 parent 45d08b1 commit b864338

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ RUN cd /tmp \
4141

4242
# install criu
4343
ENV CRIU_VERSION 2.12
44+
COPY tests/hacks/0001-criu-allow-to-ignore-ipv6-if-CRIU_NOIPV6-is-set.patch /tmp/
4445
RUN mkdir -p /usr/src/criu \
4546
&& curl -sSL https://github.com/xemul/criu/archive/v${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \
4647
&& cd /usr/src/criu \
48+
&& cat /tmp/0001-criu-allow-to-ignore-ipv6-if-CRIU_NOIPV6-is-set.patch | patch -p1 \
4749
&& make install-criu \
4850
&& rm -rf /usr/src/criu
4951

@@ -56,6 +58,8 @@ RUN mkdir -p /go/src/github.com/mvdan \
5658
&& go install ./cmd/shfmt \
5759
&& rm -rf /go/src/github.com/mvdan
5860

61+
ENV CRIU_NOIPV6 1
62+
5963
# setup a playground for us to spawn containers in
6064
ENV ROOTFS /busybox
6165
RUN mkdir -p ${ROOTFS} \
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 8a9b1d0e6929d296254a8892e553621d76810e87 Mon Sep 17 00:00:00 2001
2+
From: Andrei Vagin <[email protected]>
3+
Date: Thu, 2 Mar 2017 14:44:18 -0800
4+
Subject: [PATCH] criu: allow to ignore ipv6 if CRIU_NOIPV6 is set
5+
6+
Signed-off-by: Andrei Vagin <[email protected]>
7+
---
8+
criu/kerndat.c | 2 ++
9+
1 file changed, 2 insertions(+)
10+
11+
diff --git a/criu/kerndat.c b/criu/kerndat.c
12+
index 162ac28..216afe0 100644
13+
--- a/criu/kerndat.c
14+
+++ b/criu/kerndat.c
15+
@@ -433,6 +433,8 @@ out:
16+
17+
static int get_ipv6()
18+
{
19+
+ if (getenv("CRIU_NOIPV6"))
20+
+ return 0;
21+
if (access("/proc/sys/net/ipv6", F_OK) < 0) {
22+
if (errno == ENOENT) {
23+
pr_debug("ipv6 is disabled\n");
24+
--
25+
2.9.3
26+

0 commit comments

Comments
 (0)