Commit e322ac5
authored
Add test for support of NFS mount (microsoft#1726)
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]>1 parent f1a2711 commit e322ac5
2 files changed
Lines changed: 72 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
0 commit comments