Attempting to deploy iSCSI fails with "IndexError: list index out of range"

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

Environment

SUSE Enterprise Storage 7

Situation

When attempting to deploy iSCSI, the deployment fails with the following error visible in the system log:
 
2021-03-16T13:28:00.291913+02:00 cephgw01 conmon[3059045]: debug Reading the configuration object to update local LIO configuration
2021-03-16T13:28:00.292135+02:00 cephgw01 conmon[3059045]: debug Processing Gateway configuration
2021-03-16T13:28:00.292328+02:00 cephgw01 conmon[3059045]: debug Setting up iqn.2001-07.com.ceph:1234567890123
2021-03-16T13:28:00.329923+02:00 cephgw01 conmon[3059045]: Traceback (most recent call last):
2021-03-16T13:28:00.330258+02:00 cephgw01 conmon[3059045]:   File "/usr/bin/rbd-target-api", line 2994, in <module>
2021-03-16T13:28:00.330595+02:00 cephgw01 conmon[3059045]:     main()
2021-03-16T13:28:00.330794+02:00 cephgw01 conmon[3059045]:   File "/usr/bin/rbd-target-api", line 2902, in main
2021-03-16T13:28:00.331036+02:00 cephgw01 conmon[3059045]:     ceph_gw.define()
2021-03-16T13:28:00.331282+02:00 cephgw01 conmon[3059045]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/gateway.py", line 249, in define
2021-03-16T13:28:00.331482+02:00 cephgw01 conmon[3059045]:     self.define_targets()
2021-03-16T13:28:00.331708+02:00 cephgw01 conmon[3059045]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/gateway.py", line 222, in define_targets
2021-03-16T13:28:00.331900+02:00 cephgw01 conmon[3059045]:     target = self.define_target(iqn, target.get('ip_list', {}))
2021-03-16T13:28:00.332116+02:00 cephgw01 conmon[3059045]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/gateway.py", line 179, in define_target
2021-03-16T13:28:00.332331+02:00 cephgw01 conmon[3059045]:     target.manage('target')
2021-03-16T13:28:00.332506+02:00 cephgw01 conmon[3059045]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/target.py", line 602, in manage
2021-03-16T13:28:00.332720+02:00 cephgw01 conmon[3059045]:     self.load_config()
2021-03-16T13:28:00.332901+02:00 cephgw01 conmon[3059045]:   File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/target.py", line 404, in load_config
2021-03-16T13:28:00.333104+02:00 cephgw01 conmon[3059045]:     ip_address = list(tpg.network_portals)[0].ip_address
2021-03-16T13:28:00.333309+02:00 cephgw01 conmon[3059045]: IndexError: list index out of range

Additionally something like the following errors may be seen in the "/var/log/ceph/cephadm.log" file:
 
2021-03-16 13:28:00,113 DEBUG Running command: /usr/bin/podman exec e2c6x622bf857e7bf6cb3e173f45c851xe515c390629391207b3214xy2xe9g2d /usr/bin/python3 -c import pkg_resources; print(pkg_resources.require('ceph_iscsi')[0].version)
2021-03-16 13:28:00,405 DEBUG /usr/bin/podman:stderr Error: exec session exited with non-zero exit code 137: OCI runtime error
2021-03-16 13:28:00,407 INFO Non-zero exit code 137 from /usr/bin/podman exec e2c6x622bf857e7bf6cb3e173f45c851xe515c390629391207b3214xy2xe9g2d /usr/bin/python3 -c import pkg_resources; print(pkg_resources.require('ceph_iscsi')[0].version)
2021-03-16 13:28:00,407 INFO /usr/bin/podman:stderr Error: exec session exited with non-zero exit code 137: OCI runtime error

Resolution

Clear the existing target configuration from the intended Gateway hosts before attempting to deploy iSCSI again.

Cause

An initial deployment was interrupted or not completed, which left an incomplete existing target configuration on the intended iSCSI Gateway nodes.

Additional Information

To clear the existing configuration on the iSCSI Gateway hosts take the following steps on the hosts directly:

1. Install targetcli with "zypper in python3-targetcli-fb".
2. To clear the configuration now execute: "targetcli clearconfig confirm=True".
3. Verify that no configuration is returned by running "targetcli ls".

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:000019910
  • Creation Date: 16-Mar-2021
  • Modified Date:16-Mar-2021
    • SUSE Enterprise Storage

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

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

Join Our Community

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.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

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

Go to Customer Center