Commit 6bef902c authored by Jim Harris's avatar Jim Harris Committed by Daniel Verkamp
Browse files

rpc: add default UNIX domain socket listen address



RPC is a default feature required for almost all usages,
so enable RPC by default, but with a UNIX domain socket
for security reasons.

-r can now be used from the command line to specify
an alternative RPC listen address from the default
/var/tmp/spdk.sock.

Remove the Enable parameter from the Rpc config section
but still allow specifying an alternative listen address
using the Listen parameter as an alternative to the
command line option.  This keeps backward compatibility
for this release for anyone using the configuration file
still.

Remove the Rpc sections from all configuration files
that were using them, except for those that specified
alternate TCP ports for multi-process test cases.  We
can fix these later to use an alternate UNIX domain
socket and to use the command line instead.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Ife0d03fcab638c67b659f1eb85348ddc2b55c4c4
Reviewed-on: https://review.gerrithub.io/386561


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent fbb9430e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
# Changelog

## v18.01

### RPC

A JSON RPC listener is now enabled by default using a UNIX domain socket at /var/run/spdk.sock.
A -r option command line option has been added to enable an alternative UNIX domain socket location,
or a TCP port in the format ip_addr:tcp_port (i.e. 127.0.0.1:5260).  The Rpc configuration file
section is now deprecated and will be removed in the v18.04 release.

## v17.10: Logical Volumes

### New dependencies
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ fi

# Make sure the disks are clean (no leftover partition tables)
timing_enter cleanup
# Remove old domain socket pathname just in case
rm -f $DEFAULT_RPC_ADDR
if [ $(uname -s) = Linux ]; then
	# Load the kernel driver
	./scripts/setup.sh reset
+0 −10
Original line number Diff line number Diff line
@@ -62,16 +62,6 @@
  ImmediateData Yes
  ErrorRecoveryLevel 0

[Rpc]
  # Defines whether to enable configuration via RPC.
  # Default is disabled.  Note that the RPC interface is not
  # authenticated, so users should be careful about enabling
  # RPC in non-trusted environments.
  Enable No
  # Listen address for the RPC service.
  # May be an IP address or an absolute path to a Unix socket.
  Listen 127.0.0.1

# Users must change the PortalGroup section(s) to match the IP addresses
#  for their environment.
# PortalGroup sections define which TCP ports the iSCSI server will use
+0 −10
Original line number Diff line number Diff line
@@ -20,16 +20,6 @@
  # Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
  #TpointGroupMask 0x0

[Rpc]
  # Defines whether to enable configuration via RPC.
  # Default is disabled.  Note that the RPC interface is not
  # authenticated, so users should be careful about enabling
  # RPC in non-trusted environments.
  Enable No
  # Listen address for the RPC service.
  # May be an IP address or an absolute path to a Unix socket.
  Listen 127.0.0.1

# Users may change this section to create a different number or size of
#  malloc LUNs.
# This will generate 8 LUNs with a malloc-allocated backend.
+0 −7
Original line number Diff line number Diff line
@@ -16,13 +16,6 @@
  #  on all cores.
  #ReactorMask 0x1

[Rpc]
  # Defines whether spdk will enable configuration via RPC.
  # Default is disabled.  Note that the RPC interface is not
  # authenticated, so users should be careful about enabling
  # RPC in non-trusted environments.
  #Enable No

[Ioat]
  Disable Yes

Loading