Spdk/scripts
Tomasz Zawadzki 17c2f4ee8f script/rpc: do not send rpc when no arguments provided
Any time script is called an RPC is called and socket
connection is attempted.

This should not be required when no arguments were provided,
such as calling help to explore possible options.

Example of the error:

[tzawadzk@PowerEdgeFour spdk]$ sudo ./scripts/rpc.py
Traceback (most recent call last):
  File "/home/tzawadzk/spdk/scripts/rpc/client.py", line 40, in __init__
    self.sock.connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./scripts/rpc.py", line 2438, in <module>
    args.client = rpc.client.JSONRPCClient(args.server_addr, args.port, args.timeout, log_level=getattr(logging, args.verbose.upper()))
  File "/home/tzawadzk/spdk/scripts/rpc/client.py", line 56, in __init__
    "Error details: %s" % (addr, ex))
rpc.client.JSONRPCException: Error while connecting to /var/tmp/spdk.sock
Error details: [Errno 111] Connection refused

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3734e1603fa7151fd53b99b8af4ea79bf82fe0f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2124
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-07 08:26:54 +00:00
..
ceph test: Shellcheck - correct rule: Consider using { cmd1; cmd2; } 2019-11-22 13:51:15 +00:00
perf scripts/perf: Enable percentile 999 measurements in fio config 2020-04-17 07:31:55 +00:00
rpc nvme: Add the priority field in struct spdk_nvme_transport_id 2020-04-24 15:53:34 +00:00
spdkcli module/raid: make raid_level an enum instead of plain integer 2019-11-01 14:34:32 +00:00
vagrant scripts/vagrant: fix exporting array in bash script 2020-04-28 13:47:46 +00:00
check_format.sh test: shellcheck - ignore SC2010 2020-01-17 14:07:39 +00:00
common.sh scripts/common: Introduce cache for the pci devices 2020-05-07 08:23:52 +00:00
config_converter.py global: rename copy to accel 2020-02-18 08:05:34 +00:00
detect_cc.sh make: Allow CC and CXX to contain spaces 2020-04-07 08:37:57 +00:00
dpdk_mem_info.py scripts: add a parser for the dpdk memory stats. 2020-01-24 05:46:43 +00:00
eofnl scripts/check_format: check trailing whitespace 2017-10-24 17:35:23 -04:00
fio.py scripts/fio.py: add argparse for command line parameters 2019-06-03 04:34:10 +00:00
gdb_macros.py scripts: Use range instead of xrange 2019-02-13 22:54:15 +00:00
gen_ftl.sh lib/ftl: Functional tests 2020-01-15 12:24:44 +00:00
gen_nvme.sh rpc: Rename construct_nvme_bdev to bdev_nvme_attach_controller 2019-09-18 21:53:25 +00:00
genconfig.py genconfig.py: allow numbers in config option names 2020-02-20 14:40:19 +00:00
histogram.py histograms: add script for parsing histogram data 2019-01-24 14:14:32 +00:00
iostat.py script: add iostat.py to check bdev iostat 2020-01-22 13:51:41 +00:00
pkgdep.sh scripts/pkgdep: Fix failing symlink creation during python instalation 2020-04-16 08:08:40 +00:00
posix.txt build: Automatically detect use of POSIX includes 2017-05-08 13:20:37 -07:00
prep_benchmarks.sh test: Shellcheck - correct rule: $/${} is unnecessary on arithmetic variables. 2019-11-07 23:04:10 +00:00
qat_setup.sh qat_setup: Fix logic check against service's exit status 2020-04-02 07:03:47 +00:00
rpc_http_proxy.py scripts: Add SSL certificate option in rpc_http_proxy 2020-05-05 08:04:00 +00:00
rpc.py script/rpc: do not send rpc when no arguments provided 2020-05-07 08:26:54 +00:00
setup.sh scripts/common: Introduce cache for the pci devices 2020-05-07 08:23:52 +00:00
spdkcli.py spdkcli: fix pylint warnings 2019-10-22 17:23:00 +00:00