forked from scylladb/scylla-cluster-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enospc_test.py
40 lines (32 loc) · 1.41 KB
/
enospc_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See LICENSE for more details.
#
# Copyright (c) 2017 ScyllaDB
from sdcm.tester import ClusterTester
from sdcm.nemesis import EnospcAllNodesMonkey
from sdcm.utils.common import skip_optional_stage
class EnospcTest(ClusterTester):
"""
Cost rest space to trigger ENOSPC error for scylla,
and then release space to recover scylla service.
"""
def test_enospc_nodes(self):
self.db_cluster.add_nemesis(nemesis=EnospcAllNodesMonkey,
tester_obj=self)
if not skip_optional_stage('main_load'):
# run a write workload
stress_queue = self.run_stress_thread(stress_cmd=self.params.get('stress_cmd'),
stress_num=2, keyspace_num=1)
self.db_cluster.start_nemesis(interval=15)
self.db_cluster.stop_nemesis(timeout=1000)
if not skip_optional_stage('main_load'):
self.get_stress_results(queue=stress_queue)