From: Maurizio Lombardi Date: Tue, 28 Feb 2023 16:36:15 +0000 (+0100) Subject: nvmetcli: set up the target only after the network is configured X-Git-Tag: v0.8~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0855bcec9a5a9ceba586a5a1e1a8742b85424870;p=users%2Fhch%2Fnvmetcli.git nvmetcli: set up the target only after the network is configured 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 Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig --- 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