Activity log for bug #1883112

Date Who What changed Old value New value Message
2020-06-11 13:58:10 Julian Jacobsen bug added bug
2020-06-11 14:01:03 Julian Jacobsen summary rbd-target-api crashes with python TypError rbd-target-api crashes with python TypeError
2020-06-11 19:43:09 Hans Joachim Desserud tags focal
2022-02-22 14:40:27 Liam Young ceph-iscsi (Ubuntu): status New Confirmed
2022-02-22 16:10:53 Liam Young attachment added deb.diff https://bugs.launchpad.net/ubuntu/+source/ceph-iscsi/+bug/1883112/+attachment/5562748/+files/deb.diff
2022-02-22 16:24:49 Ubuntu Foundations Team Bug Bot tags focal focal patch
2022-02-22 16:24:54 Ubuntu Foundations Team Bug Bot bug added subscriber Ubuntu Sponsors Team
2022-02-23 10:24:22 Liam Young description $ 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 [Impact] * rbd-target-api service fails to start if there is a blocklist entry for the unit making the service unavailable. * When the rbd-target-api service starts it checks if any of the ip addresses on the machine it is running on are listed as blocked. If there are entries it tries to remove them. In the process of removing the entries the code attempts to test whether a string is in the result of a subprocess.check_output call. This would have worked in python2 but with python3 a byte like object is returned and check now throws a TypeError. This fix, taken from upstream, changes the code to remove the `in` check and replace it with a try/except [Test Plan] If an existing ceph-iscsi deployment is available then skip to step 3. 1) Deploy the bundle below (tested with OpenStack providor). series: focal applications: ceph-iscsi: charm: cs:ceph-iscsi num_units: 2 ceph-osd: charm: ch:ceph-osd num_units: 3 storage: osd-devices: 'cinder,10G' options: osd-devices: '/dev/test-non-existent' channel: latest/edge ceph-mon: charm: ch:ceph-mon num_units: 3 options: monitor-count: '3' channel: latest/edge relations: - - 'ceph-mon:client' - 'ceph-iscsi:ceph-client' - - 'ceph-osd:mon' - 'ceph-mon:osd' 2) Connect to ceph-iscsi unit: juju ssh -m zaza-a1d88053ab85 ceph-iscsi/0 3) Stop rbd-target-api via systemd to make test case clearer: sudo systemctl stop rbd-target-api 4) Add 2 blocklist entries for this unit (due to another issue the ordering of the output from `osd blacklist ls` matters which can lead to the reproduction of this bug being intermittent. To avoid this add two entries which ensures there is always an entry for this node in the list of blocklist entries to be removed). sudo ceph -n client.ceph-iscsi --conf /etc/ceph/iscsi/ceph.conf osd blacklist add $(hostname --all-ip-addresses | awk '{print $1}'):0/1 sudo ceph -n client.ceph-iscsi --conf /etc/ceph/iscsi/ceph.conf osd blacklist add $(hostname --all-ip-addresses | awk '{print $1}'):0/2 sudo ceph -n client.ceph-iscsi --conf /etc/ceph/iscsi/ceph.conf osd blacklist ls listed 2 entries 172.20.0.135:0/2 2022-02-23T11:14:54.850352+0000 172.20.0.135:0/1 2022-02-23T11:14:52.502592+0000 5) Attempt to start service: sudo /usr/bin/python3 /usr/bin/rbd-target-api 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 111, 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' [Where problems could occur] * Problems could occur with the service starting as this blocklist check is done at startup. * Blocklist entries could fail to be removed. Old bug description: $ 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
2022-02-23 11:18:37 James Page nominated for series Ubuntu Focal
2022-02-23 11:18:37 James Page bug task added ceph-iscsi (Ubuntu Focal)
2022-02-23 11:18:37 James Page nominated for series Ubuntu Impish
2022-02-23 11:18:37 James Page bug task added ceph-iscsi (Ubuntu Impish)
2022-02-23 11:18:43 James Page ceph-iscsi (Ubuntu): status Confirmed Fix Released
2022-02-23 11:18:45 James Page ceph-iscsi (Ubuntu Focal): status New Triaged
2022-02-23 11:18:48 James Page ceph-iscsi (Ubuntu Impish): status New Triaged
2022-02-23 11:18:52 James Page ceph-iscsi (Ubuntu Focal): importance Undecided High
2022-02-23 11:18:54 James Page ceph-iscsi (Ubuntu Impish): importance Undecided High
2022-02-23 11:19:05 James Page bug added subscriber Ubuntu Stable Release Updates Team
2022-03-08 18:39:59 Brian Murray ceph-iscsi (Ubuntu Impish): status Triaged Incomplete
2022-03-08 18:40:06 Brian Murray bug added subscriber Brian Murray
2022-03-08 18:40:07 Brian Murray removed subscriber Ubuntu Sponsors Team
2022-03-15 10:10:23 Liam Young attachment added gw-deb.diff https://bugs.launchpad.net/ubuntu/+source/ceph-iscsi/+bug/1883112/+attachment/5569162/+files/gw-deb.diff
2022-03-15 10:48:51 Robie Basak ceph-iscsi (Ubuntu Impish): status Incomplete Fix Committed
2022-03-15 10:48:53 Robie Basak bug added subscriber SRU Verification
2022-03-15 10:48:54 Robie Basak tags focal patch focal patch verification-needed verification-needed-impish
2022-03-15 10:49:28 Robie Basak ceph-iscsi (Ubuntu Focal): status Triaged Fix Committed
2022-03-15 10:49:31 Robie Basak tags focal patch verification-needed verification-needed-impish focal patch verification-needed verification-needed-focal verification-needed-impish
2022-03-16 13:50:25 Liam Young tags focal patch verification-needed verification-needed-focal verification-needed-impish focal patch verification-done-focal verification-needed verification-needed-impish
2022-05-03 18:09:31 Brian Murray ceph-iscsi (Ubuntu Focal): status Fix Committed Incomplete
2022-06-02 16:32:12 Chris MacNaughton tags focal patch verification-done-focal verification-needed verification-needed-impish focal patch verification-done verification-done-focal verification-done-impish
2022-06-06 14:32:10 Launchpad Janitor ceph-iscsi (Ubuntu Impish): status Fix Committed Fix Released
2022-06-06 14:32:14 Łukasz Zemczak removed subscriber Ubuntu Stable Release Updates Team
2022-06-15 04:53:05 James Page ceph-iscsi (Ubuntu Focal): status Incomplete Fix Committed
2022-06-15 12:59:53 Launchpad Janitor ceph-iscsi (Ubuntu Focal): status Fix Committed Fix Released