Skip to content

Commit 5d23b62

Browse files
committed
dracut/95nbft: Define respawn attempts on a connection failure
In case the `nvme connect-all --nbft` call fails, respawn the service after 10 seconds and try again. Depends on nvme-cli to return non-zero status in case of any of the SSNS records that are not marked as 'unavailable' fails to connect. The respawn cycle is broken by stopping the unit once rootfs is mounted and system switches the root. Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
1 parent c8de288 commit 5d23b62

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nvmf-autoconnect/dracut-95nbft/nbft-boot-connect.service.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ Before=remote-fs-pre.target
1313
[Service]
1414
RestrictAddressFamilies=AF_INET AF_INET6
1515
Type=oneshot
16+
# Connection attempt recovery
17+
Restart=on-failure
18+
RestartSec=10
19+
StartLimitIntervalSec=0
20+
StartLimitBurst=0
1621
# No 'modprobe@.service' available in the initramfs
1722
ExecStartPre=-/sbin/modprobe nvme-fabrics
1823
ExecStart=/usr/sbin/nvme connect-all --nbft

0 commit comments

Comments
 (0)