[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)" + 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
On Tue, Jan 26, 2021 at 10:16:53AM +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)"
what's mean Docker host's kernel
- exit
}
exit 1
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
common message can build a func
error_messgae() { echo "[ERROR] $1 module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)" exit 1 }
Thanks, Shenwei
}
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
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)"
what's mean Docker host's kernel
容器所在宿主机的内核
- exit
}
exit 1
ok
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
common message can build a func
error_messgae() { echo "[ERROR] $1 module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)" exit 1 }
ok, i will call $LKP_SRC/lib/log.sh
Thanks, Yinsi
Thanks, Shenwei
}
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
On Tue, Jan 26, 2021 at 11:03:34AM +0800, Liu Yinsi wrote:
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)"
what's mean Docker host's kernel
容器所在宿主机的内核
you can direct use kernel, no need docker host
Thanks, Shenwei
- exit
}
exit 1
ok
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
common message can build a func
error_messgae() { echo "[ERROR] $1 module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)" exit 1 }
ok, i will call $LKP_SRC/lib/log.sh
Thanks, Yinsi
Thanks, Shenwei
}
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
- echo "[ERROR] cifs module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)"
what's mean Docker host's kernel
容器所在宿主机的内核
you can direct use kernel, no need docker host
because this is the original error report, so i copy this error line as error message.
when nfs module is not loaded, and execute os-nfs/start ================================================================== ----> kernel module nfs is missing ----> ----> ERROR: nfs module is not loaded in the Docker host's kernel (try: modprobe nfs) ---->
Thanks, Yinsi
Thanks, Shenwei
- exit
}
exit 1
ok
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
common message can build a func
error_messgae() { echo "[ERROR] $1 module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)" exit 1 }
ok, i will call $LKP_SRC/lib/log.sh
Thanks, Yinsi
Thanks, Shenwei
}
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