SUSE Support

Here When You Need Us

iSCSI Gateway fails to start due to incorrect pool name or rbd image name configured in "gateway.conf"

This document (000019734) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Enterprise Storage 6

Situation

When the iSCSI Gateway service "rbd-target-api.service" is starting up, it encounters the following type of errors in "/var/log/messages" of the iSCSI Node if the pool name (e.g. "TEST_ISCSI_POOL_1") is incorrect:

  rbd-target-api[xxxx]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/lun.py", line 1323, in define_luns
  rbd-target-api[xxxx]:     with cluster.open_ioctx(pool) as ioctx:
  rbd-target-api[xxxx]:   File "rados.pyx", line 516, in rados.requires.wrapper.validate_func
  rbd-target-api[xxxx]:   File "rados.pyx", line 1203, in rados.Rados.open_ioctx
  rbd-target-api[xxxx]: rados.ObjectNotFound: [errno 2] error opening pool 'b'TEST_ISCSI_POOL_1''
  ......
  rbd-target-api[xxxx]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/target.py", line 404, in load_config
  rbd-target-api[xxxx]:     ip_address = list(tpg.network_portals)[0].ip_address
  rbd-target-api[xxxx]: IndexError: list index out of range

If the RBD (Rados Block Device) image name (e.g. "ISSCI_TEST_IMAGE") is incorrect, the following type of errors are printed:
 
  rbd-target-api[xxxx]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/lun.py", line 1330, in define_luns
  rbd-target-api[xxxx]:     with rbd.Image(ioctx, image_name) as rbd_image:
  rbd-target-api[xxxx]:   File "rbd.pyx", line 2947, in rbd.Image.__init__
  rbd-target-api[xxxx]: rbd.ImageNotFound: [errno 2] error opening image b'ISSCI_TEST_IMAGE' at snapshot None
  ......
  rbd-target-api[xxxx]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/target.py", line 404, in load_config
  rbd-target-api[xxxx]:     ip_address = list(tpg.network_portals)[0].ip_address
  rbd-target-api[xxxx]: IndexError: list index out of range

Resolution

The configuration in the "gateway.conf" file for the iSCSI Gateway contains an incorrect pool name or RBD image name and needs to be updated with the correct information.

1. Find out the correct pool name and RBD image name used in the iSCSI configuration:

     # rados lspools
     test_iscsi_pool_1


     # rbd -p test_iscsi_pool_1 ls
     issci_test_image


     In this example, the correct pool name is "test_iscsi_pool_1" and the correct RBD image name is "issci_test_image". The error is caused by upper case being used for the pool name and image names inside the "gateway.conf" file.

2. Get the "gateway.conf" file from the iSCSI pool:

     # rados -p iscsi-images get gateway.conf /tmp/gateway.conf

   In this example, the pool name used by the iSCSI Gateway is "iscsi-images". Note however that the pool name can be different in other iSCSI deployments. The pool name is configured in "/etc/ceph/iscsi-gateway.cfg" located on the designated iSCSI node(s).

3. Modify the "gateway.conf" file to ensure the correct pool name (e.g. "test_iscsi_pool_1") and image name (e.g. "issci_test_image") are used in the iSCSI configuration:

     ...
     "disks": {
         "test_iscsi_pool_1/issci_test_image": {
            "allocating_host": "ses6-node2.example.com",
            "backstore": "rbd",
            "backstore_object_name": "test_iscsi_pool_1.issci_test_image",
            "controls": {},
            "created": "2020/09/30 06:14:43",
            "image": "issci_test_image",
            "owner": "ses6-node2.example.com",
            "pool": "test_iscsi_pool_1",
            "pool_id": 10,
            "updated": "2020/09/30 06:14:44",
            "wwn": "16d74503-39d6-433a-81c4-e969119937d0"
        }
     ...
     "targets": {
       ...
       "iqn.2001-07.com.ceph:1601446434222": {
         ...
           "disks": {
               "test_iscsi_pool_1/issci_test_image": {
                   "lun_id": 0
              }
           },
     ...


4. Put the modified file "gateway.conf" back to the iSCSI pool. For example if the file is saved in "/tmp/gateway.conf":

     # rados -p iscsi-images put gateway.conf /tmp/gateway.conf

5. Start the iSCSI Gateway service on the iSCSI Node(s):

     # systemctl reset-failed rbd-target-api.service
     # targetcli clearconfig confirm=True
     # systemctl start rbd-target-api.service


6. Check the status of the iSCSI Gateway service to confirm it is running:

     # systemctl status rbd-target-api.service

Cause

The "gateway.conf" file for the iSCSI Gateway contains an incorrect pool name or RBD image name.

Status

Reported to Engineering

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019734
  • Creation Date: 15-Oct-2020
  • Modified Date:23-Oct-2020
    • SUSE Enterprise Storage

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.