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'
$ lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04
$ dpkg -S /usr/lib/ python3/ dist-packages/ ceph_iscsi_ config/ gateway. py python3/ dist-packages/ ceph_iscsi_ config/ gateway. py
ceph-iscsi: /usr/lib/
$ apt-cache policy ceph-iscsi de.archive. ubuntu. com/ubuntu focal/universe amd64 Packages de.archive. ubuntu. com/ubuntu focal/universe i386 Packages dpkg/status
ceph-iscsi:
Installed: 3.4-0ubuntu2
Candidate: 3.4-0ubuntu2
Version table:
*** 3.4-0ubuntu2 500
500 http://
500 http://
100 /var/lib/
On second startup after a reboot, rbd-target-api crashes with a TypeError:
Traceback (most recent call last): rbd-target- api", line 2952, in <module> rbd-target- api", line 2862, in main osd_blacklist_ cleanup( ) python3/ dist-packages/ ceph_iscsi_ config/ gateway. py", line 110, in osd_blacklist_ cleanup rm_blacklist( blacklist_ entry.split( ' ')[0]) python3/ dist-packages/ ceph_iscsi_ config/ gateway. py", line 46, in ceph_rm_blacklist
File "/usr/bin/
main()
File "/usr/bin/
osd_state_ok = ceph_gw.
File "/usr/lib/
rm_ok = self.ceph_
File "/usr/lib/
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/ e48dcb0d3099b27 595b9f4433da849 3f5edb9206# diff-f1381af411 4a1e777ef5e8b7b 7452a01