Description of problem: deployed ceph-iscsi as rpm on rhel8 and noticed this in the rbd-target-gw log Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: File "/usr/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: return self.view_functions[rule.endpoint](**req.view_args) Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: File "/usr/bin/rbd-target-gw", line 35, in prom_metrics Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: stats.collect() Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/metrics.py", line 85, in collect Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: self._get_tpg() Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: File "/usr/lib/python3.6/site-packages/ceph_iscsi_config/metrics.py", line 101, in _get_tpg Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: labels = {"gw_iqn": self._root.targets.next().wwn} Dec 19 15:37:30 rhcs4-2.storage.lab rbd-target-gw[166601]: AttributeError: 'generator' object has no attribute 'next' this blocks any metrics collection from the gw daemons Version-Release number of selected component (if applicable): ceph-iscsi-3.3-2.el8cp.noarch rhel 8.0 python 3.6.8 How reproducible: all the time Steps to Reproduce: 1. /usr/libexec/platform-python -s establishes a python3 environment 2. install ceph-iscsi as an rpm (not container ceph iscsi) 3. after starting rbd-target-gw check the log Actual results: as above Expected results: metrics should be available, and the rbd-target-gw log should be free of python exceptions Additional info:
I'm working on it here https://bugzilla.redhat.com/show_bug.cgi?id=1779645 For the crash in your trace we just needed to use next() instead of .next(). I am updating the code to support multiple targets too.
*** This bug has been marked as a duplicate of bug 1779645 ***