Project

General

Profile

Actions

Bug #70818

closed
AM BS

test_pool_min_size: TypeError: object of type 'NoneType' has no len()

Bug #70818: test_pool_min_size: TypeError: object of type 'NoneType' has no len()

Added by Aishwarya Mathuria over 1 year ago. Updated 29 days ago.

Status:
Backporting
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Fixed In:
v20.3.0-1765-gef78cbd90f
Released In:
v21.2.0~2452
Upkeep Timestamp:
2026-11-04T01:06:01+00:00

Description

/a/teuthology-2025-04-06_20:00:14-rados-main-distro-default-smithi/8226526

2025-04-06T21:06:19.754 INFO:tasks.thrashosds.thrasher:No pgs; doing nothing
2025-04-06T21:06:19.755 INFO:tasks.thrashosds.thrasher:Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_ceph_e0958b50ee586f1790a2e88773136375bddf51c4/qa/tasks/ceph_manager.py", line 192, in wrapper
    return func(self)
  File "/home/teuthworker/src/git.ceph.com_ceph_e0958b50ee586f1790a2e88773136375bddf51c4/qa/tasks/ceph_manager.py", line 1496, in _do_thrash
    self.choose_action()()
  File "/home/teuthworker/src/git.ceph.com_ceph_e0958b50ee586f1790a2e88773136375bddf51c4/qa/tasks/ceph_manager.py", line 1042, in test_pool_min_size
    assert most_killable < len(acting_set)
TypeError: object of type 'NoneType' has no len()

2025-04-06T21:06:19.755 ERROR:tasks.thrashosds.thrasher:exception:
Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_ceph_e0958b50ee586f1790a2e88773136375bddf51c4/qa/tasks/ceph_manager.py", line 1367, in do_thrash
    self._do_thrash()
  File "/home/teuthworker/src/git.ceph.com_ceph_e0958b50ee586f1790a2e88773136375bddf51c4/qa/tasks/ceph_manager.py", line 192, in wrapper
    return func(self)
  File "/home/teuthworker/src/git.ceph.com_ceph_e0958b50ee586f1790a2e88773136375bddf51c4/qa/tasks/ceph_manager.py", line 1496, in _do_thrash
    self.choose_action()()
  File "/home/teuthworker/src/git.ceph.com_ceph_e0958b50ee586f1790a2e88773136375bddf51c4/qa/tasks/ceph_manager.py", line 1042, in test_pool_min_size
    assert most_killable < len(acting_set)
TypeError: object of type 'NoneType' has no len()


Related issues 3 (1 open — 2 closed)

Related to RADOS - Bug #83026: rados/thrash-erasure-code: Thrasher test_pool_min_size asserted on an empty acting setNew

Actions
Copied to RADOS - Backport #72223: tentacle: test_pool_min_size: TypeError: object of type 'NoneType' has no len()ResolvedBill Scales

Actions
Copied to RADOS - Backport #72224: squid: test_pool_min_size: TypeError: object of type 'NoneType' has no len()RejectedBill Scales

Actions

LF Updated by Laura Flores over 1 year ago Actions #1

  • Description updated (diff)

LF Updated by Laura Flores over 1 year ago Actions #2

  • Description updated (diff)

RZ Updated by Radoslaw Zarzynski over 1 year ago Actions #3

    def get_rand_pg_acting_set(self, pool_id=None):
        """     
        Return an acting set of a random PG, you
        have the option to specify which pool you
        want the PG from.
        """ 
        pgs = self.ceph_manager.get_pg_stats()
        if not pgs: 
            self.log('No pgs; doing nothing')
            return          
        if pool_id:
           pgs_in_pool = [pg for pg in pgs if int(pg['pgid'].split('.')[0]) == pool_id]
           pg = random.choice(pgs_in_pool)
        else:   
            pg = random.choice(pgs)
        self.log('Choosing PG {id} with acting set {act}'.format(id=pg['pgid'],act=pg['acting']))
        return pg['acting']
    def test_pool_min_size(self):
# ...
        while time.time() - start < self.config.get("test_min_size_duration", 1800):
            # look up k and m from all the pools on each loop, in case it
            # changes as the cluster runs
            pools_json = self.ceph_manager.get_osd_dump_json()['pools']
            if len(pools_json) == 0:
                self.log("No pools yet, waiting")
                time.sleep(5)
                continue
            for pool_json in pools_json:
#...
                acting_set = self.get_rand_pg_acting_set(pool_id)
                assert most_killable < len(acting_set)

A test issue on lack of synchronization / waiting PGs becoming visible at mgrs?

LF Updated by Laura Flores over 1 year ago Actions #4

/a/teuthology-2025-04-06_20:00:14-rados-main-distro-default-smithi/8226526

LF Updated by Laura Flores over 1 year ago Actions #5

It's happening in `rados/thrash-erasure-code-overwrites`. Could this have anything to do with any recent EC changes?

LF Updated by Laura Flores over 1 year ago Actions #6

Laura Flores wrote in #note-5:

It's happening in `rados/thrash-erasure-code-overwrites`. Could this have anything to do with any recent EC changes?

@Bill Scales can you have a look?

BS Updated by Bill Scales over 1 year ago Actions #7

  • Assignee set to Bill Scales

This isn't associated with the new EC changes. At first glance it looks like a test script issue - I think that waiting for the pool to exist isn't sufficient to guarantee that the pool has PGs - the pool gets created first, then the OSDs create the PGs, so there is a window where the pool can exist, but the PGs don't.

Will investigate further and look for a way to make the script more robust

LF Updated by Laura Flores over 1 year ago Actions #8

Thanks for confirming Bill!

LF Updated by Laura Flores over 1 year ago Actions #9

Bump up, but relatively low priority. (Writing from bug scrub)

LF Updated by Laura Flores over 1 year ago Actions #10

/a/teuthology-2025-05-18_22:00:03-rados-tentacle-distro-default-smithi/8288519

LF Updated by Laura Flores over 1 year ago Actions #11

  • Tags changed from main-failures to main-failures, test-failure

LF Updated by Laura Flores over 1 year ago Actions #12

/a/teuthology-2025-05-18_22:00:03-rados-tentacle-distro-default-smithi/8288519

LF Updated by Laura Flores over 1 year ago Actions #13

@Bill Scales any update on this one? Writing from bug scrub.

BS Updated by Bill Scales over 1 year ago Actions #14

  • Pull request ID set to 64016

Fix to qa OSD thrasher coded. I've not been able to recreate the race hazard but have tested that the changes to the script are not causing a regression

RZ Updated by Radoslaw Zarzynski over 1 year ago Actions #15

  • Status changed from New to Fix Under Review

RZ Updated by Radoslaw Zarzynski over 1 year ago Actions #16

The PR went into QA.

LF Updated by Laura Flores over 1 year ago Actions #17

Bump up

LF Updated by Laura Flores over 1 year ago Actions #18

Bump up

UB Updated by Upkeep Bot over 1 year ago Actions #19

  • Merge Commit set to ef78cbd90f85f90e076e378276c52bde3d58ba35
  • Fixed In set to v20.3.0-1765-gef78cbd90f
  • Upkeep Timestamp set to 2025-07-17T23:54:34+00:00

RZ Updated by Radoslaw Zarzynski over 1 year ago Actions #20

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to tentacle,squid

UB Updated by Upkeep Bot over 1 year ago Actions #21

  • Copied to Backport #72223: tentacle: test_pool_min_size: TypeError: object of type 'NoneType' has no len() added

UB Updated by Upkeep Bot over 1 year ago Actions #22

  • Copied to Backport #72224: squid: test_pool_min_size: TypeError: object of type 'NoneType' has no len() added

UB Updated by Upkeep Bot over 1 year ago Actions #23

  • Tags (freeform) set to backport_processed

NM Updated by Nitzan Mordechai 6 months ago Actions #24

/a/pdonnell-2026-06-13_16:54:44-rados-wip-pdonnell-testing-20260613.133611-tentacle-distro-default-trial/292159

BS Updated by Bill Scales 4 months ago Actions #25

  • Backport changed from tentacle,squid to tentacle

Fix cannot be back ported to squid as the function it is fixing doesn't exist in qa/tasks/ceph_manager.py. I don't think we want to backport the other changes to test_min_size that would be necessary to back port this fix.

UB Updated by Upkeep Bot 3 months ago Actions #26

  • Status changed from Pending Backport to Backporting
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2025-07-17T23:54:34+00:00 to 2026-08-27T18:05:07+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #27

  • Released In set to v21.2.0~2451
  • Upkeep Timestamp changed from 2026-08-27T18:05:07+00:00 to 2026-10-24T01:06:57+00:00

UB Updated by Upkeep Bot 29 days ago Actions #28

  • Released In changed from v21.2.0~2451 to v21.2.0~2452
  • Upkeep Timestamp changed from 2026-10-24T01:06:57+00:00 to 2026-11-04T01:06:01+00:00

LF Updated by Laura Flores 22 days ago Actions #29

  • Related to Bug #83026: rados/thrash-erasure-code: Thrasher test_pool_min_size asserted on an empty acting set added
Actions

Also available in: PDF Atom