-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
just check hostname with UTS namespace when platform set as linux #75
just check hostname with UTS namespace when platform set as linux #75
Conversation
30e7992
to
1d7ff7c
Compare
@wking IMO, @vbatts means setting 'linux' for Solaris configs. As you know, Linux does not support Solaris's specific settings. |
I think Vincent is talking about why use 'SHOULD' but not 'MUST', for now. If runtime spec says “This MUST NOT be set if platform.os is not $OS”, we need to have codes like this:
|
I'm not sure except Solaris, which platform also need Linux specific settings. |
On Tue, May 24, 2016 at 01:15:07AM -0700, Ma Shimiao wrote:
Instead of guessing what makes sense here, I suggest we push for more Until then, a narrow reading of the spec language after
That sounds like:
But personally I'd rather table this until the spec gets clearer, |
@wking @liangchenye |
On Tue, May 24, 2016 at 07:34:38PM -0700, Ma Shimiao wrote:
I don't see grounds for keeping that behavior in the current spec (see If you're interested in spending the time, I don't mind helping review |
adb9898
to
3514b32
Compare
ping @wking @liangchenye |
With 3514b32 the commit subject looks stale.
And it feels like there should be an earlier check and bail if the
‘linux’ property is completely unset. But since all of linux's child
properties are optional, the way you have it (without an initial “was
‘linux’ set?” check) should work fine.
|
utsExists = true | ||
} | ||
} | ||
|
||
if !utsExists && hostname != "" { | ||
if spec.Platform.OS == "linux" && !utsExists && spec.Hostname != "" { | ||
logrus.Fatalf("Hostname requires a new UTS namespace to be specified as well") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good. But I suggest to change this message Hostname requires a new UTS namespace to be specified as well
.
How about On Linux, hostname requires a UTS namespace to be specified as well
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liangchenye I think that's OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Wed, May 25, 2016 at 08:10:18PM -0700, 梁辰晔 (Liang Chenye) wrote:
- if !utsExists && hostname != "" {
- if spec.Platform.OS == "linux" && !utsExists && spec.Hostname != "" {
logrus.Fatalf("Hostname requires a new UTS namespace to be specified as well")The PR looks good. But I suggest to change this message
Hostname requires a new UTS namespace to be specified as well
. How about
On Linux, hostname requires a UTS namespace to be specified as well
?
You want to keep “new” in the error message too, since 1 has:
Also, when a path is specified, a runtime MUST assume that the setup
for that particular namespace has already been done and error out if
the config specifies anything else related to that namespace.
The UTS hostname condition is just a special case of that general rule
2, and I added it to the spec to avoid surprising people who had
only read the hostname section.
Signed-off-by: Ma Shimiao <[email protected]>
3514b32
to
e754764
Compare
LGTM |
ping @mrunalp |
LGTM |
Signed-off-by: Ma Shimiao [email protected]