Blob Blame History Raw
commit 0451499b82813b6aefa30519bdd26459a6dd7c58
Author: Sagi Grimberg <sagi@grimberg.me>
Date:   Thu Aug 22 15:09:37 2019 -0700

    systemd: fix echo call with absolute path
    
    Without placing the absolute path when formatting the
    nvme connect-all args we can get the following error:
    --
    connect-all: unrecognized option '-e'
    Discover NVMeoF subsystems and connect to them  [  --transport=<LIST>, -t <LIST> ]    --- transport type
      [  --traddr=<LIST>, -a <LIST> ]       --- transport address
      [  --trsvcid=<LIST>, -s <LIST> ]      --- transport service id (e.g. IP
                                                port)
      [  --host-traddr=<LIST>, -w <LIST> ]  --- host traddr (e.g. FC WWN's)
      [  --hostnqn=<LIST>, -q <LIST> ]      --- user-defined hostnqn (if default
                                                not used)
      [  --hostid=<LIST>, -I <LIST> ]       --- user-defined hostid (if default
                                                not used)
      [  --raw=<LIST>, -r <LIST> ]          --- raw output file
      [  --device=<LIST>, -d <LIST> ]       --- use existing discovery controller
                                                device
      [  --keep-alive-tmo=<LIST>, -k <LIST> ] --- keep alive timeout period in
                                                seconds
      [  --reconnect-delay=<LIST>, -c <LIST> ] --- reconnect timeout period in
                                                seconds
      [  --ctrl-loss-tmo=<LIST>, -l <LIST> ] --- controller loss timeout period in
                                                seconds
      [  --hdr_digest, -g ]                 --- enable transport protocol header
                                                digest (TCP transport)
      [  --data_digest, -G ]                --- enable transport protocol data
                                                digest (TCP transport)
      [  --nr-io-queues=<LIST>, -i <LIST> ] --- number of io queues to use
                                                (default is core count)
      [  --nr-write-queues=<LIST>, -W <LIST> ] --- number of write queues to use
                                                (default 0)
      [  --nr-poll-queues=<LIST>, -P <LIST> ] --- number of poll queues to use
                                                (default 0)
      [  --queue-size=<LIST>, -Q <LIST> ]   --- number of io queue elements to
                                                use (default 128)
      [  --persistent, -p ]                 --- persistent discovery connection
      [  --quiet, -Q ]                      --- suppress already connected errors
    Usage: nvme connect-all <device> [OPTIONS]
    Options:
    : nvmf-connect@--device\x3dnvme0\t--transport\x3dtcp\t--traddr\x3d192.168.123.1\t--trsvcid\x3d8009\t--host-traddr\x3dnone.service: Main process exited, code=exited, status=70/n/a
    : nvmf-connect@--device\x3dnvme0\t--transport\x3dtcp\t--traddr\x3d192.168.123.1\t--trsvcid\x3d8009\t--host-traddr\x3dnone.service: Failed with result 'exit-code'.
    
    Signed-off-by: Sagi Grimberg <sagi@grimberg.me>

diff --git a/nvmf-autoconnect/systemd/nvmf-connect@.service b/nvmf-autoconnect/systemd/nvmf-connect@.service
index 25dca0e..10fb3aa 100644
--- a/nvmf-autoconnect/systemd/nvmf-connect@.service
+++ b/nvmf-autoconnect/systemd/nvmf-connect@.service
@@ -11,4 +11,4 @@ Requires=nvmf-connect.target
 [Service]
 Type=simple
 Environment="CONNECT_ARGS=%i"
-ExecStart=/bin/sh -c "nvme connect-all --quiet `echo -e $CONNECT_ARGS`"
+ExecStart=/bin/sh -c "nvme connect-all --quiet `/bin/echo -e $CONNECT_ARGS`"