Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
INSTALLER_IMAGE_NAME: ${{ github.repository }}-installer
MANAGER_IMAGE_NAME: ${{ github.repository }}-manager
CRIU_IMAGE_NAME: ${{ github.repository }}-criu
CRIU_VERSION: 116991736c7641258a5b7f53f5079b90fc80b99e
CRIU_VERSION: v4.2

jobs:
push_to_registry:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_push_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
INSTALLER_IMAGE_NAME: ${{ github.repository }}-installer
MANAGER_IMAGE_NAME: ${{ github.repository }}-manager
CRIU_IMAGE_NAME: ${{ github.repository }}-criu
CRIU_VERSION: 116991736c7641258a5b7f53f5079b90fc80b99e
CRIU_VERSION: v4.2

jobs:
push_to_registry:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_push_criu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
env:
REGISTRY: ghcr.io
CRIU_IMAGE_NAME: ${{ github.repository }}-criu
CRIU_VERSION: 116991736c7641258a5b7f53f5079b90fc80b99e
CRIU_VERSION: v4.2

jobs:
push_to_registry:
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ TAG := dev
INSTALLER_IMAGE := $(REGISTRY)/$(NAMESPACE)/zeropod-installer:$(TAG)
MANAGER_IMAGE := $(REGISTRY)/$(NAMESPACE)/zeropod-manager:$(TAG)
TEST_IMAGE := $(REGISTRY)/$(NAMESPACE)/zeropod-test:$(TAG)
# includes fix for https://github.com/checkpoint-restore/criu/issues/2532
CRIU_VERSION := 116991736c7641258a5b7f53f5079b90fc80b99e
CRIU_VERSION := v4.2
CRIU_IMAGE := $(REGISTRY)/$(NAMESPACE)/zeropod-criu:$(CRIU_VERSION)
DOCKER_SOCK := /var/run/docker.sock
EBPF_IMAGE := $(REGISTRY)/$(NAMESPACE)/zeropod-ebpf:$(TAG)
Expand Down
2 changes: 1 addition & 1 deletion cmd/installer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

var (
criuImage = flag.String("criu-image", "ghcr.io/ctrox/zeropod-criu:116991736c7641258a5b7f53f5079b90fc80b99e", "criu image to use.")
criuImage = flag.String("criu-image", "ghcr.io/ctrox/zeropod-criu:v4.2", "criu image to use.")
runtime = flag.String("runtime", "containerd", "specifies which runtime to configure. containerd/k3s/rke2")
hostOptPath = flag.String("host-opt-path", defaultOptPath, "path where zeropod binaries are stored on the host")
uninstall = flag.Bool("uninstall", false, "uninstalls zeropod by cleaning up all the files the installer created")
Expand Down
2 changes: 1 addition & 1 deletion cmd/manager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG CRIU_IMAGE=ghcr.io/ctrox/zeropod-criu:116991736c7641258a5b7f53f5079b90fc80b99e
ARG CRIU_IMAGE=ghcr.io/ctrox/zeropod-criu:v4.2

FROM --platform=$BUILDPLATFORM golang:1.25 AS builder

Expand Down
2 changes: 1 addition & 1 deletion config/production/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ patches:
- patch: |-
- op: add
path: /spec/template/spec/initContainers/0/args/-
value: -criu-image=ghcr.io/ctrox/zeropod-criu:116991736c7641258a5b7f53f5079b90fc80b99e
value: -criu-image=ghcr.io/ctrox/zeropod-criu:v4.2
target:
kind: DaemonSet
apiVersion: kustomize.config.k8s.io/v1beta1
Expand Down
28 changes: 14 additions & 14 deletions criu/always-lazy.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff --git a/criu/cr-service.c b/criu/cr-service.c
index 61a04c5ff..c0cce482e 100644
index dccf4ef38..bb30c4c98 100644
--- a/criu/cr-service.c
+++ b/criu/cr-service.c
@@ -285,6 +285,12 @@ int exec_rpc_query_external_files(char *name, int sk)

static char images_dir[PATH_MAX];
@@ -393,6 +393,12 @@ static int setup_logging_from_req(CriuOpts *req, bool output_changed_by_rpc_conf
return 0;
}

+bool file_exists(char *filename)
+{
Expand All @@ -15,24 +15,24 @@ index 61a04c5ff..c0cce482e 100644
static int setup_opts_from_req(int sk, CriuOpts *req)
{
struct ucred ids;
@@ -293,6 +299,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
char images_dir_path[PATH_MAX];
char work_dir_path[PATH_MAX];
@@ -400,6 +406,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
socklen_t ids_len = sizeof(struct ucred);
char images_dir_path[PATH_MAX] = "";
char status_fd[PATH_MAX];
+ char lazy_pages_socket_path[PATH_MAX];
bool output_changed_by_rpc_conf = false;
bool work_changed_by_rpc_conf = false;
bool imgs_changed_by_rpc_conf = false;
@@ -554,6 +561,14 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
@@ -522,6 +529,14 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
opts.lazy_pages = req->lazy_pages;
}

+ strcpy(lazy_pages_socket_path, images_dir);
+ strcat(lazy_pages_socket_path, "/lazy-pages.socket");
+
+ if (file_exists(lazy_pages_socket_path)) {
+ // always enable lazy-pages if the socket exists
+ opts.lazy_pages = true;
+ if (resolve_images_dir_path(lazy_pages_socket_path, imgs_changed_by_rpc_conf, req, ids.pid) == 0) {
+ strcat(lazy_pages_socket_path, "/lazy-pages.socket");
+ if (file_exists(lazy_pages_socket_path)) {
+ // always enable lazy-pages if the socket exists
+ opts.lazy_pages = true;
+ }
+ }
+
if (req->has_pre_dump_mode) {
Expand Down