[PATCH v2 compass-ci] 1-storage/tiny: add mount path

Signed-off-by: Hu XueJiao <1034502035@qq.com> --- sparrow/1-storage/tiny | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sparrow/1-storage/tiny b/sparrow/1-storage/tiny index e589937..538f45d 100755 --- a/sparrow/1-storage/tiny +++ b/sparrow/1-storage/tiny @@ -26,3 +26,13 @@ dirs=( ) mkdir -p "${dirs[@]}" + +[ -n "$os_mount" ] && { + if [ "$os_mount" = "nfs" ]; then + mount -t "$os_mount" $LKP_SERVER:os /srv/os + mount -t "$os_mount" $LKP_SERVER:initrd /srv/initrd + elif [ "$os_mount" = "cifs" ]; then + mount -t "$os_mount" //$LKP_SERVER/os /srv/os -o guest,ro,hard,vers=1.0,noacl,nouser_xattr + mount -t cifs //$LKP_SERVER/initrd /srv/initrd -o port=446,guest,ro,hard,vers=1.0,noacl,nouser_xattr + fi +} -- 2.23.0

On Mon, Dec 28, 2020 at 05:53:13PM +0800, Hu Xuejiao wrote:
Signed-off-by: Hu XueJiao <1034502035@qq.com> --- sparrow/1-storage/tiny | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/sparrow/1-storage/tiny b/sparrow/1-storage/tiny index e589937..538f45d 100755 --- a/sparrow/1-storage/tiny +++ b/sparrow/1-storage/tiny @@ -26,3 +26,13 @@ dirs=( )
mkdir -p "${dirs[@]}" + +[ -n "$os_mount" ] && { + if [ "$os_mount" = "nfs" ]; then + mount -t "$os_mount" $LKP_SERVER:os /srv/os + mount -t "$os_mount" $LKP_SERVER:initrd /srv/initrd + elif [ "$os_mount" = "cifs" ]; then
os_mount = initramfs ? Thanks, Shenwei
+ mount -t "$os_mount" //$LKP_SERVER/os /srv/os -o guest,ro,hard,vers=1.0,noacl,nouser_xattr + mount -t cifs //$LKP_SERVER/initrd /srv/initrd -o port=446,guest,ro,hard,vers=1.0,noacl,nouser_xattr + fi +} -- 2.23.0

On Mon, Dec 28, 2020 at 05:53:13PM +0800, Hu Xuejiao wrote:
Signed-off-by: Hu XueJiao <1034502035@qq.com> --- sparrow/1-storage/tiny | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/sparrow/1-storage/tiny b/sparrow/1-storage/tiny index e589937..538f45d 100755 --- a/sparrow/1-storage/tiny +++ b/sparrow/1-storage/tiny @@ -26,3 +26,13 @@ dirs=( )
mkdir -p "${dirs[@]}" + +[ -n "$os_mount" ] && { + if [ "$os_mount" = "nfs" ]; then + mount -t "$os_mount" $LKP_SERVER:os /srv/os + mount -t "$os_mount" $LKP_SERVER:initrd /srv/initrd + elif [ "$os_mount" = "cifs" ]; then + mount -t "$os_mount" //$LKP_SERVER/os /srv/os -o guest,ro,hard,vers=1.0,noacl,nouser_xattr + mount -t cifs //$LKP_SERVER/initrd /srv/initrd -o port=446,guest,ro,hard,vers=1.0,noacl,nouser_xattr + fi +}
You no need to mount about the os_mount, the mount is no relation with job, just mount the dir to the machine which your scheduler run on. Thanks, Xueliang
-- 2.23.0

On Mon, Dec 28, 2020 at 05:53:13PM +0800, Hu Xuejiao wrote:
Signed-off-by: Hu XueJiao <1034502035@qq.com> --- sparrow/1-storage/tiny | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/sparrow/1-storage/tiny b/sparrow/1-storage/tiny index e589937..538f45d 100755 --- a/sparrow/1-storage/tiny +++ b/sparrow/1-storage/tiny @@ -26,3 +26,13 @@ dirs=( )
mkdir -p "${dirs[@]}" + +[ -n "$os_mount" ] && { + if [ "$os_mount" = "nfs" ]; then + mount -t "$os_mount" $LKP_SERVER:os /srv/os + mount -t "$os_mount" $LKP_SERVER:initrd /srv/initrd
LKP_SERVER is not null when first deploy CCI? Because in sparrow/3-code/dev-env not set default value for LKP_SERVER. Thanks, Yinsi
+ elif [ "$os_mount" = "cifs" ]; then + mount -t "$os_mount" //$LKP_SERVER/os /srv/os -o guest,ro,hard,vers=1.0,noacl,nouser_xattr + mount -t cifs //$LKP_SERVER/initrd /srv/initrd -o port=446,guest,ro,hard,vers=1.0,noacl,nouser_xattr + fi +} -- 2.23.0
participants (4)
-
Cao Xueliang
-
Hu Xuejiao
-
Liu Yinsi
-
Xiao Shenwei