Uh oh!
There was an error while loading. Please reload this page.
Update cgroupsPath to cgroupName and clarify the semantics around that. - #270
Update cgroupsPath to cgroupName and clarify the semantics around that.#270vishh wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Do we need the explicit allowed-character restrictions if we're punting to “regular filesystem rules” (which are a bit more relaxed than the character restrictions you list here)?
There was a problem hiding this comment.
In terms of characters, only the ones mentioned above are supported. But path construction follow filesystem path rules.
@hqhq: What link do you need?
There was a problem hiding this comment.
On Mon, Dec 28, 2015 at 11:56:49AM -0800, Vish Kannan wrote:
+In general and unless otherwise specified, regular filesystem path rules apply.
In terms of characters, only the ones mentioned above are
supported. But path construction follow filesystem path rules.
@hqhq: What link do you need?
I can't find a reference to this in the Linux kernel docs, but POSIX
says pretty clearly that everything except the null and slash bytes
are fair game as long as the full byte name isn't ‘.’ or ‘..’ 1.
There was a problem hiding this comment.
@vishh I was thinking of a link about the definition of "what is the allowable characters of a regular filesystem path", if that does exist. Or I'm also OK if we can't find a proper link because I think that's common enough to be accepted.
There was a problem hiding this comment.
Note that this is false for systemd, / within the parent path are rejected by the dbus service.
wking
commented
Dec 16, 2015
I left a few nits inline, but except for 1 this PR is a wash for me. |
hqhq
commented
Dec 17, 2015
Any thoughts about how systemd implementation should perform on this? (not a question for this PR, but for the general cgroupsPath/Name definition) |
mrunalp
commented
Dec 17, 2015
@hqhq systemd api work with a slice and a scope name, so would have to split the name into those parts and make the call to create a scope. |
hqhq
commented
Dec 22, 2015
@mrunalp So we want users on systemd cgroup specify the exactly right |
Signed-off-by: Vishnu kannan <vishnuk@google.com>
vishh
commented
Dec 28, 2015
There was a problem hiding this comment.
Why? There are only two options here, an empty string "" or a valid name.
There isn't a third system default.
On Mon, Dec 28, 2015 at 12:11 PM, W. Trevor King notifications@github.com
wrote:
In runtime_config_linux.go
#270 (comment):@@ -25,10 +25,10 @@ type LinuxRuntime struct {
// Resources contain cgroup information for handling resource constraints
// for the container
Resources *Resourcesjson:"resources,omitempty"
- // CgroupsPath specifies the path to cgroups that are created and/or joined by the container.
- // The path is expected to be relative to the cgroups mountpoint.
- // If resources are specified, the cgroups at CgroupsPath will be updated based on resources.
- CgroupsPath *string
json:"cgroupsPath,omitempty"- // CgroupsName specifies the name of to cgroups that are created and/or joined by the container.
- // The name is expected to be absolute.
- // If resources are specified, the CgroupsName cgroups will be updated based on resources.
- CgroupsName string
json:"cgroupsName,omitempty"This should keep the *string from #233
#233.—
Reply to this email directly or view it on GitHub
https://github.com/opencontainers/specs/pull/270/files#r48502724.
There was a problem hiding this comment.
On Mon, Dec 28, 2015 at 12:14:05PM -0800, Vish Kannan wrote:
- // CgroupsName specifies the name of to cgroups that are created and/or joined by the container.
- // The name is expected to be absolute.
- // If resources are specified, the CgroupsName cgroups will be updated based on resources.
- CgroupsName string
json:"cgroupsName,omitempty"Why? There are only two options here, an empty string "" or a valid name.
There isn't a third system default.
This:
"cgroupsName": "",
seems illegal to me (it's not absolute). If we use missing/null
cgroupsName, we don't have to put in an absolute-path loophole for the
empty string. For more background on nil over empty strings for
“unset”, see 1 and surrounding comments, as well as 2.
vishh
commented
Jan 26, 2016
@mrunalp@crosbymichael: Can you review this patch if you get a chance? |
hqhq
commented
Jan 27, 2016
The major problem is it's not working on systemd cgroup. Should that be concerned in spec? |
mlaventure
commented
Jan 27, 2016
Couldn't we just state that the format of the path depends on the backend and redirect the user to those for more information? |
vishh
commented
Jan 27, 2016
@hqhq: What part of this PR is not working with systemd? |
vishh
commented
Jan 27, 2016
In the case of systemd, would it be possible to translate the path into a On Wed, Jan 27, 2016 at 8:01 AM Kenfe-Mickaël Laventure <
|
mlaventure
commented
Jan 27, 2016
That's certainly doable, although in the unlikely event that systemd changes its syntax or that a new manager chooses something different we would have to update our implementation. |
wking
commented
Jan 27, 2016
On Wed, Jan 27, 2016 at 01:57:31PM -0800, Kenfe-Mickaël Laventure wrote:
I don't know how much stock I'd put in systemd's commitment to |
hqhq
commented
Jan 28, 2016
The intention of I'm not sure what to be defined in specs is the best to cover these. Maybe add a new entry like |
mrunalp
commented
Jan 28, 2016
We should probably leave this out of the spec and handle this in the runtime. Sent from my iPhone
|
vishh
commented
Jan 28, 2016
Leave what out of the Spec? We have to include cgroup names right? On Thu, Jan 28, 2016 at 7:13 AM, Mrunal Patel notifications@github.com
|
mlaventure
commented
Jan 28, 2016
vishh
commented
Mar 4, 2016
@mrunalp@mlaventure@crosbymichael: How do we make progress here? The spec needs to define a standard way to specify cgroups. Systemd is an implementation detail. We need to standardize on the naming format. Otherwise the Spec and the corresponding bundle will not be portable. |
mlaventure
commented
Mar 4, 2016
The issue is that atm both implementations are hugely different. systemd requires a name and a scope (which can't not include any So far the only way I can see us reconciliating both of them is by requiring a cgroup name of the form But I do not find this particularly elegant. |
vishh
commented
Mar 4, 2016
What about converting the Linux format to systemd compatible one when On Fri, Mar 4, 2016, 11:54 AM Kenfe-Mickaël Laventure <
|
@mrunalp