* [PATCH] nvmetcli: set up the target only after the network is configured
@ 2023-02-28 16:36 Maurizio Lombardi
2023-03-02 3:06 ` Chaitanya Kulkarni
2023-03-15 13:42 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Maurizio Lombardi @ 2023-02-28 16:36 UTC (permalink / raw)
To: hch; +Cc: sagi, kbusch, linux-nvme, hare
network.target only indicates that the network stack is up, but it
doesn't mean that the network devices have been configured.
Replace it with network-online.target, this fixes the following
error when systemd restores the target configuration during boot:
[ 19.613251] nvmet_tcp: failed to bind port socket -99
[FAILED] Failed to start Restore NVMe kernel target configuration.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
nvmet.service | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/nvmet.service b/nvmet.service
index 5c7991e..6f97a91 100644
--- a/nvmet.service
+++ b/nvmet.service
@@ -1,7 +1,8 @@
[Unit]
Description=Restore NVMe kernel target configuration
Requires=sys-kernel-config.mount
-After=sys-kernel-config.mount network.target local-fs.target
+After=sys-kernel-config.mount network-online.target local-fs.target
+Wants=network-online.target
[Service]
Type=oneshot
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmetcli: set up the target only after the network is configured
2023-02-28 16:36 [PATCH] nvmetcli: set up the target only after the network is configured Maurizio Lombardi
@ 2023-03-02 3:06 ` Chaitanya Kulkarni
2023-03-15 13:42 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2023-03-02 3:06 UTC (permalink / raw)
To: Maurizio Lombardi, hch@lst.de
Cc: sagi@grimberg.me, kbusch@kernel.org,
linux-nvme@lists.infradead.org, hare@suse.de
On 2/28/2023 8:36 AM, Maurizio Lombardi wrote:
> network.target only indicates that the network stack is up, but it
> doesn't mean that the network devices have been configured.
>
> Replace it with network-online.target, this fixes the following
> error when systemd restores the target configuration during boot:
>
> [ 19.613251] nvmet_tcp: failed to bind port socket -99
> [FAILED] Failed to start Restore NVMe kernel target configuration.
>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
I believe you have tested this thoroughly with other transports.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmetcli: set up the target only after the network is configured
2023-02-28 16:36 [PATCH] nvmetcli: set up the target only after the network is configured Maurizio Lombardi
2023-03-02 3:06 ` Chaitanya Kulkarni
@ 2023-03-15 13:42 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2023-03-15 13:42 UTC (permalink / raw)
To: Maurizio Lombardi; +Cc: hch, sagi, kbusch, linux-nvme, hare
Thanks, applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-15 13:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28 16:36 [PATCH] nvmetcli: set up the target only after the network is configured Maurizio Lombardi
2023-03-02 3:06 ` Chaitanya Kulkarni
2023-03-15 13:42 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).