Comment 0 for bug 1883112

Revision history for this message
Julian Jacobsen (jj-compositiv) wrote : rbd-target-api crashes with python TypError

$ lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04

$ dpkg -S /usr/lib/python3/dist-packages/ceph_iscsi_config/gateway.py
ceph-iscsi: /usr/lib/python3/dist-packages/ceph_iscsi_config/gateway.py

$ apt-cache policy ceph-iscsi
ceph-iscsi:
  Installed: 3.4-0ubuntu2
  Candidate: 3.4-0ubuntu2
  Version table:
 *** 3.4-0ubuntu2 500
        500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://de.archive.ubuntu.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status

On second startup after a reboot, rbd-target-api crashes with a TypeError:

Traceback (most recent call last):
  File "/usr/bin/rbd-target-api", line 2952, in <module>
    main()
  File "/usr/bin/rbd-target-api", line 2862, in main
    osd_state_ok = ceph_gw.osd_blacklist_cleanup()
  File "/usr/lib/python3/dist-packages/ceph_iscsi_config/gateway.py", line 110, in osd_blacklist_cleanup
    rm_ok = self.ceph_rm_blacklist(blacklist_entry.split(' ')[0])
  File "/usr/lib/python3/dist-packages/ceph_iscsi_config/gateway.py", line 46, in ceph_rm_blacklist
    if ("un-blacklisting" in result) or ("isn't blacklisted" in result):
TypeError: a bytes-like object is required, not 'str'

Upstream has a fix: https://github.com/ceph/ceph-iscsi/commit/e48dcb0d3099b27595b9f4433da8493f5edb9206#diff-f1381af4114a1e777ef5e8b7b7452a01