Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rework iscsi-tools #577

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go.work
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ use (
./examples/hello-world-service/src
./nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime-wrapper
./nvidia-gpu/nvidia-container-toolkit/nvidia-persistenced-wrapper
./storage/iscsi-tools/iscsid-wrapper
)
5 changes: 0 additions & 5 deletions storage/iscsi-tools/iscsid-wrapper/go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions storage/iscsi-tools/iscsid-wrapper/go.sum

This file was deleted.

46 changes: 0 additions & 46 deletions storage/iscsi-tools/iscsid-wrapper/main.go

This file was deleted.

24 changes: 0 additions & 24 deletions storage/iscsi-tools/iscsid-wrapper/pkg.yaml

This file was deleted.

22 changes: 6 additions & 16 deletions storage/iscsi-tools/iscsid.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: iscsid
depends:
- service: cri
- service: ext-tgtd
- network:
- addresses
- connectivity
- hostname
- etcfiles
- path: /etc/iscsi/initiatorname.iscsi
container:
entrypoint: /usr/local/sbin/iscsid-wrapper
entrypoint: /usr/local/sbin/iscsid
args:
- -f
security:
maskedPaths: []
readonlyPaths: []
Expand Down Expand Up @@ -41,25 +43,13 @@ container:
options:
- bind
- ro
# persistent storage for iscsi
- source: /system/iscsi
# iscsi etc folder
- source: /etc/iscsi
destination: /etc/iscsi
type: bind
options:
- rshared
- rbind
- rw
- source: /usr/local/etc/iscsi/iscsid.conf
destination: /etc/iscsi/iscsid.conf
type: bind
options:
- bind
- ro
- source: /usr/local/etc/passwd
destination: /etc/passwd
type: bind
options:
- bind
- ro
- source: /var/lib/iscsi
destination: /var/lib/iscsi
Expand Down
1 change: 0 additions & 1 deletion storage/iscsi-tools/open-iscsi/files/passwd

This file was deleted.

14 changes: 6 additions & 8 deletions storage/iscsi-tools/open-iscsi/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ dependencies:
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/kmod:{{ .BUILD_ARG_PKGS }}"
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/openssl:{{ .BUILD_ARG_PKGS }}"
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/util-linux:{{ .BUILD_ARG_PKGS }}"
- stage: open-isns
from: /rootfs
steps:
- sources:
- url: https://github.com/open-iscsi/open-iscsi/archive/refs/tags/{{ .OPEN_ISCSI_VERSION }}.tar.gz
Expand Down Expand Up @@ -49,10 +47,11 @@ steps:
meson setup \
-Db_lto=true \
-Dno_systemd=true \
-Disns=disabled \
-Dhomedir=/etc/iscsi \
-Dprefix=/usr/local \
-Discsi_sbindir=/usr/local/sbin \
-Drulesdir=/usr/lib/udev/rules.d \
-Dc_args="$CFLAGS -I/usr/local/include -DNO_SYSTEMD -DGLOB_ONLYDIR=0" \
output

ninja -C output
Expand All @@ -62,11 +61,10 @@ steps:
DESTDIR=/rootfs ninja -C output install

# cleanup
# we generate a one time initiatorname.iscsi when the iscsid-wrapper starts.
rm -rf /rootfs/usr/local/{etc/iscsi/initiatorname.iscsi,share,include,pkgconfig}
rm -rf /rootfs/var/lib/iscsi

cp /pkg/files/passwd /rootfs/usr/local/etc/passwd
# we generate initiatorname.iscsi on talos side.
rm -rf /rootfs/etc
rm -rf /rootfs/usr/local/{etc,share,include,pkgconfig}
rm -rf /rootfs/var
finalize:
- from: /rootfs
to: /rootfs
45 changes: 0 additions & 45 deletions storage/iscsi-tools/open-isns/pkg.yaml

This file was deleted.

6 changes: 1 addition & 5 deletions storage/iscsi-tools/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ dependencies:
# `base` dependency is used for doing cleanups
# not copied to rootfs
- stage: base
- stage: open-isns
- stage: open-iscsi
- stage: tgt
- stage: iscsid-wrapper
steps:
- install:
- |
mkdir -p /rootfs/usr/local/lib/containers/{iscsid,tgtd}
mkdir -p /rootfs/usr/local/lib/containers/iscsid

sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml

Expand All @@ -23,7 +20,6 @@ steps:
mkdir -p /rootfs/usr/local/etc/containers

cp /pkg/iscsid.yaml /rootfs/usr/local/etc/containers/iscsid.yaml
cp /pkg/tgtd.yaml /rootfs/usr/local/etc/containers/tgtd.yaml
test:
- |
mkdir -p /extensions-validator-rootfs
Expand Down
25 changes: 0 additions & 25 deletions storage/iscsi-tools/tgt/musl.patch

This file was deleted.

28 changes: 0 additions & 28 deletions storage/iscsi-tools/tgt/pkg.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions storage/iscsi-tools/tgtd.yaml

This file was deleted.

4 changes: 1 addition & 3 deletions storage/iscsi-tools/vars.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
VERSION: v0.1.6
VERSION: v0.2.0
# renovate: datasource=github-tags depName=open-iscsi/open-iscsi
OPEN_ISCSI_VERSION: 2.1.10
frezbo marked this conversation as resolved.
Show resolved Hide resolved
# renovate: datasource=github-tags extractVersion=^v(?<version>.*)$ depName=open-iscsi/open-isns
OPEN_ISNS_VERSION: 0.103