From c582226f9d6e3722c08ee606fcfe84404a9aa444 Mon Sep 17 00:00:00 2001 From: peng9808 Date: Mon, 15 Jan 2024 17:44:50 +0800 Subject: [PATCH] fix some bug --- docker-drbd9/entry.sh | 18 +++++++++--------- helm/drbd-adapter/templates/job.yaml | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docker-drbd9/entry.sh b/docker-drbd9/entry.sh index 6d2c8e6..0e6d547 100644 --- a/docker-drbd9/entry.sh +++ b/docker-drbd9/entry.sh @@ -248,11 +248,11 @@ if [ "$substr" != "deb" ]; then drbd_rpm=$(find "$RPMDIR" -type f -name "*$OS_KERNEL*" -print -quit) utils_rpm=$(find "$RPMDIR" -type f -name "drbd-utils*" -print -quit) if [[ -n "$drbd_rpm" && -n "$utils_rpm" ]]; then - nsenter -t 1 -n -u -i -m -- cp $drbd_rpm /pkgs_root/drbd.rpm - nsenter -t 1 -n -u -i -m -- cp $utils_rpm /pkgs_root/drbd_utils.rpm - nsenter -t 1 -n -u -i -m -- ls /pkgs_root - nsenter -t 1 -n -u -i -m -- rpm -ivh /pkgs_root/drbd.rpm - nsenter -t 1 -n -u -i -m -- rpm -ivh /pkgs_root/drbd_utils.rpm + cp $drbd_rpm /pkgs_root/drbd.rpm + cp $utils_rpm /pkgs_root/drbd_utils.rpm + nsenter -t 1 -n -u -i -m -- ls /root/ + nsenter -t 1 -n -u -i -m -- rpm -ivh /root/drbd.rpm + nsenter -t 1 -n -u -i -m -- rpm -ivh /root/drbd_utils.rpm exit_code=$? if [ $exit_code -eq 0 ]; then nsenter -t 1 -n -u -i -m -- modprobe drbd @@ -275,10 +275,10 @@ else drbd_deb=$(find "$RPMDIR" -type f -name "*$OS_KERNEL*" -print -quit) utils_deb=$(find "$RPMDIR" -type f -name "drbd-utils*" -print -quit) if [[ -n "$drbd_rpm" && -n "$utils_rpm" ]]; then - nsenter -t 1 -n -u -i -m -- cp $drbd_deb /pkgs_root/drbd.deb - nsenter -t 1 -n -u -i -m -- cp $utils_deb /pkgs_root/drbd_utils.deb - nsenter -t 1 -n -u -i -m -- apt install -y /pkgs_root/drbd.deb - nsenter -t 1 -n -u -i -m -- apt install -y /pkgs_root/drbd_utils.deb + cp $drbd_deb /pkgs_root/drbd.deb + cp $utils_deb /pkgs_root/drbd_utils.deb + nsenter -t 1 -n -u -i -m -- apt install -y /root/drbd.deb + nsenter -t 1 -n -u -i -m -- apt install -y /root/drbd_utils.deb exit_code=$? if [ $exit_code -eq 0 ]; then nsenter -t 1 -n -u -i -m -- modprobe drbd diff --git a/helm/drbd-adapter/templates/job.yaml b/helm/drbd-adapter/templates/job.yaml index 4112f01..f325d5a 100644 --- a/helm/drbd-adapter/templates/job.yaml +++ b/helm/drbd-adapter/templates/job.yaml @@ -52,7 +52,7 @@ spec: volumeMounts: - name: pkgs mountPath: /pkgs - - name: pkgs_root + - name: pkgroot mountPath: /pkgs_root {{ if ne $distro "unsupported" }} - name: {{ $distro }} @@ -84,7 +84,7 @@ spec: {{ end }} - name: pkgs mountPath: /pkgs - - name: pkgs_root + - name: pkgroot mountPath: /pkgs_root - name: os-release mountPath: /etc/host-release @@ -111,7 +111,7 @@ spec: volumes: - name: pkgs emptyDir: {} - - name: pkgs_root + - name: pkgroot hostPath: path: /root - name: os-release