On Mon, Jan 25, 2021 at 06:20:18PM +0800, Liu Yinsi wrote:
[why] sparrow/2-network/nfs: modprobe nfs modprobe nfsd
sparrow/2-network/cifs: modprobe cifs
when locally deploy compass-ci, the above codes have modprobe nfs, nfsd, cifs, no need to do again when execute sparrow/4-docker/buildall(deploy containers), exit and report error message to function callers is better.
Signed-off-by: Liu Yinsi liuyinsi@163.com
container/initrd-cifs/start | 3 ++- container/os-cifs/start | 3 ++- container/os-nfs/start | 6 ++++-- container/result-cifs/start | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/container/initrd-cifs/start b/container/initrd-cifs/start index 77558a1..c70b318 100755 --- a/container/initrd-cifs/start +++ b/container/initrd-cifs/start @@ -5,7 +5,8 @@ . $CCI_SRC/container/defconfig.sh
lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- echo "[ERROR] cifs module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)"
if you need log format you can introduce LKP_SRC/lib/log.sh
log_error messgae
Thanks, Shenwei
- exit
}
docker_rm initrd-cifs diff --git a/container/os-cifs/start b/container/os-cifs/start index 5e08238..6df167f 100755 --- a/container/os-cifs/start +++ b/container/os-cifs/start @@ -5,7 +5,8 @@ . $CCI_SRC/container/defconfig.sh
lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- echo "[ERROR] cifs module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)"
- exit
}
docker_rm os-cifs diff --git a/container/os-nfs/start b/container/os-nfs/start index 8b8ff5f..3b0ebb5 100755 --- a/container/os-nfs/start +++ b/container/os-nfs/start @@ -5,10 +5,12 @@ . $CCI_SRC/container/defconfig.sh
lsmod | grep -q "^nfs\s" || {
- sudo modprobe nfs
- echo "[ERROR] nfs module is not loaded in the Docker host's kernel (try: sudo modprobe nfs)"
- exit
} lsmod | grep -q "^nfsd\s" || {
- sudo modprobe nfsd
- echo "[ERROR] nfsd module is not loaded in the Docker host's kernel (try: sudo modprobe nfsd)"
- exit
}
# Several nfs servers running will cause conflict, so rm an old before running a new nfs server docker. diff --git a/container/result-cifs/start b/container/result-cifs/start index 2d6acba..3992cdd 100755 --- a/container/result-cifs/start +++ b/container/result-cifs/start @@ -5,7 +5,8 @@ . $CCI_SRC/container/defconfig.sh
lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- echo "[ERROR] cifs module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)"
- exit
}
docker_rm result-cifs
2.23.0