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

Fix VFS vs quota regression #35827

Merged
merged 2 commits into from
Dec 22, 2017
Merged

Fix VFS vs quota regression #35827

merged 2 commits into from
Dec 22, 2017

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Dec 18, 2017

- What I did
Fixed #35815

- How I did it

  1. ENOSYS from mknod() is now treated as "quota not supported".
  2. Any errors returned from quota.NewControl() are now ignored (and logged).

- How to verify it
Start daemon with vfs driver backed by osxfs

- Description for the changelog
Fix vfs graph driver failure to initialize because of failure to setup fs quota

If mknod() returns ENOSYS, it most probably means quota is not supported
here, so return the appropriate error.

This is a conservative* fix to regression in vfs graph driver introduced
by commit 7a1618c ("add quota support to VFS graphdriver").
On some filesystems, vfs fails to init with the following error:

> Error starting daemon: error initializing graphdriver: Failed to mknod
> /go/src/github.com/docker/docker/bundles/test-integration/d6bcf6de610e9/root/vfs/backingFsBlockDev:
> function not implemented

Reported-by: Brian Goff <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
@thaJeztah
Copy link
Member

ping @cpuguy83 PTAL

/cc @sargun

@kolyshkin
Copy link
Contributor Author

Now this is a rather conservative fix, only making ENOSYS from mknod() a special case. A less conservative fix would be to treat any error from quota.NewControl() as "quota not supported", essentially ignoring any errors during quota init.

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@sargun
Copy link
Contributor

sargun commented Dec 19, 2017

@kolyshkin I would change to making it so that any error returned from initializing quota in the VFS driver code marks it as quota not supported. It'd also fix the user namespaces case in a general way.

@kolyshkin
Copy link
Contributor Author

@sargun makes sense. I will keep this patch (as it makes sense for other graphdrivers, too) and add another one.

This is a fix to regression in vfs graph driver introduced by
commit 7a1618c ("add quota support to VFS graphdriver").

On some filesystems, vfs fails to init with the following error:

> Error starting daemon: error initializing graphdriver: Failed to mknod
> /go/src/github.com/docker/docker/bundles/test-integration/d6bcf6de610e9/root/vfs/backingFsBlockDev:
> function not implemented

As quota is not essential for vfs, let's ignore (but log as a warning) any error
from quota init.

Signed-off-by: Kir Kolyshkin <[email protected]>
@sargun
Copy link
Contributor

sargun commented Dec 20, 2017

LGTM.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@yongtang
Copy link
Member

All tests passed now, including z 🎉

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