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

Unable to distinguish between uid and gid #57

Open
mriedem opened this issue Oct 6, 2020 · 2 comments
Open

Unable to distinguish between uid and gid #57

mriedem opened this issue Oct 6, 2020 · 2 comments

Comments

@mriedem
Copy link
Member

mriedem commented Oct 6, 2020

This is similar to but different enough from #50 that I'm opening a new issue.

We're backing jupyter notebook storage with s3fs and the jovyan user uid is 1000 and the gid is 100 [1] and everything gets set as 1000 for objects, e.g.:

{
    "AcceptRanges": "bytes",
    "LastModified": "Fri, 25 Sep 2020 20:27:45 GMT",
    "ContentLength": "1085",
    "ETag": "\"4f8c9d9ec745ddb7c3696a0e1273cb11\"",
    "ContentType": "application/octet-stream",
    "Metadata": {
        "ctime": "1601065665",
        "mode": "33152",
        "gid": "1000",
        "uid": "1000",
        "mtime": "1601065664"
    }
}

It looks like the problem is here [2].

The gid being wrong doesn't seem to affect the jupyter notebook application but it's something we'd like to fix since we have these uid/gid values spread through various configs.

[1] https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile#L15
[2]

if _, ok := mountRequest.Opts["kubernetes.io/fsGroup"]; ok {
args = append(args, "-o", "gid="+options.FSGroup)
args = append(args, "-o", "uid="+options.FSGroup)
} else if _, ok := mountRequest.Opts["kubernetes.io/mounterArgs.FsGroup"]; ok {
args = append(args, "-o", "gid="+options.FSGroupNew)
args = append(args, "-o", "uid="+options.FSGroupNew)
}

@mriedem
Copy link
Member Author

mriedem commented Oct 6, 2020

I see there is also a documented limitation in the related helm chart:

https://github.com/IBM/charts/blob/master/repo/ibm-helm/ibm-object-storage-plugin.md#limitations

@nkkashyap
Copy link
Member

Hi @mriedem
The object storage plugin is based on flex volume driver. In case of flex volume driver there is no way to pass the POD's UID to the driver. As a work around, to provide access to the non-root user, the FSGroup ID is set as UID and GID for the volume.

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

No branches or pull requests

2 participants