[SPDK] json conf file syntax

Jonathan Richardson <jonathan.richardson at broadcom.com>
Newsgroups dev.linux.lists.spdk
Message-ID <CAHrpVsWCAy7i10J8WwiK9eJAYkpUf3OM2kAz=ArWvgcFPsYkvQ@mail.gmail.com>
Hi,

I converted my old conf file using config_converter.py but there is no
Nvme section in the json file output. When I run nvmf_tgt I get these
errors.

[2021-01-11 20:41:39.448690] json_config.c:
392:app_json_config_load_subsystem_config_entry: *DEBUG*:     params:
{
            "allow_duplicated_isid": false,
            "default_time2retain": 20,
            "mutual_chap": false,
            "max_connections_per_session": 2,
            "nop_timeout": 60,
            "disable_chap": false,
            "require_chap": false,
            "node_base": "iqn.2016-06.io.spdk",
            "chap_group": 0,
            "max_sessions": 128,
            "immediate_data": true,
            "error_recovery_level": 0,
            "nop_in_interval": 30,
            "default_time2wait": 2,
            "max_queue_depth": 64,
            "first_burst_length": 8192
          }
[2021-01-11 20:41:39.793791] jsonrpc_client.c:
95:jsonrpc_parse_response: *DEBUG*: JSON string is :
{"jsonrpc":"2.0","id":0,"error":{"code":-32601,"message":"Method not found"}}

[2021-01-11 20:41:39.793809] json_config.c: 219:rpc_client_poller:
*ERROR*: error response:
{
  "code": -32601,
  "message": "Method not found"
}
[2021-01-11 20:41:39.794297] json_config.c:
135:app_json_config_load_done: *DEBUG*: Config load finished with rc
-22

Not sure why there is an iscsi_set_options method in my json.  This is
the nvme section in the conf file:

[Nvme]
  TransportId "trtype:PCIe traddr:0007:01:00.0" Nvme0
  HotplugEnable Yes
  HotplugPollRate 1000000

And my json is below. Is there something missing in it?

{
  "subsystems": [
    {
      "subsystem": "accel",
      "config": null
    },
    {
      "subsystem": "interface",
      "config": null
    },
    {
      "subsystem": "net_framework",
      "config": null
    },
    {
      "subsystem": "bdev",
      "config": [
        {
          "params": {
            "bdev_io_pool_size": 65536,
            "bdev_io_cache_size": 256
          },
          "method": "bdev_set_options"
        },
        {
          "params": {
            "retry_count": 4,
            "timeout_us": 0,
            "nvme_adminq_poll_period_us": 1000000,
            "action_on_timeout": "none",
            "nvme_ioq_poll_period_us": 0
          },
          "method": "bdev_nvme_set_options"
        },
        {
          "params": {
            "enable": true,
            "period_us": 100000
          },
          "method": "bdev_nvme_set_hotplug"
        }
      ]
    },
    {
      "subsystem": "scsi",
      "config": null
    },
    {
      "subsystem": "nvmf",
      "config": [
        {
          "params": {
            "acceptor_poll_rate": 10000
          },
          "method": "nvmf_set_config"
        },
        {
          "params": {
            "max_subsystems": 1024
          },
          "method": "nvmf_set_max_subsystems"
        },
        {
          "params": {
            "nqn": "nqn.2016-06.io.spdk:cnode0",
            "allow_any_host": true,
            "serial_number": "SPDK00000000000001",
            "model_number": "SPDK bdev Controller"
          },
          "method": "nvmf_create_subsystem"
        },
        {
          "params": {
            "listen_address": {
              "trtype": "RDMA",
              "adrfam": "IPv4",
              "trsvcid": "1023",
              "traddr": "192.168.1.10"
            },
            "nqn": "nqn.2016-06.io.spdk:cnode0"
          },
          "method": "nvmf_subsystem_add_listener"
        },
        {
          "params": {
            "namespace": {
              "nsid": 1,
              "bdev_name": "Nvme0n1"
            },
            "nqn": "nqn.2016-06.io.spdk:cnode0"
          },
          "method": "nvmf_subsystem_add_ns"
        }
      ]
    },
    {
      "subsystem": "nbd",
      "config": []
    },
    {
      "subsystem": "vhost",
      "config": []
    },
    {
      "subsystem": "iscsi",
      "config": [
        {
          "method": "iscsi_set_options",
          "params": {
            "allow_duplicated_isid": false,
            "default_time2retain": 20,
            "mutual_chap": false,
            "max_connections_per_session": 2,
            "nop_timeout": 60,
            "disable_chap": false,
            "require_chap": false,
            "node_base": "iqn.2016-06.io.spdk",
            "chap_group": 0,
            "max_sessions": 128,
            "immediate_data": true,
            "error_recovery_level": 0,
            "nop_in_interval": 30,
            "default_time2wait": 2,
            "max_queue_depth": 64,
            "first_burst_length": 8192
          }
        }
      ]
    }
  ]
}
smime.p7s (application/pkcs7-signature, 4.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.