Skip to content

Commit

Permalink
iscsi, nvmf, vhost: remove default config file pathnames
Browse files Browse the repository at this point in the history
Config file pathnames have been possible on the command line
for a very long time, and all of the SPDK testing infrastructure
uses it.  The default pathnames were added a very long time ago,
and now can cause weird issues like conflicting with --wait-for-rpc
when an INI config file is not passed on the command line but is
pulled in by the default pathname instead.

So remove the default pathnames.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia914ff1c9321235f79f8cc9a054ed7f099340151

Reviewed-on: https://review.gerrithub.io/424606
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
  • Loading branch information
jimharris authored and Ben Walker committed Sep 5, 2018
1 parent ba38785 commit b6ee6f9
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -46,6 +46,10 @@ The ReactorMask config file parameter has been deprecated. Users should
use the -m or --cpumask command line option to specify the CPU core mask
for the application.

Default config file pathnames have been removed from iscsi_tgt, nvmf_tgt
and vhost. Config file pathnames may now only be specified using the
-c command line option.

## v18.07:

### bdev
Expand Down
1 change: 0 additions & 1 deletion app/iscsi_tgt/iscsi_tgt.c
Expand Up @@ -91,7 +91,6 @@ main(int argc, char **argv)
struct spdk_app_opts opts = {};

spdk_app_opts_init(&opts);
opts.config_file = SPDK_ISCSI_DEFAULT_CONFIG;
opts.name = "iscsi";
if ((rc = spdk_app_parse_args(argc, argv, &opts, "b", NULL,
iscsi_parse_arg, iscsi_usage)) !=
Expand Down
4 changes: 0 additions & 4 deletions app/nvmf_tgt/nvmf_main.c
Expand Up @@ -36,9 +36,6 @@
#include "spdk/env.h"
#include "spdk/event.h"

#define SPDK_NVMF_BUILD_ETC "/usr/local/etc/nvmf"
#define SPDK_NVMF_DEFAULT_CONFIG SPDK_NVMF_BUILD_ETC "/nvmf.conf"

static void
nvmf_usage(void)
{
Expand Down Expand Up @@ -67,7 +64,6 @@ main(int argc, char **argv)
/* default value in opts */
spdk_app_opts_init(&opts);
opts.name = "nvmf";
opts.config_file = SPDK_NVMF_DEFAULT_CONFIG;
opts.max_delay_us = 1000; /* 1 ms */
if ((rc = spdk_app_parse_args(argc, argv, &opts, "", NULL,
nvmf_parse_arg, nvmf_usage)) !=
Expand Down
2 changes: 0 additions & 2 deletions app/vhost/vhost.c
Expand Up @@ -39,7 +39,6 @@
#include "spdk/vhost.h"


#define SPDK_VHOST_DEFAULT_CONFIG "/usr/local/etc/spdk/vhost.conf"
#define SPDK_VHOST_DEFAULT_MEM_SIZE 1024

static const char *g_pid_path = NULL;
Expand All @@ -49,7 +48,6 @@ vhost_app_opts_init(struct spdk_app_opts *opts)
{
spdk_app_opts_init(opts);
opts->name = "vhost";
opts->config_file = SPDK_VHOST_DEFAULT_CONFIG;
opts->mem_size = SPDK_VHOST_DEFAULT_MEM_SIZE;
}

Expand Down
2 changes: 0 additions & 2 deletions lib/iscsi/iscsi.h
Expand Up @@ -48,8 +48,6 @@
#include "spdk/assert.h"
#include "spdk/util.h"

#define SPDK_ISCSI_BUILD_ETC "/usr/local/etc/spdk"
#define SPDK_ISCSI_DEFAULT_CONFIG SPDK_ISCSI_BUILD_ETC "/iscsi.conf"
#define SPDK_ISCSI_DEFAULT_NODEBASE "iqn.2016-06.io.spdk"

#define DEFAULT_MAXR2T 4
Expand Down
1 change: 0 additions & 1 deletion test/bdev/bdevio/bdevio.c
Expand Up @@ -957,7 +957,6 @@ main(int argc, char **argv)

spdk_app_opts_init(&opts);
opts.name = "bdevtest";
opts.config_file = "/usr/local/etc/spdk/iscsi.conf";
opts.rpc_addr = NULL;
opts.reactor_mask = "0x7";
opts.mem_size = 1024;
Expand Down
1 change: 0 additions & 1 deletion test/bdev/bdevperf/bdevperf.c
Expand Up @@ -862,7 +862,6 @@ main(int argc, char **argv)

spdk_app_opts_init(&opts);
opts.name = "bdevtest";
opts.config_file = "/usr/local/etc/spdk/iscsi.conf";
opts.rpc_addr = NULL;
opts.reactor_mask = NULL;
opts.mem_size = 1024;
Expand Down

0 comments on commit b6ee6f9

Please sign in to comment.