Skip to content

Commit 21f9385

Browse files
feat: add multipath-tools and trident-iscsi-tools
contains multipathd and supporting binaries for Trident CSI Co-authored-by: Simon Linder <[email protected]> Signed-off-by: Jan Untersander <[email protected]>
1 parent 2f503ed commit 21f9385

File tree

14 files changed

+374
-66
lines changed

14 files changed

+374
-66
lines changed

.kres.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ spec:
3333
- mdadm
3434
- mei
3535
- metal-agent
36+
- multipath-tools
3637
- nebula
3738
- netbird
3839
- newt
@@ -59,6 +60,7 @@ spec:
5960
- tailscale
6061
- tenstorrent
6162
- thunderbolt
63+
- trident-iscsi-tools
6264
- uinput
6365
- usb-modem-drivers
6466
- usb-audio-drivers

MAINTAINERS.md

Lines changed: 67 additions & 65 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ TARGETS += lldpd
9090
TARGETS += mdadm
9191
TARGETS += mei
9292
TARGETS += metal-agent
93+
TARGETS += multipath-tools
9394
TARGETS += nebula
9495
TARGETS += netbird
9596
TARGETS += newt
@@ -116,6 +117,7 @@ TARGETS += stargz-snapshotter
116117
TARGETS += tailscale
117118
TARGETS += tenstorrent
118119
TARGETS += thunderbolt
120+
TARGETS += trident-iscsi-tools
119121
TARGETS += uinput
120122
TARGETS += usb-modem-drivers
121123
TARGETS += usb-audio-drivers
@@ -294,4 +296,3 @@ release-notes: $(ARTIFACTS)
294296
conformance:
295297
@docker pull $(CONFORMANCE_IMAGE)
296298
@docker run --rm -it -v $(PWD):/src -w /src $(CONFORMANCE_IMAGE) enforce
297-

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,11 @@ tiers based on support level:
146146
| [fuse3](storage/fuse3) | :green_square: core | [ghcr.io/siderolabs/fuse3](https://github.com/siderolabs/extensions/pkgs/container/fuse3) | `3.17.4` | This system extension provides fuse3 functionality. |
147147
| [iscsi-tools](storage/iscsi-tools) | :green_square: core | [ghcr.io/siderolabs/iscsi-tools](https://github.com/siderolabs/extensions/pkgs/container/iscsi-tools) | `v0.2.0` | This system extension provides iscsi-tools. |
148148
| [mdadm](storage/mdadm) | :white_large_square: contrib | [ghcr.io/siderolabs/mdadm](https://github.com/siderolabs/extensions/pkgs/container/mdadm) | `v4.4` | This system extension provides mdadm binary. |
149+
| [multipath-tools](storage/multipath-tools) | :white_large_square: contrib | [ghcr.io/siderolabs/multipath-tools](https://github.com/siderolabs/extensions/pkgs/container/multipath-tools) | `v0.0.1` | This system extension provides multipath-tools binaries and multipathd for multipath device support. |
149150
| [nfs-utils](storage/nfs-utils) | :white_large_square: contrib | [ghcr.io/siderolabs/nfs-utils](https://github.com/siderolabs/extensions/pkgs/container/nfs-utils) | `v0.1.1` | This system extension provides rpcbind and rpc.statd for NFSv3 file locking support. rpcbind is a server that converts RPC program numbers into universal addresses. rpc.statd is the NSM (Network Status Monitor) service daemon that notifies NFS peers of restarts. These services are required for NFSv3 mounts with file locking support. |
150151
| [nfsd](storage/nfsd) | :yellow_square: extra | [ghcr.io/siderolabs/nfsd](https://github.com/siderolabs/extensions/pkgs/container/nfsd) | `VERSION` | This system extension provides kernel module driver for NFSD built against a specific Talos version. |
151152
| [nfsrahead](storage/nfsrahead) | :white_large_square: contrib | [ghcr.io/siderolabs/nfsrahead](https://github.com/siderolabs/extensions/pkgs/container/nfsrahead) | `2.8.3` | This system extension provides nfsrahead, a tool to configure the readahead for NFS mounts. |
153+
| [trident-iscsi-tools](storage/trident-iscsi-tools) | :white_large_square: contrib | [ghcr.io/siderolabs/trident-iscsi-tools](https://github.com/siderolabs/extensions/pkgs/container/trident-iscsi-tools) | `v0.0.1` | This system extension provides binaries for the host system required by [NetApp/Trident](https://github.com/NetApp/trident) iSCSI backend. |
152154
| [zfs](storage/zfs) | :yellow_square: extra | [ghcr.io/siderolabs/zfs](https://github.com/siderolabs/extensions/pkgs/container/zfs) | `2.4.0-rc2-VERSION` | This system extension provides the ZFS kernel module, the ZFS utilities, and a service to import all ZFS pools on start and unmount all pools on stop. |
153155

154156
### Power

storage/multipath-tools/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# multipath-tools
2+
3+
This extension provides the `multipathd` daemon on the host for handling device-mapper multipathing.
4+
It enables consistent, fault-tolerant access to storage devices that expose multiple I/O paths.
5+
6+
## What's Included
7+
8+
* **multipathd**: Multipath daemon
9+
* **multipath**: Device mapper target autoconfig
10+
* **multipathc**: Interactive client for multipathd
11+
* **mpathpersist**: Manages SCSI persistent reservations on dm multipath devices
12+
* **kpartx**: Create device maps from partition tables.
13+
14+
## Use Case
15+
16+
To run this daemon you need the following **kernel** modules:
17+
```yaml
18+
kernel:
19+
modules:
20+
- name: dm_multipath
21+
- name: dm_round-robin # or dm-queue-length
22+
```
23+
To configure multipath accordingly you need to apply something like:
24+
```yaml
25+
apiVersion: v1alpha1
26+
kind: ExtensionServiceConfig
27+
name: multipathd
28+
configFiles:
29+
- content: |
30+
defaults {
31+
user_friendly_names yes
32+
find_multipaths no
33+
path_selector "round-robin 0"
34+
}
35+
mountPath: /etc/multipath.conf
36+
```
37+
You probably need to use `round-robin` or `queue-length` (if that is supported by your use case) as the default `service-time` is not supported, since `dm-service-time` kernel module is not jet in talos build at the moment.
38+
39+
40+
## References
41+
42+
- [multipath man page](https://linux.die.net/man/8/multipath)
43+
- [multipathd man page](https://linux.die.net/man/8/multipathd)
44+
- [Related Kernel module issue](https://github.com/siderolabs/talos/issues/9515)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: v1alpha1
2+
metadata:
3+
name: multipath-tools
4+
version: "{{ .VERSION }}"
5+
author: Institute for Network and Security (INS) at OST
6+
description: |
7+
[{{ .TIER }}] This system extension provides multipath-tools.
8+
compatibility:
9+
talos:
10+
version: ">= v1.9.0"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: multipathd
2+
container:
3+
security:
4+
maskedPaths: []
5+
readonlyPaths: []
6+
writeableRootfs: true
7+
entrypoint: /usr/local/sbin/multipathd
8+
args:
9+
- -d
10+
- -s
11+
mounts:
12+
# ld-musl-x86_64.so.1
13+
- source: /lib
14+
destination: /lib
15+
type: bind
16+
options:
17+
- bind
18+
- ro
19+
# libs
20+
- source: /usr/local/lib/
21+
destination: /usr/local/lib/
22+
type: bind
23+
options:
24+
- bind
25+
- ro
26+
- source: /usr/local/sbin
27+
destination: /usr/local/sbin
28+
type: bind
29+
options:
30+
- bind
31+
- ro
32+
# /dev/mapper and multipath disk
33+
- source: /dev
34+
destination: /dev
35+
type: bind
36+
options:
37+
- bind
38+
- rw
39+
- source: /sys
40+
destination: /sys
41+
type: bind
42+
options:
43+
- bind
44+
- rw
45+
depends:
46+
- network:
47+
- addresses
48+
- connectivity
49+
- hostname
50+
- etcfiles
51+
- service: udevd
52+
- path: /dev/mapper/control
53+
- service: cri
54+
# - configuration: true
55+
restart: always

storage/multipath-tools/pkg.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: multipath-tools
2+
variant: scratch
3+
shell: /bin/bash
4+
dependencies:
5+
- stage: base
6+
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/systemd-udevd:{{ .BUILD_ARG_PKGS }}"
7+
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/libjson-c:{{ .BUILD_ARG_PKGS }}"
8+
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/lvm2:{{ .BUILD_ARG_PKGS }}"
9+
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/liburcu:{{ .BUILD_ARG_PKGS }}"
10+
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/libaio:{{ .BUILD_ARG_PKGS }}"
11+
steps:
12+
- sources:
13+
- url: https://github.com/opensvc/multipath-tools/archive/refs/tags/{{ .MULTIPATH_TOOLS_VERSION }}.tar.gz
14+
destination: multipath-tools.tar.gz
15+
sha256: {{ .MULTIPATH_TOOLS_SHA256 }}
16+
sha512: {{ .MULTIPATH_TOOLS_SHA512 }}
17+
env:
18+
PKG_CONFIG_PATH: /usr/lib/pkgconfig
19+
prepare:
20+
- |
21+
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
22+
- |
23+
tar -xzf multipath-tools.tar.gz --strip-components=1
24+
build:
25+
- |
26+
make -j $(nproc) prefix="/usr/local" \
27+
sysconfdir="/etc" \
28+
configdir="/etc/multipath/conf.d" \
29+
mandir="/usr/share/man" \
30+
infodir="/usr/share/info" \
31+
statedir="/etc/multipath" \
32+
etc_prefix="" \
33+
LIB=lib \
34+
SYSTEMD=""
35+
install:
36+
- |
37+
mkdir -p /rootfs/usr/local/lib/containers/multipathd/ /rootfs/usr/local/lib/
38+
cp /usr/lib/libgcc_s.so.1 /rootfs/usr/local/lib/
39+
make prefix="/usr/local" DESTDIR=/rootfs LIB=lib install
40+
- |
41+
mkdir -p /rootfs/usr/local/etc/containers
42+
cp /pkg/multipathd.yaml /rootfs/usr/local/etc/containers/
43+
# Remove kernel module loading config
44+
- |
45+
rm /rootfs/usr/lib/modules-load.d/multipath.conf
46+
rmdir /rootfs/usr/lib/modules-load.d
47+
# Remove unnecessary docs and includes
48+
- |
49+
rm -rf /rootfs/usr/local/share
50+
rm -rf /rootfs/usr/local/include
51+
# This file tries to create a tmpfs mount at `/var/run/multipath`.
52+
- |
53+
rm /rootfs/usr/lib/tmpfiles.d/multipath.conf
54+
rmdir /rootfs/usr/lib/tmpfiles.d
55+
# # Removed but might be needed by other users of multipath-tools
56+
- |
57+
rm /rootfs/usr/lib/udev/kpartx_id
58+
test:
59+
- |
60+
mkdir -p /extensions-validator-rootfs
61+
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
62+
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
63+
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
64+
finalize:
65+
- from: /rootfs
66+
to: /rootfs
67+
- from: /pkg/manifest.yaml
68+
to: /

storage/multipath-tools/vars.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
VERSION: v0.0.1
2+
3+
# renovate: datasource=github-releases extractVersion=^multipath-tools (?<version>.*)$ depName=opensvc/multipath-tools
4+
MULTIPATH_TOOLS_VERSION: 0.13.0
5+
MULTIPATH_TOOLS_SHA256: f2e67a1d2167f3945afab6f0697207a03678f5b2bd80f1f45958c6fa1dfb8eef
6+
MULTIPATH_TOOLS_SHA512: 8f545609fa20df7547428f2929571dc0df87c17d9f61f11aad3559446c2e94755e18b1c4b3780b3de92ec2cbc450939ca15a9d6c95551eee4084064d83874b2d
7+
8+
TIER: "contrib"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# trident-iscsi-tools
2+
3+
This extension provides basic **Linux** tools like 'cat', 'ls', and other binaries on the host used by the **Trident CSI**, which are apparently not jet bundled in to Trident itself.
4+
5+
6+
## What's Included
7+
8+
* **lsscsi**
9+
* **coreutils**: ls, cat, dd
10+
* **procps**: free, pgrep
11+
* **blockdev**
12+
13+
14+
## Use Case
15+
16+
To run [trident-operator](https://github.com/NetApp/trident) with iSCSI, you need to enable the **extensions**:
17+
* `iscsi-tools`
18+
* `multipath-tools`
19+
* `util-linux` (for blkid)
20+
* `trident-iscsi-tools`
21+
22+
and **additionally** the **kernel** modules:
23+
```yaml
24+
kernel:
25+
modules:
26+
- name: scsi-transport-iscsi
27+
- name: libiscsi_tcp
28+
- name: iscsi_tcp
29+
- name: scsi_transport_fc
30+
- name: dm_multipath
31+
- name: dm_round-robin
32+
```
33+
To configure multipath accordingly you need to apply:
34+
```yaml
35+
apiVersion: v1alpha1
36+
kind: ExtensionServiceConfig
37+
name: multipathd
38+
configFiles:
39+
- content: |
40+
defaults {
41+
user_friendly_names yes
42+
find_multipaths no
43+
path_selector "round-robin 0"
44+
}
45+
mountPath: /etc/multipath.conf
46+
```
47+
48+
## References
49+
50+
- [lsscsi man page](https://linux.die.net/man/8/lsscsi)
51+
- [Related Trident issue](https://github.com/NetApp/trident/issues/806#issuecomment-2399332314)

0 commit comments

Comments
 (0)