Skip to content

Commit

Permalink
Merge pull request #43 from peng9808/main
Browse files Browse the repository at this point in the history
fix dependence
  • Loading branch information
peng9808 authored Jan 15, 2024
2 parents c72beff + 416caaf commit 5d73c4b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
13 changes: 9 additions & 4 deletions docker-drbd9/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +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 -- rpm -ivh "$utils_rpm"
nsenter -t 1 -n -u -i -m -- rpm -ivh "$drbd_rpm"
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
exit_code=$?
if [ $exit_code -eq 0 ]; then
nsenter -t 1 -n -u -i -m -- modprobe drbd
Expand All @@ -272,8 +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 -- apt install -y drbd_deb
nsenter -t 1 -n -u -i -m -- apt install -y utils_deb
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
exit_code=$?
if [ $exit_code -eq 0 ]; then
nsenter -t 1 -n -u -i -m -- modprobe drbd
Expand Down
4 changes: 2 additions & 2 deletions helm/drbd-adapter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: A DRBD kernel loader that auto-adapts OS distros

type: application

appVersion: v9.0.32

version: v0.4.0

appVersion: v9.0.32
7 changes: 7 additions & 0 deletions helm/drbd-adapter/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ spec:
volumeMounts:
- name: pkgs
mountPath: /pkgs
- name: pkgs_root
mountPath: /pkgs_root
{{ if ne $distro "unsupported" }}
- name: {{ $distro }}
image: {{ $.Values.registry }}/drbd9-{{ $distro }}:{{ $tag }}
Expand Down Expand Up @@ -82,6 +84,8 @@ spec:
{{ end }}
- name: pkgs
mountPath: /pkgs
- name: pkgs_root
mountPath: /pkgs_root
- name: os-release
mountPath: /etc/host-release
readOnly: true
Expand All @@ -107,6 +111,9 @@ spec:
volumes:
- name: pkgs
emptyDir: {}
- name: pkgs_root
hostPath:
path: /root
- name: os-release
hostPath:
path: /etc/os-release
Expand Down

0 comments on commit 5d73c4b

Please sign in to comment.