Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pkg: idtools: fix subid files parsing#20725

Merged
vdemeester merged 1 commit into
moby:mastermoby/moby:masterfrom
runcom:fix-subid-files-parsingruncom/docker:fix-subid-files-parsingCopy head branch name to clipboard
Feb 26, 2016
Merged

pkg: idtools: fix subid files parsing#20725
vdemeester merged 1 commit into
moby:mastermoby/moby:masterfrom
runcom:fix-subid-files-parsingruncom/docker:fix-subid-files-parsingCopy head branch name to clipboard

Conversation

@runcom

@runcom runcom commented Feb 26, 2016

Copy link
Copy Markdown
Member

/etc/sub{uid,gid} files can contain #-prefixed lines that are comments.
Fix those files parsing by skipping commented out lines. Add regression
unit test also.

ping @estesp

Signed-off-by: Antonio Murdaca runcom@redhat.com

@runcom

runcom commented Feb 26, 2016

Copy link
Copy Markdown
Member Author

This bug was here before 1.10.0, however this is failing distros like Fedora who ships comments in those files (which will be fixed in later versions of setup). Pls consider adding this to 1.10.3 :)

@runcom
runcom force-pushed the fix-subid-files-parsing branch from 4e4701b to d747283 Compare February 26, 2016 13:59
@thaJeztah

Copy link
Copy Markdown
Member

LGTM

I'll add it to the 1.10.3 milestone, but we probably won't have a 1.10.3

@thaJeztah thaJeztah modified the milestones: 1.10.3, 1.11.0 Feb 26, 2016
@cpuguy83

Copy link
Copy Markdown
Member

LGTM

@runcom

runcom commented Feb 26, 2016

Copy link
Copy Markdown
Member Author

test seems not ok, on it

@runcom
runcom force-pushed the fix-subid-files-parsing branch 3 times, most recently from dad7000 to 83a1d20 Compare February 26, 2016 14:39
@runcom

runcom commented Feb 26, 2016

Copy link
Copy Markdown
Member Author

alright test now works (test name was not capital after Test*) and so it wasn't executed, w/o this patch the test successfully fails:

---> Making bundle: test-unit (in bundles/1.11.0-dev/test-unit)
Fri Feb 26 14:33:08 UTC 2016
--- FAIL: TestParseSubidFileWithNewlinesAndComments (0.00s)
    idtools_unix_test.go:260: Cannot parse subuid/gid information: Format not correct for /tmp/parsesubid713917116/testsubuid file
FAIL
coverage: 31.6% of statements
FAIL    github.com/docker/docker/pkg/idtools    0.004s

moving again to merge

@estesp

estesp commented Feb 26, 2016

Copy link
Copy Markdown
Contributor

Thanks @runcom!

Since Docker is already skipping newlines in /etc/sub{uid,gid},
this patch skips commented out lines - otherwise Docker fails to start.
Add unit test also.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
@runcom
runcom force-pushed the fix-subid-files-parsing branch from 83a1d20 to bf04d68 Compare February 26, 2016 14:43
@runcom

runcom commented Feb 26, 2016

Copy link
Copy Markdown
Member Author

@estesp :)

vdemeester added a commit that referenced this pull request Feb 26, 2016
pkg: idtools: fix subid files parsing
@vdemeester
vdemeester merged commit b2a15a2 into moby:master Feb 26, 2016
@runcom
runcom deleted the fix-subid-files-parsing branch February 26, 2016 20:31
@tiborvass tiborvass mentioned this pull request Mar 7, 2016
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.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.