Skip to content

Commit 2473008

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 0a8524e commit 2473008

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
@@ -14,6 +14,11 @@ Before=dracut-initqueue.service
1414
[Service]
1515
RestrictAddressFamilies=AF_INET AF_INET6
1616
Type=oneshot
17+
# Connection attempt recovery
18+
Restart=on-failure
19+
RestartSec=10
20+
StartLimitIntervalSec=0
21+
StartLimitBurst=0
1722
# No 'modprobe@.service' available in the initramfs
1823
ExecStartPre=-/sbin/modprobe nvme-fabrics
1924
ExecStart=/usr/sbin/nvme connect-all --nbft

0 commit comments

Comments
 (0)