Skip to content
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

Deprecate UserNSSize, since we don't use it #1238

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Nov 21, 2022

Podman and Buildah do not use this field, and I
know of no users of it, remove it from docs and
the default conf file, so users will not expect
it to do anything.

Leaving implementation in the slight chance someone has used it in a non containers project.

Fixes: containers/podman#16562

Signed-off-by: Daniel J Walsh [email protected]

@rhatdan
Copy link
Member Author

rhatdan commented Nov 21, 2022

@giuseppe @anotherwon PTAL

@giuseppe
Copy link
Member

I was working on exactly the same fix :) LGTM

I'll prepare a patch for Podman to honor the settings after auto:size=%d

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 21, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Comment on lines 273 to 277
Default way to to create a USER namespace for the container.
Options are:
`private` Create private USER Namespace for the container.
`host` Share host USER Namespace with the container.

Copy link
Member

Choose a reason for hiding this comment

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

This is removing the wrong description.

@@ -213,7 +213,7 @@ type ContainersConfig struct {
// UserNS indicates how to create a User namespace for the container
UserNS string `toml:"userns,omitempty"`

// UserNSSize how many UIDs to allocate for automatically created UserNS
// UserNSSize Deprecated, no user of this field is known.
Copy link
Member

Choose a reason for hiding this comment

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

You should use this format

// UserNSSize how many UIDs to allocate for automatically created UserNS
// Deprecated: no user of this field is known
UserNSSize int `toml:"userns_size,omitempty,omitzero"`

This will make certain linters complain if it used anywhere.

@@ -157,7 +157,7 @@ const (
DefaultRootlessSignaturePolicyPath = "containers/policy.json"
// DefaultShmSize is the default upper limit on the size of tmpfs mounts.
DefaultShmSize = "65536k"
// DefaultUserNSSize indicates the default number of UIDs allocated for user namespace within a container.
// DefaultUserNSSize Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

same as the other comment, fix the formatting here

Podman and Buildah do not use this field, and I
know of no users of it, remove it from docs and
the default conf file, so users will not expect
it to do anything.

Leaving implementation in the slight chance someone
has used it in a non containers project.

Fixes: containers/podman#16562

Signed-off-by: Daniel J Walsh <[email protected]>
@anotherwon
Copy link

Seems okay to me, though I don't know the codebase.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

/lgtm

@rhatdan rhatdan added the lgtm label Nov 22, 2022
@openshift-merge-robot openshift-merge-robot merged commit 745bc2d into containers:main Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

userns_size has no effect
5 participants