2020-05-08 11:36:57 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2016-07-01 21:49:54 +02:00
|
|
|
syntax = "proto2";
|
|
|
|
|
2014-01-28 22:36:36 +04:00
|
|
|
message criu_page_server_info {
|
2014-02-01 12:27:00 +04:00
|
|
|
optional string address = 1;
|
|
|
|
optional int32 port = 2;
|
|
|
|
optional int32 pid = 3;
|
2014-09-02 00:45:00 +04:00
|
|
|
optional int32 fd = 4;
|
2014-01-28 22:36:36 +04:00
|
|
|
}
|
|
|
|
|
2014-02-11 23:53:40 +04:00
|
|
|
message criu_veth_pair {
|
|
|
|
required string if_in = 1;
|
|
|
|
required string if_out = 2;
|
|
|
|
};
|
|
|
|
|
2014-06-09 17:26:17 +04:00
|
|
|
message ext_mount_map {
|
|
|
|
required string key = 1;
|
|
|
|
required string val = 2;
|
|
|
|
};
|
|
|
|
|
2016-04-05 11:03:44 +08:00
|
|
|
message join_namespace {
|
|
|
|
required string ns = 1;
|
|
|
|
required string ns_file = 2;
|
|
|
|
optional string extra_opt = 3;
|
|
|
|
}
|
|
|
|
|
2015-03-30 13:09:25 +03:00
|
|
|
message inherit_fd {
|
|
|
|
required string key = 1;
|
|
|
|
required int32 fd = 2;
|
|
|
|
};
|
|
|
|
|
2014-08-22 16:11:27 +04:00
|
|
|
message cgroup_root {
|
|
|
|
optional string ctrl = 1;
|
|
|
|
required string path = 2;
|
|
|
|
};
|
|
|
|
|
2015-07-29 14:05:50 +03:00
|
|
|
message unix_sk {
|
|
|
|
required uint32 inode = 1;
|
|
|
|
};
|
|
|
|
|
2015-08-06 15:39:00 +03:00
|
|
|
enum criu_cg_mode {
|
|
|
|
IGNORE = 0;
|
images: rename NONE to CG_NONE
with newer versions of protobuf, I get:
./crit
Traceback (most recent call last):
File "./crit", line 7, in <module>
import pycriu
File "/home/ubuntu/criu/crit/pycriu/__init__.py", line 2, in <module>
import images
File "/home/ubuntu/criu/crit/pycriu/images/__init__.py", line 2, in <module>
from images import *
File "/home/ubuntu/criu/crit/pycriu/images/images.py", line 52, in <module>
from pb import *
File "/home/ubuntu/criu/crit/pycriu/images/pb.py", line 35, in <module>
from packet_sock_pb2 import *
File "/home/ubuntu/criu/crit/pycriu/images/packet_sock_pb2.py", line 18, in <module>
import sk_opts_pb2 as sk__opts__pb2
File "/home/ubuntu/criu/crit/pycriu/images/sk_opts_pb2.py", line 23, in <module>
serialized_pb=_b('\n\rsk-opts.proto\"\xe2\x02\n\rsk_opts_entry\x12\x11\n\tso_sndbuf\x18\x01 \x02(\r\x12\x11\n\tso_rcvbuf\x18\x02 \x02(\r\x12\x16\n\x0eso_snd_tmo_sec\x18\x03 \x02(\x04\x12\x17\n\x0fso_snd_tmo_usec\x18\x04 \x02(\x04\x12\x16\n\x0eso_rcv_tmo_sec\x18\x05 \x02(\x04\x12\x17\n\x0fso_rcv_tmo_usec\x18\x06 \x02(\x04\x12\x11\n\treuseaddr\x18\x07 \x01(\x08\x12\x13\n\x0bso_priority\x18\x08 \x01(\r\x12\x13\n\x0bso_rcvlowat\x18\t \x01(\r\x12\x0f\n\x07so_mark\x18\n \x01(\r\x12\x13\n\x0bso_passcred\x18\x0b \x01(\x08\x12\x12\n\nso_passsec\x18\x0c \x01(\x08\x12\x14\n\x0cso_dontroute\x18\r \x01(\x08\x12\x13\n\x0bso_no_check\x18\x0e \x01(\x08\x12\x14\n\x0cso_bound_dev\x18\x0f \x01(\t\x12\x11\n\tso_filter\x18\x10 \x03(\x06*6\n\x0bsk_shutdown\x12\x08\n\x04NONE\x10\x00\x12\x08\n\x04READ\x10\x01\x12\t\n\x05WRITE\x10\x02\x12\x08\n\x04\x42OTH\x10\x03')
File "/usr/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 827, in __new__
return _message.default_pool.AddSerializedFile(serialized_pb)
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "sk-opts.proto":
NONE: "NONE" is already defined in file "rpc.proto".
NONE: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "NONE" must be unique within the global scope, not just within "sk_shutdown".
this fixes that.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-06 09:30:42 -06:00
|
|
|
CG_NONE = 1;
|
2015-08-06 15:39:00 +03:00
|
|
|
PROPS = 2;
|
|
|
|
SOFT = 3;
|
|
|
|
FULL = 4;
|
|
|
|
STRICT = 5;
|
|
|
|
DEFAULT = 6;
|
|
|
|
};
|
|
|
|
|
2021-06-12 20:45:03 +02:00
|
|
|
enum criu_network_lock_method {
|
|
|
|
IPTABLES = 1;
|
|
|
|
NFTABLES = 2;
|
|
|
|
};
|
|
|
|
|
2019-10-03 19:39:18 +05:30
|
|
|
enum criu_pre_dump_mode {
|
|
|
|
SPLICE = 1;
|
2019-10-06 01:01:50 +03:00
|
|
|
VM_READ = 2;
|
2019-10-03 19:39:18 +05:30
|
|
|
};
|
|
|
|
|
2013-10-02 16:04:11 +04:00
|
|
|
message criu_opts {
|
2014-02-01 12:27:00 +04:00
|
|
|
required int32 images_dir_fd = 1;
|
|
|
|
optional int32 pid = 2; /* if not set on dump, will dump requesting process */
|
2013-09-16 15:23:00 +04:00
|
|
|
|
2014-02-01 12:27:00 +04:00
|
|
|
optional bool leave_running = 3;
|
|
|
|
optional bool ext_unix_sk = 4;
|
|
|
|
optional bool tcp_established = 5;
|
|
|
|
optional bool evasive_devices = 6;
|
|
|
|
optional bool shell_job = 7;
|
|
|
|
optional bool file_locks = 8;
|
|
|
|
optional int32 log_level = 9 [default = 2];
|
|
|
|
optional string log_file = 10; /* No subdirs are allowed. Consider using work-dir */
|
2014-01-28 22:36:36 +04:00
|
|
|
|
2014-02-01 12:27:00 +04:00
|
|
|
optional criu_page_server_info ps = 11;
|
2014-01-28 22:36:36 +04:00
|
|
|
|
2014-02-01 12:27:00 +04:00
|
|
|
optional bool notify_scripts = 12;
|
2014-01-28 22:36:53 +04:00
|
|
|
|
2014-02-01 12:27:00 +04:00
|
|
|
optional string root = 13;
|
|
|
|
optional string parent_img = 14;
|
|
|
|
optional bool track_mem = 15;
|
2014-02-21 18:42:00 +04:00
|
|
|
optional bool auto_dedup = 16;
|
2014-02-04 12:31:26 +04:00
|
|
|
|
2014-02-21 18:42:00 +04:00
|
|
|
optional int32 work_dir_fd = 17;
|
|
|
|
optional bool link_remap = 18;
|
2016-09-20 16:26:55 +03:00
|
|
|
repeated criu_veth_pair veths = 19; /* DEPRECATED, use external instead */
|
2014-02-28 18:02:17 +04:00
|
|
|
|
|
|
|
optional uint32 cpu_cap = 20 [default = 0xffffffff];
|
2014-03-06 14:56:03 +04:00
|
|
|
optional bool force_irmap = 21;
|
2014-03-22 20:14:00 +04:00
|
|
|
repeated string exec_cmd = 22;
|
2014-06-09 17:26:17 +04:00
|
|
|
|
2016-11-04 08:40:04 +03:00
|
|
|
repeated ext_mount_map ext_mnt = 23; /* DEPRECATED, use external instead */
|
2015-08-05 21:02:00 +03:00
|
|
|
optional bool manage_cgroups = 24; /* backward compatibility */
|
2014-08-22 16:11:27 +04:00
|
|
|
repeated cgroup_root cg_root = 25;
|
2014-09-10 15:46:06 +04:00
|
|
|
|
|
|
|
optional bool rst_sibling = 26; /* swrk only */
|
2015-03-30 13:09:25 +03:00
|
|
|
repeated inherit_fd inherit_fd = 27; /* swrk only */
|
2015-04-21 10:33:55 -06:00
|
|
|
|
|
|
|
optional bool auto_ext_mnt = 28;
|
|
|
|
optional bool ext_sharing = 29;
|
|
|
|
optional bool ext_masters = 30;
|
2015-04-25 20:07:00 +03:00
|
|
|
|
|
|
|
repeated string skip_mnt = 31;
|
|
|
|
repeated string enable_fs = 32;
|
2015-07-29 14:05:50 +03:00
|
|
|
|
2016-09-20 16:27:10 +03:00
|
|
|
repeated unix_sk unix_sk_ino = 33; /* DEPRECATED, use external instead */
|
2015-08-05 21:02:00 +03:00
|
|
|
|
2015-08-06 15:39:00 +03:00
|
|
|
optional criu_cg_mode manage_cgroups_mode = 34;
|
2015-08-10 17:20:49 +03:00
|
|
|
optional uint32 ghost_limit = 35 [default = 0x100000];
|
2015-09-16 07:27:00 +03:00
|
|
|
repeated string irmap_scan_paths = 36;
|
2016-01-14 03:18:00 +03:00
|
|
|
repeated string external = 37;
|
2016-02-13 01:24:00 +03:00
|
|
|
optional uint32 empty_ns = 38;
|
2016-04-05 11:03:44 +08:00
|
|
|
repeated join_namespace join_ns = 39;
|
2016-05-30 18:49:00 +03:00
|
|
|
|
|
|
|
optional string cgroup_props = 41;
|
|
|
|
optional string cgroup_props_file = 42;
|
|
|
|
repeated string cgroup_dump_controller = 43;
|
2016-06-10 18:53:00 +03:00
|
|
|
|
|
|
|
optional string freeze_cgroup = 44;
|
2016-06-17 14:22:00 +03:00
|
|
|
optional uint32 timeout = 45;
|
2016-06-20 23:15:00 +03:00
|
|
|
optional bool tcp_skip_in_flight = 46;
|
2016-11-29 19:45:00 +03:00
|
|
|
optional bool weak_sysctls = 47;
|
2017-01-13 13:41:00 +03:00
|
|
|
optional bool lazy_pages = 48;
|
2017-02-06 20:03:00 +03:00
|
|
|
optional int32 status_fd = 49;
|
2017-02-07 11:43:27 +03:00
|
|
|
optional bool orphan_pts_master = 50;
|
2018-08-01 16:31:22 +00:00
|
|
|
optional string config_file = 51;
|
2019-01-06 15:44:26 +00:00
|
|
|
optional bool tcp_close = 52;
|
2019-02-18 10:35:45 +00:00
|
|
|
optional string lsm_profile = 53;
|
2019-04-04 00:44:22 +01:00
|
|
|
optional string tls_cacert = 54;
|
|
|
|
optional string tls_cacrl = 55;
|
|
|
|
optional string tls_cert = 56;
|
|
|
|
optional string tls_key = 57;
|
|
|
|
optional bool tls = 58;
|
|
|
|
optional bool tls_no_cn_verify = 59;
|
2019-08-08 18:49:13 +02:00
|
|
|
optional string cgroup_yard = 60;
|
2019-10-03 19:39:18 +05:30
|
|
|
optional criu_pre_dump_mode pre_dump_mode = 61 [default = SPLICE];
|
2021-03-16 14:21:19 +02:00
|
|
|
optional int32 pidfd_store_sk = 62;
|
2021-06-08 17:22:03 +00:00
|
|
|
optional string lsm_mount_context = 63;
|
2021-06-12 20:45:03 +02:00
|
|
|
optional criu_network_lock_method network_lock = 64 [default = IPTABLES];
|
2020-05-25 17:43:48 +03:00
|
|
|
optional bool mntns_compat_mode = 65;
|
2022-05-30 17:34:20 +00:00
|
|
|
optional bool skip_file_rwx_check = 66;
|
2022-08-12 11:56:53 -07:00
|
|
|
optional bool unprivileged = 67;
|
2022-09-16 11:01:48 +02:00
|
|
|
optional bool leave_stopped = 69;
|
2019-03-29 13:52:35 +03:00
|
|
|
/* optional bool check_mounts = 128; */
|
2013-09-13 13:44:02 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
message criu_dump_resp {
|
2013-09-16 15:36:12 +04:00
|
|
|
optional bool restored = 1;
|
2013-09-13 13:44:02 +04:00
|
|
|
}
|
|
|
|
|
2013-10-02 23:42:18 +04:00
|
|
|
message criu_restore_resp {
|
|
|
|
required int32 pid = 1;
|
|
|
|
}
|
|
|
|
|
2014-01-28 22:36:53 +04:00
|
|
|
message criu_notify {
|
|
|
|
optional string script = 1;
|
2014-02-11 09:53:32 +04:00
|
|
|
optional int32 pid = 2;
|
2014-01-28 22:36:53 +04:00
|
|
|
}
|
|
|
|
|
2013-09-16 15:36:12 +04:00
|
|
|
enum criu_req_type {
|
|
|
|
EMPTY = 0;
|
|
|
|
DUMP = 1;
|
2013-10-02 23:42:18 +04:00
|
|
|
RESTORE = 2;
|
2013-11-20 03:53:24 +04:00
|
|
|
CHECK = 3;
|
2014-01-28 22:36:36 +04:00
|
|
|
PRE_DUMP = 4;
|
|
|
|
PAGE_SERVER = 5;
|
2014-01-28 22:36:53 +04:00
|
|
|
|
|
|
|
NOTIFY = 6;
|
2014-10-01 01:08:34 +04:00
|
|
|
|
|
|
|
CPUINFO_DUMP = 7;
|
|
|
|
CPUINFO_CHECK = 8;
|
2015-10-08 16:33:00 +03:00
|
|
|
|
|
|
|
FEATURE_CHECK = 9;
|
2017-04-06 17:03:29 +02:00
|
|
|
|
|
|
|
VERSION = 10;
|
2017-05-18 03:14:33 +03:00
|
|
|
|
|
|
|
WAIT_PID = 11;
|
|
|
|
PAGE_SERVER_CHLD = 12;
|
2021-12-03 14:32:33 +00:00
|
|
|
|
|
|
|
SINGLE_PRE_DUMP = 13;
|
2015-10-08 16:33:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* List of features which can queried via
|
|
|
|
* CRIU_REQ_TYPE__FEATURE_CHECK
|
|
|
|
*/
|
|
|
|
message criu_features {
|
|
|
|
optional bool mem_track = 1;
|
2017-03-08 16:32:37 +01:00
|
|
|
optional bool lazy_pages = 2;
|
2021-03-16 15:07:39 +02:00
|
|
|
optional bool pidfd_store = 3;
|
2013-09-16 15:36:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Request -- each type corresponds to must-be-there
|
|
|
|
* request arguments of respective type
|
|
|
|
*/
|
|
|
|
|
|
|
|
message criu_req {
|
2014-02-01 12:27:00 +04:00
|
|
|
required criu_req_type type = 1;
|
2013-09-16 15:36:12 +04:00
|
|
|
|
2014-02-01 12:27:00 +04:00
|
|
|
optional criu_opts opts = 2;
|
|
|
|
optional bool notify_success = 3;
|
2014-09-04 20:40:25 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* When set service won't close the connection but
|
|
|
|
* will wait for more req-s to appear. Works not
|
|
|
|
* for all request types.
|
|
|
|
*/
|
|
|
|
optional bool keep_open = 4;
|
2015-10-08 16:33:00 +03:00
|
|
|
/*
|
|
|
|
* 'features' can be used to query which features
|
|
|
|
* are supported by the installed criu/kernel
|
|
|
|
* via RPC.
|
|
|
|
*/
|
|
|
|
optional criu_features features = 5;
|
2017-05-18 03:14:33 +03:00
|
|
|
|
|
|
|
/* 'pid' is used for WAIT_PID */
|
|
|
|
optional uint32 pid = 6;
|
2013-09-16 15:36:12 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2015-10-05 17:32:00 +03:00
|
|
|
* Response -- it states whether the request was served
|
|
|
|
* and additional request-specific information
|
2013-09-16 15:36:12 +04:00
|
|
|
*/
|
2013-09-13 13:44:02 +04:00
|
|
|
|
2013-09-16 15:36:12 +04:00
|
|
|
message criu_resp {
|
2014-02-01 12:27:00 +04:00
|
|
|
required criu_req_type type = 1;
|
|
|
|
required bool success = 2;
|
2013-09-13 13:44:02 +04:00
|
|
|
|
2014-02-01 12:27:00 +04:00
|
|
|
optional criu_dump_resp dump = 3;
|
|
|
|
optional criu_restore_resp restore = 4;
|
|
|
|
optional criu_notify notify = 5;
|
|
|
|
optional criu_page_server_info ps = 6;
|
2014-12-19 21:18:00 +03:00
|
|
|
|
|
|
|
optional int32 cr_errno = 7;
|
2015-10-08 16:33:00 +03:00
|
|
|
optional criu_features features = 8;
|
2016-08-24 21:12:03 +03:00
|
|
|
optional string cr_errmsg = 9;
|
2017-04-06 17:03:29 +02:00
|
|
|
optional criu_version version = 10;
|
2017-05-18 03:14:33 +03:00
|
|
|
|
|
|
|
optional int32 status = 11;
|
2017-04-06 17:03:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Answer for criu_req_type.VERSION requests */
|
|
|
|
message criu_version {
|
2019-02-26 09:39:36 +00:00
|
|
|
required int32 major_number = 1;
|
|
|
|
required int32 minor_number = 2;
|
2017-04-06 17:03:29 +02:00
|
|
|
optional string gitid = 3;
|
|
|
|
optional int32 sublevel = 4;
|
|
|
|
optional int32 extra = 5;
|
|
|
|
optional string name = 6;
|
2013-09-13 13:44:02 +04:00
|
|
|
}
|