Skip to content

specs-go/config: fix required items type#586

Merged
crosbymichael merged 1 commit into
opencontainers:masterfrom
Mashimiao:specs-config-fix-required-type
Oct 31, 2016
Merged

specs-go/config: fix required items type#586
crosbymichael merged 1 commit into
opencontainers:masterfrom
Mashimiao:specs-config-fix-required-type

Conversation

@Mashimiao

Copy link
Copy Markdown

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.

@wking

wking commented Sep 30, 2016 via email

Copy link
Copy Markdown
Contributor

@Mashimiao

Copy link
Copy Markdown
Author

ping @opencontainers/runtime-spec-maintainers

@cyphar

cyphar commented Oct 26, 2016

Copy link
Copy Markdown
Member

Looks fine to me, but doesn't this need a rebase after the aggressive namespacing patch?

@mrunalp

mrunalp commented Oct 26, 2016

Copy link
Copy Markdown
Contributor

LGTM

Approved with PullApprove

@hqhq

hqhq commented Oct 27, 2016

Copy link
Copy Markdown
Contributor

Needs rebase but why there is no conflict detect?

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
@Mashimiao
Mashimiao force-pushed the specs-config-fix-required-type branch from 125b879 to ef9ce84 Compare October 31, 2016 01:25
@Mashimiao

Mashimiao commented Oct 31, 2016

Copy link
Copy Markdown
Author

rebased
@opencontainers/runtime-spec-maintainers PTAL

@hqhq

hqhq commented Oct 31, 2016

Copy link
Copy Markdown
Contributor

LGTM
But you're pinging the wrong group :)

Approved with PullApprove

@Mashimiao

Copy link
Copy Markdown
Author

Ah, that's my fault... fixed.

Comment thread specs-go/config.go
type LinuxPids struct {
// Maximum number of PIDs. Default is "no limit".
Limit *int64 `json:"limit,omitempty"`
Limit int64 `json:"limit"`

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does 0 mean?

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member

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).

@crosbymichael

crosbymichael commented Oct 31, 2016

Copy link
Copy Markdown
Member

LGTM

Approved with PullApprove

@crosbymichael
crosbymichael merged commit 32aa94e into opencontainers:master Oct 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants