-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
While looking into #2639 I found out we have two --rootless flags with different meaning:
- Global flag, documented in
runc helpas
--rootless value ignore cgroup permission errors ('true', 'false', or 'auto') (default: "auto")
- A flag specific to
spec, documented inrunc spec --helpas
--rootless generate a configuration for a rootless container
The problem here is non-uniform syntax:
-
The first (global) option applies (I guess) to
create,run,execandupdate), the second applies tospec. -
The second option is true boolean, meaning that specifying
--rootlessis equivalent to--rootless=true. This is what I would expect. The first option is "bool-or-auto" meaning that specifying--rootlessis equivalent to no option, and to actually enable rootless mode one has to use--rootless=true.
Both items are confusing, second is more.
Proposal
I think we can do the following to rectify this:
-
Deprecate the local
--rootlessflag forrunc spec, adding a warning that the global one should be used. -
Make the global
--rootlessequivalent to--rootless=yes, and warn that using--rootless=autois deprecated (as it is "auto" without specifying any option). -
Eventually remove the local
--rootlessand the global--rootless=auto.
@AkihiroSuda @cyphar @mrunalp what do you think?