fixes
diff --git a/wally/main.py b/wally/main.py
index 36d40f0..56d72db 100644
--- a/wally/main.py
+++ b/wally/main.py
@@ -49,7 +49,7 @@
LoadStoredNodesStage)
from .report import HtmlReportStage
-from .sensors import StartSensorsStage, CollectSensorsStage
+from .sensors import StartSensorsStage, CollectSensorsStage, StopSensorsStage
from .console_report import ConsoleReportStage
@@ -253,7 +253,7 @@
ExplicitNodesStage(),
StartSensorsStage(),
RunTestsStage(),
- CollectSensorsStage(),
+ StopSensorsStage(),
ConnectStage(),
SleepStage(),
PrepareNodes()]
@@ -299,6 +299,9 @@
if not opts.dont_collect:
stages.append(CollectInfoStage())
+ if config.no_tests:
+ stages.append(CollectSensorsStage())
+
argv2 = argv[:]
if '--ssh-key-passwd' in argv2:
# don't save ssh key password to storage
diff --git a/wally/run_test.py b/wally/run_test.py
index 9757322..0310712 100755
--- a/wally/run_test.py
+++ b/wally/run_test.py
@@ -2,6 +2,7 @@
import json
import copy
import logging
+import functools
from typing import List, Tuple, Optional, Union, cast
from cephlib.wally_storage import WallyDB
@@ -272,7 +273,7 @@
test_cls(storage=ctx.rstorage,
suite=suite,
- on_tests_boundry=lambda before_test: collect_sensors_data(ctx, False, before_test)).run()
+ on_tests_boundry=functools.partial(collect_sensors_data, ctx)).run()
@classmethod
def validate_config(cls, cfg: ConfigBlock) -> None:
diff --git a/wally/sensors.py b/wally/sensors.py
index 0aca82e..c03599f 100644
--- a/wally/sensors.py
+++ b/wally/sensors.py
@@ -87,9 +87,15 @@
logger.debug("Skip monitoring node %s, as no sensors selected", nid)
-def collect_sensors_data(ctx: TestRun,
- stop: bool = False,
- before_test: bool = False):
+def stop_sensors(ctx: TestRun):
+ for node in ctx.nodes:
+ node_id = node.node_id
+ if node_id in ctx.sensors_run_on:
+ node.conn.sensors.stop()
+
+
+def collect_sensors_data(ctx: TestRun, before_test: bool = False):
+ logger.info("Start loading sensors")
total_sz = 0
# ceph pg and pool data collected separatelly
@@ -112,19 +118,15 @@
ctime = int(time.time())
if not before_test:
- logger.info("Start loading sensors")
for node in ctx.nodes:
node_id = node.node_id
if node_id in ctx.sensors_run_on:
- func = node.conn.sensors.stop if stop else node.conn.sensors.get_updates
-
- # hack to calculate total transferred size
- offset_map, compressed_blob, compressed_collected_at_b = func()
- data_tpl = (offset_map, compressed_blob, compressed_collected_at_b)
+ offset_map, compressed_blob, compressed_collected_at_b = node.conn.sensors.get_updates()
total_sz += len(compressed_blob) + len(compressed_collected_at_b) + sum(map(len, offset_map)) + \
16 * len(offset_map)
+ data_tpl = (offset_map, compressed_blob, compressed_collected_at_b)
for path, value, is_array, units in sensors_rpc_plugin.unpack_rpc_updates(data_tpl):
if path == 'collected_at':
ds = DataSource(node_id=node_id, metric='collected_at', tag='csv')
@@ -141,10 +143,10 @@
else:
assert metric == 'perf_dump'
tag = 'txt'
- ctx.storage.put_raw(value, WallyDB.ceph_metric(node_id=node_id,
- metric=metric,
- time=ctime,
- tag=tag))
+ ctx.storage.put_raw(value, WallyDB.ceph_metric.format(node_id=node_id,
+ metric=metric,
+ time=ctime,
+ tag=tag))
if future:
pgs_info, pools_info = future.result()
@@ -159,11 +161,17 @@
logger.info("Download %sB of sensors data", b2ssize(total_sz))
-
class CollectSensorsStage(Stage):
priority = StepOrder.COLLECT_SENSORS
config_block = 'sensors'
def run(self, ctx: TestRun) -> None:
- collect_sensors_data(ctx, True, False)
+ collect_sensors_data(ctx, False)
+
+class StopSensorsStage(Stage):
+ priority = StepOrder.STOP_SENSORS
+ config_block = 'sensors'
+
+ def run(self, ctx: TestRun) -> None:
+ stop_sensors(ctx)
diff --git a/wally/stage.py b/wally/stage.py
index 92cd557..f81be8f 100644
--- a/wally/stage.py
+++ b/wally/stage.py
@@ -13,7 +13,8 @@
START_SENSORS = 40
TEST = 50
COLLECT_SENSORS = 60
- REPORT = 70
+ STOP_SENSORS = 70
+ REPORT = 80
class Stage(metaclass=abc.ABCMeta):
diff --git a/wally/suits/io/one_step.cfg b/wally/suits/io/one_step.cfg
index 3e08c8b..507cb9b 100644
--- a/wally/suits/io/one_step.cfg
+++ b/wally/suits/io/one_step.cfg
@@ -5,5 +5,5 @@
[test_{TEST_SUMM}]
blocksize=60k
-rw=randread
+rw=randwrite
iodepth=1
\ No newline at end of file
diff --git a/wally/suits/io/rrd_raw.cfg b/wally/suits/io/rrd_raw.cfg
index e7ca82d..935b100 100644
--- a/wally/suits/io/rrd_raw.cfg
+++ b/wally/suits/io/rrd_raw.cfg
@@ -1,6 +1,6 @@
[test]
-blocksize=4m
-rw=write
+blocksize=4k
+rw=randwrite
iodepth=1
ramp_time=0
runtime=120
@@ -17,8 +17,8 @@
wait_for_previous=1
per_job_logs=0
randrepeat=0
-filename=/media/data/test.db
-size=50G
+filename=/dev/rbd0
+size=1G
;verify_pattern=0x00
buffer_compress_percentage=99
write_bw_log=/tmp/bw.non-compress.log