Conversation
helsaawy
reviewed
May 15, 2023
Contributor
helsaawy
left a comment
There was a problem hiding this comment.
We're basically expecting all future LCOW images to have NFS support, right?
| execHelper := func(ctrID string, cmd []string) (string, string, int) { | ||
| stdout, stderr, errcode := execContainer(t, client, ctx, ctrID, cmd) | ||
| if errcode != 0 { | ||
| t.Logf("stdout: %s \n\n stderr: %s\n\n", stdout, stderr) |
Contributor
There was a problem hiding this comment.
can you add a t.Helper() call before the t.Logf call?
There was a problem hiding this comment.
Do we want the t.Helper() to be in the errcode block of code or outside of it?
Contributor
Author
There was a problem hiding this comment.
Shouldn't matter I think. Either works.
c7557e5 to
26f263e
Compare
Contributor
Author
Yeah, we just want to ensure that the kernel has the required NFS client modules. If the assumptions changes in the future, we will have to update the test. |
helsaawy
approved these changes
May 15, 2023
LCOW kernel needs to be built with certain config options(`CONFIG_NFS_FS=y`, `CONFIG_NFS_V4=y` & `CONFIG_NFS_V4_1=y`)_in order to be able to successfully run a NFS client and mount a NFS inside a container. This test attempts to mount a (fake) NFS server to ensure that the kernel has the capabilities of running a NFS client. We don't mount a real NFS server because creating a real NFS server that will work in all kinds of test environments is not simple. Instead, we look at the error returned by the NFS mount operation and decide if the failure is because the server wasn't available (i.e a `Connection refused` error) or because the kernel doesn't support NFS clients (`No Device` error). Limitations on different approaches of starting a real NFS server: 1. Starting another LCOW container that runs a NFS server: By default on Linux the NFS server runs in the kernel and to enable that the kernel must be built with `NFSD_*` config options (note that the config options for running NFS server are different than the config options required for NFS client), which we don't currently do and it doesn't make sense to just enable these options for a test. 2. Running a userspace NFS server: There are a few userspace NFS server projects but getting them to run inside the UtilityVM wasn't very easy. We didn't want to spend a lot of time on this test. 3. Running NFS server on the windows host: Not all builds of windows support this so the test won't run in all environments. Signed-off-by: Amit Barve <[email protected]>
kiashok
pushed a commit
to kiashok/hcsshim
that referenced
this pull request
Oct 3, 2023
LCOW kernel needs to be built with certain config options(`CONFIG_NFS_FS=y`, `CONFIG_NFS_V4=y` & `CONFIG_NFS_V4_1=y`)_in order to be able to successfully run a NFS client and mount a NFS inside a container. This test attempts to mount a (fake) NFS server to ensure that the kernel has the capabilities of running a NFS client. We don't mount a real NFS server because creating a real NFS server that will work in all kinds of test environments is not simple. Instead, we look at the error returned by the NFS mount operation and decide if the failure is because the server wasn't available (i.e a `Connection refused` error) or because the kernel doesn't support NFS clients (`No Device` error). Limitations on different approaches of starting a real NFS server: 1. Starting another LCOW container that runs a NFS server: By default on Linux the NFS server runs in the kernel and to enable that the kernel must be built with `NFSD_*` config options (note that the config options for running NFS server are different than the config options required for NFS client), which we don't currently do and it doesn't make sense to just enable these options for a test. 2. Running a userspace NFS server: There are a few userspace NFS server projects but getting them to run inside the UtilityVM wasn't very easy. We didn't want to spend a lot of time on this test. 3. Running NFS server on the windows host: Not all builds of windows support this so the test won't run in all environments. Signed-off-by: Amit Barve <[email protected]> (cherry picked from commit e322ac5) Signed-off-by: Kirtana Ashok <[email protected]>
kiashok
pushed a commit
to kiashok/hcsshim
that referenced
this pull request
Oct 3, 2023
LCOW kernel needs to be built with certain config options(`CONFIG_NFS_FS=y`, `CONFIG_NFS_V4=y` & `CONFIG_NFS_V4_1=y`)_in order to be able to successfully run a NFS client and mount a NFS inside a container. This test attempts to mount a (fake) NFS server to ensure that the kernel has the capabilities of running a NFS client. We don't mount a real NFS server because creating a real NFS server that will work in all kinds of test environments is not simple. Instead, we look at the error returned by the NFS mount operation and decide if the failure is because the server wasn't available (i.e a `Connection refused` error) or because the kernel doesn't support NFS clients (`No Device` error). Limitations on different approaches of starting a real NFS server: 1. Starting another LCOW container that runs a NFS server: By default on Linux the NFS server runs in the kernel and to enable that the kernel must be built with `NFSD_*` config options (note that the config options for running NFS server are different than the config options required for NFS client), which we don't currently do and it doesn't make sense to just enable these options for a test. 2. Running a userspace NFS server: There are a few userspace NFS server projects but getting them to run inside the UtilityVM wasn't very easy. We didn't want to spend a lot of time on this test. 3. Running NFS server on the windows host: Not all builds of windows support this so the test won't run in all environments. Signed-off-by: Amit Barve <[email protected]> (cherry picked from commit e322ac5) Signed-off-by: Kirtana Ashok <[email protected]>
kiashok
pushed a commit
to kiashok/hcsshim
that referenced
this pull request
Oct 3, 2023
LCOW kernel needs to be built with certain config options(`CONFIG_NFS_FS=y`, `CONFIG_NFS_V4=y` & `CONFIG_NFS_V4_1=y`)_in order to be able to successfully run a NFS client and mount a NFS inside a container. This test attempts to mount a (fake) NFS server to ensure that the kernel has the capabilities of running a NFS client. We don't mount a real NFS server because creating a real NFS server that will work in all kinds of test environments is not simple. Instead, we look at the error returned by the NFS mount operation and decide if the failure is because the server wasn't available (i.e a `Connection refused` error) or because the kernel doesn't support NFS clients (`No Device` error). Limitations on different approaches of starting a real NFS server: 1. Starting another LCOW container that runs a NFS server: By default on Linux the NFS server runs in the kernel and to enable that the kernel must be built with `NFSD_*` config options (note that the config options for running NFS server are different than the config options required for NFS client), which we don't currently do and it doesn't make sense to just enable these options for a test. 2. Running a userspace NFS server: There are a few userspace NFS server projects but getting them to run inside the UtilityVM wasn't very easy. We didn't want to spend a lot of time on this test. 3. Running NFS server on the windows host: Not all builds of windows support this so the test won't run in all environments. Signed-off-by: Amit Barve <[email protected]> (cherry picked from commit e322ac5) Signed-off-by: Kirtana Ashok <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LCOW kernel needs to be built with certain config options(
CONFIG_NFS_FS=y,CONFIG_NFS_V4=y&CONFIG_NFS_V4_1=y)_in order to be able to successfully run a NFS client and mount a NFS inside a container. This test attempts to mount a (fake) NFS server to ensure that the kernel has the capabilities of running a NFS client.We don't mount a real NFS server because creating a real NFS server that will work in all kinds of test environments is not simple. Instead, we look at the error returned by the NFS mount operation and decide if the failure is because the server wasn't available (i.e a
Connection refusederror) or because the kernel doesn't support NFS clients (No Deviceerror).Limitations on different approaches of starting a real NFS server:
NFSD_*config options (note that the config options for running NFS server are different than the config options required for NFS client), which we don't currently do and it doesn't make sense to just enable these options for a test.