]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tests: Thrasher: eliminate a race between kill_osd and __init__ 13237/head
authorNathan Cutler <ncutler@suse.com>
Thu, 2 Feb 2017 22:23:54 +0000 (23:23 +0100)
committerNathan Cutler <ncutler@suse.com>
Thu, 2 Feb 2017 22:23:54 +0000 (23:23 +0100)
commitb519d38fb1967628ad8a1c46fcfb3f984de58790
treee0107a473269edfad9a6b0fcc7d507fba461fcbb
parent2a75ab7722d7bf835076a1f6b6cef137f4c49d3e
tests: Thrasher: eliminate a race between kill_osd and __init__

If Thrasher.__init__() spawns the do_thrash thread before initializing the
ceph_objectstore_tool property, do_thrash races with the rest
of Thrasher.__init__() and in some cases do_thrash can call kill_osd() before
Trasher.__init__() progresses much further. This can lead to an exception
("AttributeError: Thrasher instance has no attribute 'ceph_objectstore_tool'")
being thrown in kill_osd().

This commit eliminates the race by making sure the ceph_objectstore_tool
attribute is initialized before the do_thrash thread is spawned.

Fixes: http://tracker.ceph.com/issues/18799
Signed-off-by: Nathan Cutler <ncutler@suse.com>
qa/tasks/ceph_manager.py