Skip to content

Conversation

@Mashimiao
Copy link

Signed-off-by: Ma Shimiao [email protected]

msgs = append(msgs, fmt.Sprintf("rlimit type %q is invalid.", process.Rlimits[index].Type))
}
if process.Rlimits[index].Hard < process.Rlimits[index].Soft {
msgs = append(msgs, fmt.Sprintf("hard limit of rlimit %s should not be less than soft limit.", process.Rlimits[index].Type))
Copy link
Contributor

Choose a reason for hiding this comment

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

f175fae looks fine to me vs. the current spec.

I'd rather not refer to array entries by a property of their value (resource Type). I've filed opencontainers/runtime-spec#583, and if/when that lands referencing a particular entry by the resource will be more justified. If the runtime-spec PR is rejected, I can file a follow-up PR here so we report errors by index. Either way, I'm fine with this PR landing as it stands now, since checking with some ambiguity around the error message is better than no checking at all ;).

@mrunalp
Copy link
Contributor

mrunalp commented Oct 3, 2016

LGTM

@mrunalp mrunalp merged commit e129a67 into opencontainers:master Oct 3, 2016
wking pushed a commit to wking/ocitools-v2 that referenced this pull request Oct 13, 2016
Signed-off-by: Ma Shimiao <[email protected]>

Backported to v1.0.0.rc1 from f175fae opencontainers#223 (cherry-pick applied
cleanly).

Signed-off-by: W. Trevor King <[email protected]>
wking pushed a commit to wking/ocitools-v2 that referenced this pull request Oct 15, 2016
Signed-off-by: Ma Shimiao <[email protected]>

Backported to v1.0.0.rc1 from f175fae opencontainers#223 (cherry-pick applied
cleanly).

Signed-off-by: W. Trevor King <[email protected]>
@Mashimiao Mashimiao deleted the validate-add-hard-soft-limit-check branch November 14, 2016 09:30
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.

3 participants