]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvmf-autoconnect: restart service to avoid dropping AEN
authorCaleb Sander <csander@purestorage.com>
Fri, 12 May 2023 19:41:06 +0000 (13:41 -0600)
committerDaniel Wagner <wagi@monom.org>
Mon, 15 May 2023 14:57:17 +0000 (16:57 +0200)
commit7723f827e8165652a4a18844114004d78ac411df
treefe394eaa5d2f0a5ee688695a751a76e85b7307e9
parent879e5ba5a9cbf4bbd656b8f4eb4362346ca34475
nvmf-autoconnect: restart service to avoid dropping AEN

If another discovery log page change AEN is received while the
autoconnect service is already running for a previous AEN,
the autoconnect service is not being relaunched.
For example, if some of the entries in the log page are not reachable,
attempting to connect to them may take a long time before timing out,
so AENs received while waiting for the connections have no effect.
The AEN is effectively dropped: we ignore the new discovery log entries
and worse, the controller won't send more AENs because it's waiting
for the log page to be fetched in response to the previous AEN.

Use systemctl restart instead of systemctl start
to ensure nvme connect-all is run in response to each AEN.
If a previous instance of the service is already running,
it will be interrupted and the new log page will be fetched.

Fixes: 391d3b12248a ("nvme-cli: nvmf auto-connect scripts")
Signed-off-by: Caleb Sander <csander@purestorage.com>
nvmf-autoconnect/udev-rules/70-nvmf-autoconnect.rules.in