Skip to content

qa/tasks/ceph_manager: do not pick a pool is there is no pools#32519

Merged
tchaikov merged 1 commit intoceph:masterfrom
tchaikov:wip-qa-skip-if-no-pool
Jan 10, 2020
Merged

qa/tasks/ceph_manager: do not pick a pool is there is no pools#32519
tchaikov merged 1 commit intoceph:masterfrom
tchaikov:wip-qa-skip-if-no-pool

Conversation

@tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Jan 7, 2020

random.choice(seq) raises IndexError if seq is empty. we cannot ensure
there is always one or more pools in the cluster while using pool
related thrasher. so skip the thrasher action if there is no pools at
that moment.

Signed-off-by: Kefu Chai kchai@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@tchaikov
Copy link
Contributor Author

tchaikov commented Jan 7, 2020

this change should address the failure of http://pulpito.ceph.com/kchai-2020-01-07_01:48:07-rados-wip-kefu-testing-2020-01-07-0032-distro-basic-smithi/4643454/. where i had

2020-01-07T04:39:54.294 INFO:tasks.thrashosds.thrasher:Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-kefu-testing-2020-01-07-0032/qa/tasks/ceph_manager.py", line 993, in wrapper
    return func(self)
  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-kefu-testing-2020-01-07-0032/qa/tasks/ceph_manager.py", line 1123, in _do_thrash
    self.choose_action()()
  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-kefu-testing-2020-01-07-0032/qa/tasks/ceph_manager.py", line 668, in grow_pool
    pool = self.ceph_manager.get_pool()
  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-kefu-testing-2020-01-07-0032/qa/tasks/ceph_manager.py", line 1880, in get_pool
    return random.choice(self.pools.keys())
  File "/usr/lib/python2.7/random.py", line 275, in choice
    return seq[int(self.random() * len(seq))]  # raises IndexError if seq is empty
IndexError: list index out of range

@tchaikov
Copy link
Contributor Author

tchaikov commented Jan 7, 2020

jenkins test make check

@jdurgin
Copy link
Member

jdurgin commented Jan 8, 2020

random.choice(seq) raises IndexError if seq is empty. we cannot ensure
there is always one or more pools in the cluster while using pool
related thrasher. so skip the thrasher action if there is no pools at
that moment.

Fixes: https://tracker.ceph.com/issues/43412
Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov tchaikov force-pushed the wip-qa-skip-if-no-pool branch from 09efe90 to e67034b Compare January 9, 2020 02:27
@tchaikov
Copy link
Contributor Author

tchaikov commented Jan 9, 2020

changlog

  • add "Fixed" line in commit message

@sebastian-philipp
Copy link
Contributor

https://jenkins.ceph.com/job/ceph-pull-requests/41828 failed with

191/191 Test  #14: test_objectstore_memstore.sh ............***Timeout 3600.01 sec

@sebastian-philipp
Copy link
Contributor

jenkins test make check

@tchaikov
Copy link
Contributor Author

191/191 Test  #14: test_objectstore_memstore.sh ............***Timeout 3600.01 sec

@tchaikov tchaikov merged commit 14a138e into ceph:master Jan 10, 2020
@tchaikov tchaikov deleted the wip-qa-skip-if-no-pool branch January 10, 2020 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants