Skip to content

Consider changing NodePublish to NodePrepare #96

@cpuguy83

Description

@cpuguy83

Right now, NodePublish is used to instruct the storage driver to set everything up that's required for the node, get everything mounted, etc.

One issue with this approach is we end up having to manage mounts in the runtime's mount namespace. Often this leads to leakages, difficulty in telling if something needs to be mounted or not, etc.

Instead we can change this to be more of a Prepare type statement where the SP does everything except mount and instead returns a mount struct (or list of mounts) which the caller would need to perform.
This would allow passing the actual mount request to the container runtime to deal with (in the container's mount namespace even).
This also has the benefit that the SP does not need access to the mount target.

I'm not sure what would need to be returned for block storage here since nothing is mounted (maybe an mknod? this is platform dependent, maybe nothing at all is required), but I think there would still be benefit here.

Note that this is the approach being used for containerD storage drivers: https://godoc.org/github.com/containerd/containerd/snapshot#Snapshotter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions