Add systemd-cgroup flag option.
Adds a systemd-cgroup flag option that prints an error letting the user know that systemd cgroups are not supported and points them to the relevant issue. Issue #193 PiperOrigin-RevId: 277837162
This commit is contained in:
parent
fe2e0764ac
commit
36837c4ad3
|
@ -46,6 +46,8 @@ var (
|
|||
logFormat = flag.String("log-format", "text", "log format: text (default), json, or json-k8s.")
|
||||
debug = flag.Bool("debug", false, "enable debug logging.")
|
||||
showVersion = flag.Bool("version", false, "show version and exit.")
|
||||
// TODO(gvisor.dev/issue/193): support systemd cgroups
|
||||
systemdCgroup = flag.Bool("systemd-cgroup", false, "Use systemd for cgroups. NOT SUPPORTED.")
|
||||
|
||||
// These flags are unique to runsc, and are used to configure parts of the
|
||||
// system that are not covered by the runtime spec.
|
||||
|
@ -136,6 +138,12 @@ func main() {
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
// TODO(gvisor.dev/issue/193): support systemd cgroups
|
||||
if *systemdCgroup {
|
||||
fmt.Fprintln(os.Stderr, "systemd cgroup flag passed, but systemd cgroups not supported. See gvisor.dev/issue/193")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
var errorLogger io.Writer
|
||||
if *logFD > -1 {
|
||||
errorLogger = os.NewFile(uintptr(*logFD), "error log file")
|
||||
|
|
Loading…
Reference in New Issue