Cannot use in-kernel TLS using nvme-cli in RHEL 9.2, , getting error in generating tls key

115 views Asked by At

Trying to use in-kernel TLS using nvme-cli, referring the following article: nvme: In-kernel TLS support for TCP . Exported a nvme target with TCP transport, nqn 'testnqn' with localhost '127.0.0.1' as port (Ref. here):

Normally, nvme-connect is successful.

While using "nvme gen-tls-key --subsysnqn=testnqn" with nvme-cli to generate key required for TLS handshake, getting this error: "Failed to insert key, error 126".

test.json: 
    {
  "ports": [
    {
      "addr": {
        "adrfam": "ipv4",
        "traddr": "127.0.0.1",
        "treq": "not specified",
        "trsvcid": "4420",
        "trtype": "tcp"
      },
      "ana_groups": [
        {
          "ana": {
            "state": "optimized"
          },
          "grpid": 1
        }
      ],
      "param": {
        "inline_data_size": "16384",
        "pi_enable": "0"
      },
      "portid": 1,
      "referrals": [],
      "subsystems": [
        "testnqn"
      ]
    }
  ],
  "subsystems": [
    {
      "allowed_hosts": [],
      "attr": {
        "allow_any_host": "1",
        "cntlid_max": "65519",
        "cntlid_min": "1",
        "model": "Linux",
        "pi_enable": "0",
        "qid_max": "128",
        "serial": "8d56b289fe7f0a73eff8",
        "version": "1.3"
      },
      "namespaces": [
        {
          "ana_grpid": 1,
          "device": {
            "nguid": "00000000-0000-0000-0000-000000000000",
            "path": "/dev/sdb",
            "uuid": "45446286-372f-43e8-bfde-024ca4ef7bf1"
          },
          "enable": 1,
          "nsid": 10
        }
      ],
      "nqn": "testnqn"
    }
  ]
}
0

There are 0 answers