2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-21 17:37:39 +00:00
criu/images/inventory.proto
Adrian Reber 5513a33300 net: remember the name of the lock chain (nftables)
Using libnftables the chain to lock the network is composed of
("CRIU-%d", real_pid). This leads to around 40 zdtm tests failing
with errors like this:

Error: No such file or directory; did you mean table 'CRIU-62' in family inet?
delete table inet CRIU-86

The reason is that as soon as a process is running in a namespace the
real PID can be anything and only the PID in the namespace is restored
correctly. Relying on the real PID does not work for the chain name.

Using the PID of the innermost namespace would lead to the chain be
called 'CRIU-1' most of the time which is also not really unique.

With this commit the change is now named using the already existing CRIU
run ID. To be able to correctly restore the process and delete the
locking table, the CRIU run id during checkpointing is now stored in the
inventory as dump_criu_run_id.

Signed-off-by: Adrian Reber <areber@redhat.com>
2025-01-28 10:38:30 -08:00

37 lines
1.0 KiB
Protocol Buffer

// SPDX-License-Identifier: MIT
syntax = "proto2";
import "core.proto";
enum lsmtype {
NO_LSM = 0;
SELINUX = 1;
APPARMOR = 2;
}
// It is not possible to distinguish between an empty repeated field
// and unset repeated field. To solve this problem and provide backwards
// compabibility, we use the 'plugins_entry' message.
message plugins_entry {
repeated string plugins = 12;
};
message inventory_entry {
required uint32 img_version = 1;
optional bool fdinfo_per_id = 2;
optional task_kobj_ids_entry root_ids = 3;
optional bool ns_per_id = 4;
optional uint32 root_cg_set = 5;
optional lsmtype lsmtype = 6;
optional uint64 dump_uptime = 8;
optional uint32 pre_dump_mode = 9;
optional bool tcp_close = 10;
optional uint32 network_lock_method = 11;
optional plugins_entry plugins_entry = 12;
// Remember the criu_run_id when CRIU dumped the process.
// This is currently used to delete the correct nftables
// network locking rule.
optional string dump_criu_run_id = 13;
}