-
Notifications
You must be signed in to change notification settings - Fork 126
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: mdadm extension #271
Conversation
a4915ec
to
9e17433
Compare
is there a way to test this from talos side, would love to add some tests here: https://github.com/siderolabs/talos/blob/main/internal/integration/api/extensions_qemu.go already have a set of helpers and tests here, should be easy to add |
9e17433
to
c74d8e1
Compare
Ready to go: # talosctl --talosconfig _cfgs/talosconfig --nodes 192.168.10.48 get extensions
NODE NAMESPACE TYPE ID VERSION NAME VERSION
192.168.10.48 runtime ExtensionStatus 000.ghcr.io-sergelogvinov-mdadm-v4.2-v1.6.0-alpha.2-2-gc74d8e1 1 mdadm v4.2-v1.6.0-alpha.2-2-gc74d8e1
# talosctl --talosconfig _cfgs/talosconfig --nodes 192.168.10.48 disks
NODE DEV MODEL SERIAL TYPE UUID WWID MODALIAS NAME SIZE BUS_PATH SUBSYSTEM SYSTEM_DISK
192.168.10.48 /dev/sda QEMU HARDDISK - SSD - - scsi:t-0x00 - 34 GB /pci0000:00/0000:00:1e.0/0000:05:01.0/0000:06:05.0/virtio1/host6/target6:0:0/6:0:0:0/ /sys/class/block *
192.168.10.48 /dev/sdb QEMU HARDDISK - SSD - - scsi:t-0x00 - 11 GB /pci0000:00/0000:00:1e.0/0000:05:01.0/0000:06:05.0/virtio1/host6/target6:0:0/6:0:0:2/ /sys/class/block
192.168.10.48 /dev/sdc QEMU HARDDISK - SSD - - scsi:t-0x00 - 11 GB /pci0000:00/0000:00:1e.0/0000:05:01.0/0000:06:05.0/virtio1/host6/target6:0:0/6:0:0:1/ /sys/class/block
# talosctl --talosconfig _cfgs/talosconfig --nodes 192.168.10.48 mounts | grep '/dev/md'
192.168.10.48 /dev/md127p1 10.67 0.11 10.56 1.03% /var/data
# mdadm --detail /dev/md127
/dev/md127:
Version : 0.90
Creation Time : Wed Nov 22 18:21:41 2023
Raid Level : raid1
Array Size : 10485696 (10.00 GiB 10.74 GB)
Used Dev Size : 10485696 (10.00 GiB 10.74 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 127
Persistence : Superblock is persistent
Update Time : Thu Nov 23 19:25:57 2023
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : resync
UUID : 86345734:5d4de8db:5a848257:e2917ea5 (local to host controlplane-41)
Events : 0.24
Number Major Minor RaidDevice State
0 8 32 0 active sync /dev/sdc
1 8 16 1 active sync /dev/sdb |
The first idea that comes to my mind is to check for the binary existence. |
the extensions test mount up extra disks, if you look at zfs tests we run commands to create a pool and verify it's still mounted after a reboot, i think we should add something similar along the lines for mdadm too |
Just saw the readme, i can add a test in Talos |
I'll try building this and add a test to talos to test, then merge it |
c74d8e1
to
1ed9f0b
Compare
Add mdadm tool in root filesystem. Signed-off-by: Serge Logvinov <[email protected]> Signed-off-by: Noel Georgi <[email protected]>
/ok-to-test |
/m |
Add tests for mdadm extension. See: siderolabs/extensions#271 Signed-off-by: Noel Georgi <[email protected]>
Add mdadm tool in root filesystem.