-
Notifications
You must be signed in to change notification settings - Fork 557
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
specs-go/config: fix required items type #586
specs-go/config: fix required items type #586
Conversation
125b879 looks good to me. The associated JSON Schemas need
'required' entries for these fields as well, but that can happen in a
follow-up PR if you don't want to handle it here.
|
ping @opencontainers/runtime-spec-maintainers |
Looks fine to me, but doesn't this need a rebase after the aggressive namespacing patch? |
Needs rebase but why there is no conflict detect? |
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
125b879
to
ef9ce84
Compare
rebased |
Ah, that's my fault... fixed. |
@@ -300,7 +300,7 @@ type LinuxCPU struct { | |||
// LinuxPids for Linux cgroup 'pids' resource management (Linux 4.3) | |||
type LinuxPids struct { | |||
// Maximum number of PIDs. Default is "no limit". | |||
Limit *int64 `json:"limit,omitempty"` | |||
Limit int64 `json:"limit"` |
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.
Isn't nil
here meaning no limit?
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.
What does 0
mean?
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.
@crosbymichael, nil
is not allowed because limit
is required.
@stevvooe, I expect 0 should be illegal. Can you file a separate PR to require strictly positive value?
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.
From the kernel side, 0
is functionally identical to 1
(because you can join a cgroup even if it has a limit of 0
).
Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com
These items are defined as
required
, I'm not sure the history, but I think they should not be pointer type.