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

Allow + in container ID #675

Merged
merged 1 commit into from May 25, 2016
Merged

Allow + in container ID #675

merged 1 commit into from May 25, 2016

Conversation

pankit
Copy link
Contributor

@pankit pankit commented Mar 22, 2016

Signed-off-by: pankit thapar pankit@umich.edu

Signed-off-by: pankit thapar <pankit@umich.edu>
@mikebrow
Copy link
Member

4 prs for a one char edit? :-) I've been there

Here you go for next time when there is a merge conflict:

<< from your branch directory >>>
git checkout master
git fetch upstream master --tags
git merge upstream/master
git push origin master
<<< now your master on git hub and local is up to date with the current master>>>
git checkout yourBranchName
git rebase master
<<< follow on screen instructions... if there's an issue rebasing you might need to open up the file and fix it  you'll see >>>>>>> arrows indicating what you need to fix up... then you continue your rebase using the on screen instructions >>>>
<<< run make / make test and check your fix etc.>>>
git add <the files you edited>
git commit -s --amend 
git push -f origin yourBranchName
<< go back into your PR on line and you will now see no merge conflicts!! >>

@pankit
Copy link
Contributor Author

pankit commented Mar 22, 2016

@mikebrow thanks for the guidance. I missed signoff once time and then it just went down the hill from there on. :)

@mikebrow
Copy link
Member

Sure np... I've done the same before :-) If you forget to sign ... I believe you should be able to just sign and force push to update it...

git commit -s --amend
git push -f origin yourBranchName

@marcosnils
Copy link
Contributor

@mikebrow IIUC containerId format should be valid path names as the state needs to be persisted in disk. It's totally valid to have a file called "something+stuff" so I guess this change makes sense.

@mikebrow
Copy link
Member

Limiting to ascii letters might be wrong as well... while thinking about it.

@wking
Copy link
Contributor

wking commented Mar 22, 2016

On Tue, Mar 22, 2016 at 09:57:43AM -0700, Marcos Nils wrote:

… containerId should be valid path names as the state needs to be
persisted in disk.

Even this requirement was lifted in opencontainers/runtime-spec#225.

@mikebrow
Copy link
Member

Yes... I think Marco meant runc might need some code if the id can't be used as a path name..

@marcosnils
Copy link
Contributor

@mikebrow exactly.

@pankit
Copy link
Contributor Author

pankit commented Mar 22, 2016

@mikebrow I added just the + because I have a use case where the foo+abc is used as a dir name and I think we should allow the containers to be named following the same rules as file/dir names.
Yes, I agree with you that we should allow more chars that fall into this category.

@mikebrow
Copy link
Member

Hmm.. thinking out loud...

  1. do a touch cid to see if the OS supports it as a filename and report otherwise
  2. figure out how to the fix the expression for the plethora of unicode chars that should also be valid
  3. hash the passed in cid
  4. do nothing...

@wking
Copy link
Contributor

wking commented Mar 22, 2016

On Tue, Mar 22, 2016 at 10:27:12AM -0700, Mike Brown wrote:

Yes... I think Marco meant runc might need some code if the id can't
be used as a path name..

Like percent-encoding 1? Or just base64-encoding all container IDs
before using them as filenames 2?

@wking
Copy link
Contributor

wking commented Mar 22, 2016

On Tue, Mar 22, 2016 at 10:37:47AM -0700, Mike Brown wrote:

  1. hash the passed in cid

This probably isn't what you want, since runC's ‘list’ walks the set
of available containers. There's no list-like command in the OCI
spec, but something like base64 would give you filesystem-safe names
that are still decodable.

@mikebrow
Copy link
Member

@wking yes.... and if hashed could fix list to get the cid from the state, after I store the original id in it... But yes your idea would also work.

@mikebrow
Copy link
Member

Issue opened ... #676 to address this secondary discussion

@wking
Copy link
Contributor

wking commented Mar 22, 2016

On Tue, Mar 22, 2016 at 10:41:44AM -0700, Mike Brown wrote:

… if hashed could fix list to get the cid from the state, after I
store the original id in it…

Good point, and hashing has nice sharding properties (I'm not sure how
far runC's registry is intended to scale). Either way, it will become
a runC implementation detail, and not a limitation that's exposed to
the runtime caller.

@pankit
Copy link
Contributor Author

pankit commented Mar 23, 2016

@mikebrow should we close this PR or let it go through while #676 is implemented?

@mikebrow
Copy link
Member

No need to close this one unless someone comes along and says we should not have '+' chars in cid names.

@crosbymichael crosbymichael added this to the 1.0.0 milestone May 25, 2016
@crosbymichael
Copy link
Member

LGTM

@wking wking mentioned this pull request May 25, 2016
@LK4D4
Copy link
Contributor

LK4D4 commented May 25, 2016

LGTM

@LK4D4 LK4D4 merged commit d578986 into opencontainers:master May 25, 2016
stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
Add ambient and bounding capability support
stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
Fix a JSON typo which snuck in with eb114f0 (Add ambient and bounding
capability support, 2017-02-02, opencontainers#675).

Signed-off-by: W. Trevor King <wking@tremily.us>
stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
Roll back the genericization from 718f9f3 (minor narrative cleanup
regarding config compatibility, 2017-01-30, opencontainers#673).  Lifting the
restriction there seems to have been motivated by "Solaris supports
capabilities", but that was before the split into a capabilities
object which happened in eb114f0 (Add ambient and bounding capability
support, 2017-02-02, opencontainers#675).  It's not clear if Solaris supports
ambient caps, or what Solaris API noNewPrivileges were punting to [1].
And John Howard has recently confirmed that Windows does not support
capabilities and is unlikely to do so in the future [2].  He also
confirmed that Windows does not support rlimits [3].  John's statement
didn't directly address noNewPrivileges, but we can always restore any
of these properties to the Solaris/Windows platforms if/when we get
docs about which API we're punting to on those platforms.

Also add some backticks, remove the hyphens in "OPTIONAL) - the",
standardize lines I touch to use "the process" [4], and use four-space
indents here to keep Pandoc happy (see 7795661 (runtime.md: Fix
sub-bullet indentation, 2016-06-08, opencontainers#495).

[1]: opencontainers/runtime-spec#673 (comment)
[2]: opencontainers/runtime-spec#810 (comment)
[3]: opencontainers/runtime-spec#835 (comment)
[4]: opencontainers/runtime-spec#809 (comment)

Signed-off-by: W. Trevor King <wking@tremily.us>
@thaJeztah thaJeztah mentioned this pull request Sep 3, 2022
5 tasks
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.

None yet

7 participants