kata-containers / runtime

Kata Containers version 1.x runtime (for version 2.x see https://github.com/kata-containers/kata-containers).
https://katacontainers.io/
Apache License 2.0
2.1k stars 375 forks source link

refactor guest storage mountpoint structure #372

Closed bergwolf closed 3 years ago

bergwolf commented 6 years ago

Currently inside the guest, we mount all storages under kataGuestSharedDir that is actually the mount point of 9pfs. This might confuse the 9pfs, e.g., these internal volume mountpoints directories are also visible to host side via 9pfs. IMO we should consider refactor a bit so that we have following mountpoint structure:

@amshinde WDYT?

jodh-intel commented 6 years ago

This sounds like a very good idea to me.

Related: https://github.com/kata-containers/runtime/pull/357#issuecomment-394558386.

/cc @grahamwhaley.

sboeuf commented 6 years ago

@bergwolf better organization by the introduction of known subdirs, this SGTM !

grahamwhaley commented 6 years ago

Sounds good to me as well. Even if we've not actually seen any issues with the current nested/re-used directory setup, it makes a lot of sense to split these out into obviously named/placed subdirs.

jodh-intel commented 6 years ago

The only issue I can think of is that we'll need to keep the subdir names short - see https://github.com/kata-containers/runtime/pull/294.

sboeuf commented 6 years ago

I don't think this is an issue since we're not referencing any socket path from there.

harche commented 6 years ago

@bergwolf that sounds like a good idea. Because kata keeps everything in shared 9p I introduced /ephemeral/ in https://github.com/kata-containers/runtime/pull/307

But If we have a sandbox specific storage like /run/kata-containers/storages/, as you have suggested above, then we can have ephemeral go in /run/kata-containers/storages/ephemeral/<volume-name>