runtime: deprecate runc --criu / -criu-path option

runc option --criu is now ignored (with a warning), and the option will be
removed entirely in a future release. Users who need a non- standard criu
binary should rely on the standard way of looking up binaries in $PATH.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-01-31 13:27:19 +01:00
parent f8585d632a
commit d2013d2c99
14 changed files with 129 additions and 104 deletions

View File

@@ -210,7 +210,7 @@ func WriteRuntime(path, runtime string) error {
func newInit(ctx context.Context, path, workDir, namespace string, platform stdio.Platform,
r *process.CreateConfig, options *options.Options, rootfs string) (*process.Init, error) {
runtime := process.NewRunc(options.Root, path, namespace, options.BinaryName, options.CriuPath, options.SystemdCgroup)
runtime := process.NewRunc(options.Root, path, namespace, options.BinaryName, options.SystemdCgroup)
p := process.New(r.ID, runtime, stdio.Stdio{
Stdin: r.Stdin,
Stdout: r.Stdout,

View File

@@ -261,7 +261,7 @@ func (manager) Stop(ctx context.Context, id string) (shim.StopStatus, error) {
root = opts.Root
}
r := process.NewRunc(root, path, ns, runtime, "", false)
r := process.NewRunc(root, path, ns, runtime, false)
if err := r.Delete(ctx, id, &runcC.DeleteOpts{
Force: true,
}); err != nil {

View File

@@ -58,6 +58,9 @@ file {
number: 8
label: LABEL_OPTIONAL
type: TYPE_STRING
options {
deprecated: true
}
json_name: "criuPath"
}
field {

View File

@@ -40,8 +40,13 @@ type Options struct {
BinaryName string `protobuf:"bytes,6,opt,name=binary_name,json=binaryName,proto3" json:"binary_name,omitempty"`
// runc root directory
Root string `protobuf:"bytes,7,opt,name=root,proto3" json:"root,omitempty"`
// criu binary path
CriuPath string `protobuf:"bytes,8,opt,name=criu_path,json=criuPath,proto3" json:"criu_path,omitempty"`
// criu binary path.
//
// Deprecated: runc option --criu is now ignored (with a warning), and the
// option will be removed entirely in a future release. Users who need a non-
// standard criu binary should rely on the standard way of looking up binaries
// in $PATH.
CriuPath string `protobuf:"bytes,8,opt,name=criu_path,json=criuPath,proto3" json:"criu_path,omitempty"` // Deprecated: Do not use.
// enable systemd cgroups
SystemdCgroup bool `protobuf:"varint,9,opt,name=systemd_cgroup,json=systemdCgroup,proto3" json:"systemd_cgroup,omitempty"`
// criu image path
@@ -192,44 +197,44 @@ func init() {
}
var fileDescriptor_4e5440d739e9a863 = []byte{
// 586 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x4f, 0x6f, 0xd3, 0x4c,
0x10, 0x87, 0xeb, 0xfe, 0x49, 0xec, 0x4d, 0x93, 0xbe, 0xef, 0x42, 0x25, 0xd3, 0x8a, 0x34, 0x94,
0x82, 0xc2, 0x25, 0x11, 0x45, 0x9c, 0xb8, 0xa0, 0xb6, 0x08, 0x55, 0x40, 0xa9, 0x0c, 0x15, 0x52,
0x2f, 0x2b, 0x77, 0x3d, 0x38, 0xa3, 0xc4, 0x3b, 0x96, 0x77, 0xd3, 0xa4, 0x37, 0xbe, 0x17, 0x5f,
0xa0, 0x47, 0x8e, 0x9c, 0x10, 0xcd, 0x8d, 0x6f, 0x81, 0x76, 0xed, 0xa4, 0x3d, 0x73, 0xf2, 0xec,
0x33, 0x3f, 0x8f, 0xd7, 0xcf, 0x6a, 0xd9, 0x41, 0x8a, 0x66, 0x30, 0xbe, 0xe8, 0x49, 0xca, 0xfa,
0x92, 0x94, 0x89, 0x51, 0x41, 0x91, 0xdc, 0x2d, 0x8b, 0xb1, 0x32, 0x98, 0x41, 0xff, 0x72, 0xdf,
0x96, 0xb2, 0x4f, 0xb9, 0x41, 0x52, 0xba, 0x4f, 0x12, 0x7b, 0x79, 0x41, 0x86, 0x38, 0xbf, 0x4d,
0xf7, 0x6c, 0xa4, 0x77, 0xf9, 0x7c, 0xeb, 0x7e, 0x4a, 0x29, 0xb9, 0x76, 0xdf, 0x56, 0x65, 0x72,
0xf7, 0xcf, 0x32, 0xab, 0x7f, 0x2c, 0xdf, 0xe7, 0xbb, 0xac, 0xa9, 0x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a, 0x6f, 0xa6, 0x20,
0x8f, 0x8f, 0xa2, 0x9a, 0x6d, 0x1d, 0x27, 0x07, 0xe7, 0xd7, 0x37, 0xed, 0xa5, 0x9f, 0x37, 0xed,
0xa5, 0x6f, 0xb3, 0xb6, 0x77, 0x3d, 0x6b, 0x7b, 0x3f, 0x66, 0x6d, 0xef, 0xf7, 0xac, 0xed, 0x9d,
0xbf, 0xfe, 0xd7, 0x8b, 0xf6, 0xaa, 0x7a, 0x5e, 0xd4, 0xdc, 0x1d, 0x7a, 0xf1, 0x37, 0x00, 0x00,
0xff, 0xff, 0x0d, 0x09, 0x46, 0xe5, 0xb3, 0x03, 0x00, 0x00,
// 592 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x41, 0x6f, 0xd3, 0x4a,
0x10, 0xc7, 0xeb, 0xb4, 0x4d, 0xec, 0x4d, 0x93, 0xbe, 0xb7, 0xef, 0x55, 0x32, 0x45, 0xa4, 0xa1,
0x14, 0x14, 0x2e, 0x89, 0x28, 0xe2, 0xc4, 0x05, 0xa5, 0x45, 0xa8, 0x02, 0x4a, 0x65, 0xa8, 0x90,
0x7a, 0x59, 0xb9, 0xeb, 0xc1, 0x19, 0x25, 0xde, 0xb1, 0xbc, 0x9b, 0x26, 0xbd, 0xf1, 0xbd, 0xf8,
0x02, 0x3d, 0x72, 0xe4, 0x84, 0x68, 0xee, 0x7c, 0x07, 0xb4, 0x6b, 0xa7, 0xed, 0x99, 0x53, 0x66,
0x7f, 0xf3, 0xcf, 0xec, 0xfa, 0xb7, 0x5a, 0x36, 0x4c, 0xd1, 0x8c, 0xa6, 0xe7, 0x7d, 0x49, 0xd9,
0x40, 0x92, 0x32, 0x31, 0x2a, 0x28, 0x92, 0xbb, 0x65, 0x31, 0x55, 0x06, 0x33, 0x18, 0x5c, 0xec,
0xdb, 0x52, 0x0e, 0x28, 0x37, 0x48, 0x4a, 0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, 0x89, 0x02, 0xbc, 0xd1, 0x78, 0x9f, 0x05, 0xb7,
0x06, 0x03, 0xd7, 0xf5, 0x67, 0x4b, 0x7b, 0x2f, 0x58, 0xfb, 0xa4, 0x20, 0x09, 0x5a, 0x1f, 0x82,
0x89, 0x71, 0xa2, 0xf9, 0x23, 0xd6, 0x80, 0x39, 0x48, 0x81, 0x89, 0x93, 0x17, 0x0c, 0xd9, 0xe2,
0xe7, 0x4e, 0xfd, 0xf5, 0x1c, 0xe4, 0xd1, 0x61, 0x54, 0xb7, 0xad, 0xa3, 0x64, 0x78, 0x76, 0x75,
0xdd, 0x59, 0xf9, 0x71, 0xdd, 0x59, 0xf9, 0xba, 0xe8, 0x78, 0x57, 0x8b, 0x8e, 0xf7, 0x7d, 0xd1,
0xf1, 0x7e, 0x2d, 0x3a, 0xde, 0xd9, 0xab, 0xbf, 0x7d, 0x6c, 0x2f, 0xab, 0xdf, 0xf3, 0xba, 0x7b,
0x47, 0xcf, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x10, 0x71, 0xdd, 0xb7, 0x03, 0x00, 0x00,
}
func (m *Options) Marshal() (dAtA []byte, err error) {

View File

@@ -21,8 +21,13 @@ message Options {
string binary_name = 6;
// runc root directory
string root = 7;
// criu binary path
string criu_path = 8;
// criu binary path.
//
// Deprecated: runc option --criu is now ignored (with a warning), and the
// option will be removed entirely in a future release. Users who need a non-
// standard criu binary should rely on the standard way of looking up binaries
// in $PATH.
string criu_path = 8 [deprecated = true];
// enable systemd cgroups
bool systemd_cgroup = 9;
// criu image path

View File

@@ -250,7 +250,7 @@ func (s *service) Cleanup(ctx context.Context) (*taskAPI.DeleteResponse, error)
root = opts.Root
}
r := process.NewRunc(root, path, ns, runtime, "", false)
r := process.NewRunc(root, path, ns, runtime, false)
if err := r.Delete(ctx, s.id, &runcC.DeleteOpts{
Force: true,
}); err != nil {