Skip to content

Conversation

@alban
Copy link
Contributor

@alban alban commented Jul 18, 2018

PR #1753 introduced a test on the mount flags but the binary operator was wrong, see #1753 (comment)

This was noticed when investigating opencontainers/runtime-tools#651

Symptoms: in the container, /proc/self/mountinfo displays some mounts as follow:

296 279 0:67 / /tmp rw,nosuid - tmpfs /home/dpark/go/src/github.com/opencontainers/runc/tmpfs rw,size=65536k,mode=755

Signed-off-by: Alban Crequy [email protected]


/cc @wking

PR opencontainers#1753 introduced a test on the mount flags but the binary operator
was wrong, see opencontainers#1753 (comment)

This was noticed when investigating opencontainers/runtime-tools#651

Symptoms: in the container, /proc/self/mountinfo displays some mounts as
follow:

296 279 0:67 / /tmp rw,nosuid - tmpfs /home/dpark/go/src/github.com/opencontainers/runc/tmpfs rw,size=65536k,mode=755

Signed-off-by: Alban Crequy <[email protected]>
Copy link
Contributor

@wking wking left a comment

Choose a reason for hiding this comment

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

Fix looks good; sorry about the bug!

@mrunalp
Copy link
Contributor

mrunalp commented Jul 19, 2018

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael
Copy link
Member

crosbymichael commented Jul 25, 2018

LGTM

Approved with PullApprove

@crosbymichael crosbymichael merged commit b4e2ecb into opencontainers:master Jul 25, 2018
alban added a commit to kinvolk-archives/runtime-tools that referenced this pull request Jul 31, 2018
The runtime-spec says that [mount source is optional](
https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#mounts).
So let's relax condition of the mount source path check, so that it only
checks for an empty mount source. Ditto for the type field.

The 'mount' test now tries different mount options: bind and not bind,
recursive or not, different mount propagation modes.

runc passes the test after opencontainers/runc#1845

Based on work from: Dongsu Park <[email protected]>

Signed-off-by: Alban Crequy <[email protected]>
alban added a commit to kinvolk-archives/runtime-tools that referenced this pull request Jul 31, 2018
The runtime-spec says that [mount source is optional](
https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#mounts).
So let's relax condition of the mount source path check, so that it only
checks for an empty mount source. Ditto for the type field.

The 'mount' test now tries different mount options: bind and not bind,
recursive or not, different mount propagation modes.

runc passes the test after opencontainers/runc#1845

Closes: opencontainers#651

Based on work from: Dongsu Park <[email protected]>
Signed-off-by: Alban Crequy <[email protected]>
alban added a commit to kinvolk-archives/runtime-tools that referenced this pull request Jul 31, 2018
The runtime-spec says that [mount source is optional](
https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#mounts).
So let's relax condition of the mount source path check, so that it only
checks for an empty mount source. Ditto for the type field.

The 'mount' test now tries different mount options: bind and not bind,
recursive or not, different mount propagation modes.

runc passes the test after opencontainers/runc#1845

Closes: opencontainers#651

Based on work from: Dongsu Park <[email protected]>
Signed-off-by: Alban Crequy <[email protected]>
alban added a commit to kinvolk-archives/runtime-tools that referenced this pull request Jul 31, 2018
The runtime-spec says that [mount source is optional](
https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#mounts).
So let's relax condition of the mount source path check, so that it only
checks for an empty mount source. Ditto for the type field.

The 'mount' test now tries different mount options: bind and not bind,
recursive or not, different mount propagation modes.

runc passes the test after opencontainers/runc#1845

Closes: opencontainers#651

Based on work from: Dongsu Park <[email protected]>
Signed-off-by: Alban Crequy <[email protected]>
dongsupark pushed a commit to kinvolk-archives/runtime-tools that referenced this pull request Aug 21, 2018
The runtime-spec says that [mount source is optional](
https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#mounts).
So let's relax condition of the mount source path check, so that it only
checks for an empty mount source. Ditto for the type field.

The 'mount' test now tries different mount options: bind and not bind,
recursive or not, different mount propagation modes.

runc passes the test after opencontainers/runc#1845

Closes: opencontainers#651

Based on work from: Dongsu Park <[email protected]>
Signed-off-by: Alban Crequy <[email protected]>
@dongsupark dongsupark deleted the alban/mount-bind-fix1753 branch August 22, 2018 07:19
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.

4 participants