koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 1 | from __future__ import print_function |
| 2 | |
gstepanov | 023c1e4 | 2015-04-08 15:50:19 +0300 | [diff] [blame] | 3 | import os |
koder aka kdanilov | 7acd6bd | 2015-02-12 14:28:30 -0800 | [diff] [blame] | 4 | import sys |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 5 | import Queue |
koder aka kdanilov | 7acd6bd | 2015-02-12 14:28:30 -0800 | [diff] [blame] | 6 | import pprint |
koder aka kdanilov | e21d747 | 2015-02-14 19:02:04 -0800 | [diff] [blame] | 7 | import logging |
koder aka kdanilov | 7acd6bd | 2015-02-12 14:28:30 -0800 | [diff] [blame] | 8 | import argparse |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 9 | import functools |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 10 | import threading |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 11 | import contextlib |
koder aka kdanilov | 7306c64 | 2015-04-23 15:29:45 +0300 | [diff] [blame] | 12 | import subprocess |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 13 | import collections |
koder aka kdanilov | 7acd6bd | 2015-02-12 14:28:30 -0800 | [diff] [blame] | 14 | |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 15 | import yaml |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 16 | from concurrent.futures import ThreadPoolExecutor |
koder aka kdanilov | 6c49106 | 2015-04-09 22:33:13 +0300 | [diff] [blame] | 17 | |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 18 | from wally import pretty_yaml |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 19 | from wally.sensors_utils import deploy_sensors_stage |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 20 | from wally.discover import discover, Node, undiscover |
| 21 | from wally import utils, report, ssh_utils, start_vms |
| 22 | from wally.suits.itest import IOPerfTest, PgBenchTest |
| 23 | from wally.config import cfg_dict, load_config, setup_loggers |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 24 | |
| 25 | |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 26 | logger = logging.getLogger("wally") |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 27 | |
koder aka kdanilov | 7acd6bd | 2015-02-12 14:28:30 -0800 | [diff] [blame] | 28 | |
Yulia Portnova | 7ddfa73 | 2015-02-24 17:32:58 +0200 | [diff] [blame] | 29 | def format_result(res, formatter): |
koder aka kdanilov | e21d747 | 2015-02-14 19:02:04 -0800 | [diff] [blame] | 30 | data = "\n{0}\n".format("=" * 80) |
| 31 | data += pprint.pformat(res) + "\n" |
| 32 | data += "{0}\n".format("=" * 80) |
koder aka kdanilov | fe05662 | 2015-02-19 08:46:15 -0800 | [diff] [blame] | 33 | templ = "{0}\n\n====> {1}\n\n{2}\n\n" |
Yulia Portnova | 7ddfa73 | 2015-02-24 17:32:58 +0200 | [diff] [blame] | 34 | return templ.format(data, formatter(res), "=" * 80) |
koder aka kdanilov | e21d747 | 2015-02-14 19:02:04 -0800 | [diff] [blame] | 35 | |
| 36 | |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 37 | class Context(object): |
| 38 | def __init__(self): |
| 39 | self.build_meta = {} |
| 40 | self.nodes = [] |
| 41 | self.clear_calls_stack = [] |
| 42 | self.openstack_nodes_ids = [] |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 43 | self.sensors_mon_q = None |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 44 | |
| 45 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 46 | def connect_one(node, vm=False): |
koder aka kdanilov | 0c598a1 | 2015-04-21 03:01:40 +0300 | [diff] [blame] | 47 | if node.conn_url == 'local': |
| 48 | node.connection = ssh_utils.connect(node.conn_url) |
| 49 | return |
| 50 | |
koder aka kdanilov | 5d589b4 | 2015-03-26 12:25:51 +0200 | [diff] [blame] | 51 | try: |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 52 | ssh_pref = "ssh://" |
| 53 | if node.conn_url.startswith(ssh_pref): |
| 54 | url = node.conn_url[len(ssh_pref):] |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 55 | |
| 56 | if vm: |
koder aka kdanilov | 6b1341a | 2015-04-21 22:44:21 +0300 | [diff] [blame] | 57 | conn_timeout = 240 |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 58 | else: |
koder aka kdanilov | 6b1341a | 2015-04-21 22:44:21 +0300 | [diff] [blame] | 59 | conn_timeout = 30 |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 60 | |
| 61 | node.connection = ssh_utils.connect(url, |
koder aka kdanilov | 6b1341a | 2015-04-21 22:44:21 +0300 | [diff] [blame] | 62 | conn_timeout=conn_timeout) |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 63 | else: |
| 64 | raise ValueError("Unknown url type {0}".format(node.conn_url)) |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 65 | except Exception as exc: |
| 66 | # logger.exception("During connect to " + node.get_conn_id()) |
koder aka kdanilov | ec1b973 | 2015-04-23 20:43:29 +0300 | [diff] [blame] | 67 | msg = "During connect to {0}: {1!s}".format(node.get_conn_id(), |
| 68 | exc) |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 69 | logger.error(msg) |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 70 | node.connection = None |
koder aka kdanilov | 5d589b4 | 2015-03-26 12:25:51 +0200 | [diff] [blame] | 71 | |
| 72 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 73 | def connect_all(nodes, vm=False): |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 74 | logger.info("Connecting to nodes") |
| 75 | with ThreadPoolExecutor(32) as pool: |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 76 | connect_one_f = functools.partial(connect_one, vm=vm) |
| 77 | list(pool.map(connect_one_f, nodes)) |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 78 | |
| 79 | |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 80 | def test_thread(test, node, barrier, res_q): |
koder aka kdanilov | 4d4771c | 2015-04-23 01:32:02 +0300 | [diff] [blame] | 81 | exc = None |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 82 | try: |
koder aka kdanilov | a047e1b | 2015-04-21 23:16:59 +0300 | [diff] [blame] | 83 | logger.debug("Run preparation for {0}".format(node.get_conn_id())) |
koder aka kdanilov | 4d4771c | 2015-04-23 01:32:02 +0300 | [diff] [blame] | 84 | test.pre_run() |
koder aka kdanilov | a047e1b | 2015-04-21 23:16:59 +0300 | [diff] [blame] | 85 | logger.debug("Run test for {0}".format(node.get_conn_id())) |
koder aka kdanilov | 4d4771c | 2015-04-23 01:32:02 +0300 | [diff] [blame] | 86 | test.run(barrier) |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 87 | except Exception as exc: |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 88 | logger.exception("In test {0} for node {1}".format(test, node)) |
| 89 | |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 90 | try: |
koder aka kdanilov | 4d4771c | 2015-04-23 01:32:02 +0300 | [diff] [blame] | 91 | test.cleanup() |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 92 | except: |
| 93 | msg = "Duringf cleanup - in test {0} for node {1}" |
| 94 | logger.exception(msg.format(test, node)) |
| 95 | |
koder aka kdanilov | 4d4771c | 2015-04-23 01:32:02 +0300 | [diff] [blame] | 96 | if exc is not None: |
| 97 | res_q.put(exc) |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 98 | |
koder aka kdanilov | 4d4771c | 2015-04-23 01:32:02 +0300 | [diff] [blame] | 99 | |
koder aka kdanilov | 2066daf | 2015-04-23 21:05:41 +0300 | [diff] [blame] | 100 | def run_tests(cfg, test_block, nodes): |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 101 | tool_type_mapper = { |
| 102 | "io": IOPerfTest, |
| 103 | "pgbench": PgBenchTest, |
| 104 | } |
| 105 | |
| 106 | test_nodes = [node for node in nodes |
| 107 | if 'testnode' in node.roles] |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 108 | test_number_per_type = {} |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 109 | res_q = Queue.Queue() |
| 110 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 111 | for name, params in test_block.items(): |
| 112 | logger.info("Starting {0} tests".format(name)) |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 113 | test_num = test_number_per_type.get(name, 0) |
| 114 | test_number_per_type[name] = test_num + 1 |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 115 | threads = [] |
| 116 | barrier = utils.Barrier(len(test_nodes)) |
koder aka kdanilov | ec1b973 | 2015-04-23 20:43:29 +0300 | [diff] [blame] | 117 | coord_q = Queue.Queue() |
| 118 | test_cls = tool_type_mapper[name] |
koder aka kdanilov | 2066daf | 2015-04-23 21:05:41 +0300 | [diff] [blame] | 119 | rem_folder = cfg['default_test_local_folder'].format(name=name) |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 120 | |
koder aka kdanilov | abd6ead | 2015-04-24 02:03:07 +0300 | [diff] [blame^] | 121 | for idx, node in enumerate(test_nodes): |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 122 | msg = "Starting {0} test on {1} node" |
| 123 | logger.debug(msg.format(name, node.conn_url)) |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 124 | |
| 125 | dr = os.path.join( |
| 126 | cfg_dict['test_log_directory'], |
| 127 | "{0}_{1}_{2}".format(name, test_num, node.get_ip()) |
| 128 | ) |
| 129 | |
| 130 | if not os.path.exists(dr): |
| 131 | os.makedirs(dr) |
| 132 | |
koder aka kdanilov | abd6ead | 2015-04-24 02:03:07 +0300 | [diff] [blame^] | 133 | test = test_cls(options=params, |
| 134 | is_primary=(idx == 0), |
| 135 | on_result_cb=res_q.put, |
| 136 | test_uuid=cfg['run_uuid'], |
| 137 | node=node, |
koder aka kdanilov | 2066daf | 2015-04-23 21:05:41 +0300 | [diff] [blame] | 138 | remote_dir=rem_folder, |
koder aka kdanilov | ec1b973 | 2015-04-23 20:43:29 +0300 | [diff] [blame] | 139 | log_directory=dr, |
| 140 | coordination_queue=coord_q) |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 141 | th = threading.Thread(None, test_thread, None, |
| 142 | (test, node, barrier, res_q)) |
| 143 | threads.append(th) |
| 144 | th.daemon = True |
| 145 | th.start() |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 146 | |
koder aka kdanilov | ec1b973 | 2015-04-23 20:43:29 +0300 | [diff] [blame] | 147 | th = threading.Thread(None, test_cls.coordination_th, None, |
| 148 | (coord_q, barrier, len(threads))) |
| 149 | threads.append(th) |
| 150 | th.daemon = True |
| 151 | th.start() |
| 152 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 153 | def gather_results(res_q, results): |
| 154 | while not res_q.empty(): |
| 155 | val = res_q.get() |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 156 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 157 | if isinstance(val, Exception): |
koder aka kdanilov | ec1b973 | 2015-04-23 20:43:29 +0300 | [diff] [blame] | 158 | msg = "Exception during test execution: {0!s}" |
| 159 | raise ValueError(msg.format(val)) |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 160 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 161 | results.append(val) |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 162 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 163 | results = [] |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 164 | |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 165 | # MAX_WAIT_TIME = 10 |
| 166 | # end_time = time.time() + MAX_WAIT_TIME |
| 167 | |
| 168 | # while time.time() < end_time: |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 169 | while True: |
| 170 | for th in threads: |
| 171 | th.join(1) |
| 172 | gather_results(res_q, results) |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 173 | # if time.time() > end_time: |
| 174 | # break |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 175 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 176 | if all(not th.is_alive() for th in threads): |
| 177 | break |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 178 | |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 179 | # if any(th.is_alive() for th in threads): |
| 180 | # logger.warning("Some test threads still running") |
| 181 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 182 | gather_results(res_q, results) |
| 183 | yield name, test.merge_results(results) |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 184 | |
| 185 | |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 186 | def log_nodes_statistic(_, ctx): |
| 187 | nodes = ctx.nodes |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 188 | logger.info("Found {0} nodes total".format(len(nodes))) |
| 189 | per_role = collections.defaultdict(lambda: 0) |
| 190 | for node in nodes: |
| 191 | for role in node.roles: |
| 192 | per_role[role] += 1 |
| 193 | |
| 194 | for role, count in sorted(per_role.items()): |
| 195 | logger.debug("Found {0} nodes with role {1}".format(count, role)) |
| 196 | |
| 197 | |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 198 | def connect_stage(cfg, ctx): |
| 199 | ctx.clear_calls_stack.append(disconnect_stage) |
| 200 | connect_all(ctx.nodes) |
| 201 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 202 | all_ok = True |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 203 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 204 | for node in ctx.nodes: |
| 205 | if node.connection is None: |
| 206 | if 'testnode' in node.roles: |
| 207 | msg = "Can't connect to testnode {0}" |
| 208 | raise RuntimeError(msg.format(node.get_conn_id())) |
| 209 | else: |
| 210 | msg = "Node {0} would be excluded - can't connect" |
| 211 | logger.warning(msg.format(node.get_conn_id())) |
| 212 | all_ok = False |
| 213 | |
| 214 | if all_ok: |
| 215 | logger.info("All nodes connected successfully") |
| 216 | |
| 217 | ctx.nodes = [node for node in ctx.nodes |
| 218 | if node.connection is not None] |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 219 | |
| 220 | |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 221 | def discover_stage(cfg, ctx): |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 222 | if cfg.get('discover') is not None: |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 223 | discover_objs = [i.strip() for i in cfg['discover'].strip().split(",")] |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 224 | |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 225 | nodes, clean_data = discover(ctx, |
| 226 | discover_objs, |
| 227 | cfg['clouds'], |
| 228 | cfg['var_dir'], |
| 229 | not cfg['dont_discover_nodes']) |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 230 | |
| 231 | def undiscover_stage(cfg, ctx): |
| 232 | undiscover(clean_data) |
| 233 | |
| 234 | ctx.clear_calls_stack.append(undiscover_stage) |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 235 | ctx.nodes.extend(nodes) |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 236 | |
| 237 | for url, roles in cfg.get('explicit_nodes', {}).items(): |
| 238 | ctx.nodes.append(Node(url, roles.split(","))) |
| 239 | |
| 240 | |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 241 | def get_OS_credentials(cfg, ctx, creds_type): |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 242 | creds = None |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 243 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 244 | if creds_type == 'clouds': |
| 245 | if 'openstack' in cfg['clouds']: |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 246 | os_cfg = cfg['clouds']['openstack'] |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 247 | |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 248 | tenant = os_cfg['OS_TENANT_NAME'].strip() |
| 249 | user = os_cfg['OS_USERNAME'].strip() |
| 250 | passwd = os_cfg['OS_PASSWORD'].strip() |
| 251 | auth_url = os_cfg['OS_AUTH_URL'].strip() |
| 252 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 253 | elif 'fuel' in cfg['clouds'] and \ |
| 254 | 'openstack_env' in cfg['clouds']['fuel']: |
| 255 | creds = ctx.fuel_openstack_creds |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 256 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 257 | elif creds_type == 'ENV': |
| 258 | user, passwd, tenant, auth_url = start_vms.ostack_get_creds() |
| 259 | elif os.path.isfile(creds_type): |
koder aka kdanilov | 7306c64 | 2015-04-23 15:29:45 +0300 | [diff] [blame] | 260 | fc = open(creds_type).read() |
| 261 | |
| 262 | echo = 'echo "$OS_TENANT_NAME:$OS_USERNAME:$OS_PASSWORD@$OS_AUTH_URL"' |
| 263 | |
| 264 | p = subprocess.Popen(['/bin/bash'], shell=False, |
| 265 | stdout=subprocess.PIPE, |
| 266 | stdin=subprocess.PIPE, |
| 267 | stderr=subprocess.STDOUT) |
| 268 | p.stdin.write(fc + "\n" + echo) |
| 269 | p.stdin.close() |
| 270 | code = p.wait() |
| 271 | data = p.stdout.read().strip() |
| 272 | |
| 273 | if code != 0: |
| 274 | msg = "Failed to get creads from openrc file: " + data |
| 275 | logger.error(msg) |
| 276 | raise RuntimeError(msg) |
| 277 | |
| 278 | try: |
| 279 | user, tenant, passwd_auth_url = data.split(':', 2) |
| 280 | passwd, auth_url = passwd_auth_url.rsplit("@", 1) |
| 281 | assert (auth_url.startswith("https://") or |
| 282 | auth_url.startswith("http://")) |
| 283 | except Exception: |
| 284 | msg = "Failed to get creads from openrc file: " + data |
| 285 | logger.exception(msg) |
| 286 | raise |
| 287 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 288 | else: |
| 289 | msg = "Creds {0!r} isn't supported".format(creds_type) |
| 290 | raise ValueError(msg) |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 291 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 292 | if creds is None: |
| 293 | creds = {'name': user, |
| 294 | 'passwd': passwd, |
| 295 | 'tenant': tenant, |
| 296 | 'auth_url': auth_url} |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 297 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 298 | return creds |
koder aka kdanilov | 4e9f3ed | 2015-04-14 11:26:12 +0300 | [diff] [blame] | 299 | |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 300 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 301 | @contextlib.contextmanager |
| 302 | def create_vms_ctx(ctx, cfg, config): |
| 303 | params = config['vm_params'].copy() |
| 304 | os_nodes_ids = [] |
| 305 | |
| 306 | os_creds_type = config['creds'] |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 307 | os_creds = get_OS_credentials(cfg, ctx, os_creds_type) |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 308 | |
| 309 | start_vms.nova_connect(**os_creds) |
| 310 | |
| 311 | logger.info("Preparing openstack") |
| 312 | start_vms.prepare_os_subpr(**os_creds) |
| 313 | |
| 314 | new_nodes = [] |
| 315 | try: |
| 316 | params['group_name'] = cfg_dict['run_uuid'] |
| 317 | for new_node, node_id in start_vms.launch_vms(params): |
| 318 | new_node.roles.append('testnode') |
| 319 | ctx.nodes.append(new_node) |
| 320 | os_nodes_ids.append(node_id) |
| 321 | new_nodes.append(new_node) |
| 322 | |
| 323 | store_nodes_in_log(cfg, os_nodes_ids) |
| 324 | ctx.openstack_nodes_ids = os_nodes_ids |
| 325 | |
| 326 | yield new_nodes |
| 327 | |
| 328 | finally: |
| 329 | if not cfg['keep_vm']: |
| 330 | shut_down_vms_stage(cfg, ctx) |
| 331 | |
| 332 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 333 | def run_tests_stage(cfg, ctx): |
| 334 | ctx.results = [] |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 335 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 336 | if 'tests' not in cfg: |
| 337 | return |
gstepanov | 023c1e4 | 2015-04-08 15:50:19 +0300 | [diff] [blame] | 338 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 339 | for group in cfg['tests']: |
| 340 | |
| 341 | assert len(group.items()) == 1 |
| 342 | key, config = group.items()[0] |
| 343 | |
| 344 | if 'start_test_nodes' == key: |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 345 | with create_vms_ctx(ctx, cfg, config) as new_nodes: |
| 346 | connect_all(new_nodes, True) |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 347 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 348 | for node in new_nodes: |
| 349 | if node.connection is None: |
| 350 | msg = "Failed to connect to vm {0}" |
| 351 | raise RuntimeError(msg.format(node.get_conn_id())) |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 352 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 353 | deploy_sensors_stage(cfg_dict, |
| 354 | ctx, |
| 355 | nodes=new_nodes, |
| 356 | undeploy=False) |
koder aka kdanilov | 12ae063 | 2015-04-15 01:13:43 +0300 | [diff] [blame] | 357 | |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 358 | if not cfg['no_tests']: |
| 359 | for test_group in config.get('tests', []): |
koder aka kdanilov | 2066daf | 2015-04-23 21:05:41 +0300 | [diff] [blame] | 360 | test_res = run_tests(cfg, test_group, ctx.nodes) |
koder aka kdanilov | 4d4771c | 2015-04-23 01:32:02 +0300 | [diff] [blame] | 361 | ctx.results.extend(test_res) |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 362 | else: |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 363 | if not cfg['no_tests']: |
koder aka kdanilov | 2066daf | 2015-04-23 21:05:41 +0300 | [diff] [blame] | 364 | test_res = run_tests(cfg, group, ctx.nodes) |
koder aka kdanilov | 4d4771c | 2015-04-23 01:32:02 +0300 | [diff] [blame] | 365 | ctx.results.extend(test_res) |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 366 | |
gstepanov | 023c1e4 | 2015-04-08 15:50:19 +0300 | [diff] [blame] | 367 | |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 368 | def shut_down_vms_stage(cfg, ctx): |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 369 | vm_ids_fname = cfg_dict['vm_ids_fname'] |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 370 | if ctx.openstack_nodes_ids is None: |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 371 | nodes_ids = open(vm_ids_fname).read().split() |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 372 | else: |
| 373 | nodes_ids = ctx.openstack_nodes_ids |
| 374 | |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 375 | if len(nodes_ids) != 0: |
| 376 | logger.info("Removing nodes") |
| 377 | start_vms.clear_nodes(nodes_ids) |
| 378 | logger.info("Nodes has been removed") |
gstepanov | 023c1e4 | 2015-04-08 15:50:19 +0300 | [diff] [blame] | 379 | |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 380 | if os.path.exists(vm_ids_fname): |
| 381 | os.remove(vm_ids_fname) |
gstepanov | 023c1e4 | 2015-04-08 15:50:19 +0300 | [diff] [blame] | 382 | |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 383 | |
| 384 | def store_nodes_in_log(cfg, nodes_ids): |
| 385 | with open(cfg['vm_ids_fname'], 'w') as fd: |
| 386 | fd.write("\n".join(nodes_ids)) |
gstepanov | 023c1e4 | 2015-04-08 15:50:19 +0300 | [diff] [blame] | 387 | |
| 388 | |
| 389 | def clear_enviroment(cfg, ctx): |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 390 | if os.path.exists(cfg_dict['vm_ids_fname']): |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 391 | shut_down_vms_stage(cfg, ctx) |
gstepanov | 023c1e4 | 2015-04-08 15:50:19 +0300 | [diff] [blame] | 392 | |
| 393 | |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 394 | def disconnect_stage(cfg, ctx): |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 395 | ssh_utils.close_all_sessions() |
| 396 | |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 397 | for node in ctx.nodes: |
| 398 | if node.connection is not None: |
| 399 | node.connection.close() |
| 400 | |
| 401 | |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 402 | def store_raw_results_stage(cfg, ctx): |
| 403 | |
| 404 | raw_results = os.path.join(cfg_dict['var_dir'], 'raw_results.yaml') |
| 405 | |
| 406 | if os.path.exists(raw_results): |
| 407 | cont = yaml.load(open(raw_results).read()) |
| 408 | else: |
| 409 | cont = [] |
| 410 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 411 | cont.extend(utils.yamable(ctx.results)) |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 412 | raw_data = pretty_yaml.dumps(cont) |
| 413 | |
| 414 | with open(raw_results, "w") as fd: |
| 415 | fd.write(raw_data) |
| 416 | |
| 417 | |
| 418 | def console_report_stage(cfg, ctx): |
| 419 | for tp, data in ctx.results: |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 420 | if 'io' == tp and data is not None: |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 421 | print("\n") |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 422 | print(IOPerfTest.format_for_console(data)) |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 423 | print("\n") |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 424 | |
| 425 | |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 426 | def html_report_stage(cfg, ctx): |
Yulia Portnova | 8ca2057 | 2015-04-14 14:09:39 +0300 | [diff] [blame] | 427 | html_rep_fname = cfg['html_report_file'] |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 428 | |
| 429 | try: |
| 430 | fuel_url = cfg['clouds']['fuel']['url'] |
| 431 | except KeyError: |
| 432 | fuel_url = None |
| 433 | |
| 434 | try: |
| 435 | creds = cfg['clouds']['fuel']['creds'] |
| 436 | except KeyError: |
| 437 | creds = None |
| 438 | |
gstepanov | 69339ac | 2015-04-16 20:09:33 +0300 | [diff] [blame] | 439 | report.make_io_report(ctx.results, html_rep_fname, fuel_url, creds=creds) |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 440 | |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 441 | text_rep_fname = cfg_dict['text_report_file'] |
| 442 | with open(text_rep_fname, "w") as fd: |
| 443 | for tp, data in ctx.results: |
koder aka kdanilov | 4500a5f | 2015-04-17 16:55:17 +0300 | [diff] [blame] | 444 | if 'io' == tp and data is not None: |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 445 | fd.write(IOPerfTest.format_for_console(data)) |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 446 | fd.write("\n") |
| 447 | fd.flush() |
| 448 | |
| 449 | logger.info("Text report were stored in " + text_rep_fname) |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 450 | |
| 451 | |
| 452 | def complete_log_nodes_statistic(cfg, ctx): |
| 453 | nodes = ctx.nodes |
| 454 | for node in nodes: |
| 455 | logger.debug(str(node)) |
| 456 | |
| 457 | |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 458 | def load_data_from(var_dir): |
koder aka kdanilov | 4e9f3ed | 2015-04-14 11:26:12 +0300 | [diff] [blame] | 459 | def load_data_from_file(cfg, ctx): |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 460 | raw_results = os.path.join(var_dir, 'raw_results.yaml') |
| 461 | ctx.results = yaml.load(open(raw_results).read()) |
koder aka kdanilov | 4e9f3ed | 2015-04-14 11:26:12 +0300 | [diff] [blame] | 462 | return load_data_from_file |
gstepanov | cd256d6 | 2015-04-07 17:47:32 +0300 | [diff] [blame] | 463 | |
| 464 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 465 | def parse_args(argv): |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 466 | descr = "Disk io performance test suite" |
| 467 | parser = argparse.ArgumentParser(prog='wally', description=descr) |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 468 | |
| 469 | parser.add_argument("-l", dest='extra_logs', |
| 470 | action='store_true', default=False, |
| 471 | help="print some extra log info") |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 472 | parser.add_argument("-b", '--build_description', |
| 473 | type=str, default="Build info") |
| 474 | parser.add_argument("-i", '--build_id', type=str, default="id") |
| 475 | parser.add_argument("-t", '--build_type', type=str, default="GA") |
| 476 | parser.add_argument("-u", '--username', type=str, default="admin") |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 477 | parser.add_argument("-n", '--no-tests', action='store_true', |
| 478 | help="Don't run tests", default=False) |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 479 | parser.add_argument("-p", '--post-process-only', metavar="VAR_DIR", |
| 480 | help="Only process data from previour run") |
| 481 | parser.add_argument("-k", '--keep-vm', action='store_true', |
| 482 | help="Don't remove test vm's", default=False) |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 483 | parser.add_argument("-d", '--dont-discover-nodes', action='store_true', |
| 484 | help="Don't connect/discover fuel nodes", |
| 485 | default=False) |
koder aka kdanilov | a047e1b | 2015-04-21 23:16:59 +0300 | [diff] [blame] | 486 | parser.add_argument("-r", '--no-html-report', action='store_true', |
| 487 | help="Skip html report", default=False) |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 488 | parser.add_argument("config_file") |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 489 | |
| 490 | return parser.parse_args(argv[1:]) |
| 491 | |
| 492 | |
koder aka kdanilov | 3f35626 | 2015-02-13 08:06:14 -0800 | [diff] [blame] | 493 | def main(argv): |
koder aka kdanilov | e06762a | 2015-03-22 23:32:09 +0200 | [diff] [blame] | 494 | opts = parse_args(argv) |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 495 | |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 496 | if opts.post_process_only is not None: |
| 497 | stages = [ |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 498 | load_data_from(opts.post_process_only) |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 499 | ] |
| 500 | else: |
| 501 | stages = [ |
| 502 | discover_stage, |
| 503 | log_nodes_statistic, |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 504 | connect_stage, |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 505 | deploy_sensors_stage, |
| 506 | run_tests_stage, |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 507 | store_raw_results_stage |
koder aka kdanilov | 66839a9 | 2015-04-11 13:22:31 +0300 | [diff] [blame] | 508 | ] |
| 509 | |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 510 | report_stages = [ |
| 511 | console_report_stage, |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 512 | ] |
| 513 | |
koder aka kdanilov | a047e1b | 2015-04-21 23:16:59 +0300 | [diff] [blame] | 514 | if not opts.no_html_report: |
| 515 | report_stages.append(html_report_stage) |
| 516 | |
koder aka kdanilov | cee4334 | 2015-04-14 22:52:53 +0300 | [diff] [blame] | 517 | load_config(opts.config_file, opts.post_process_only) |
koder aka kdanilov | f4b82c2 | 2015-04-11 13:35:25 +0300 | [diff] [blame] | 518 | |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 519 | if cfg_dict.get('logging', {}).get("extra_logs", False) or opts.extra_logs: |
| 520 | level = logging.DEBUG |
| 521 | else: |
| 522 | level = logging.WARNING |
| 523 | |
| 524 | setup_loggers(level, cfg_dict['log_file']) |
koder aka kdanilov | f4b82c2 | 2015-04-11 13:35:25 +0300 | [diff] [blame] | 525 | |
koder aka kdanilov | 652cd80 | 2015-04-13 12:21:07 +0300 | [diff] [blame] | 526 | logger.info("All info would be stored into {0}".format( |
| 527 | cfg_dict['var_dir'])) |
gstepanov | cd256d6 | 2015-04-07 17:47:32 +0300 | [diff] [blame] | 528 | |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 529 | ctx = Context() |
gstepanov | affcdb1 | 2015-04-07 17:18:29 +0300 | [diff] [blame] | 530 | ctx.build_meta['build_id'] = opts.build_id |
| 531 | ctx.build_meta['build_descrption'] = opts.build_description |
| 532 | ctx.build_meta['build_type'] = opts.build_type |
| 533 | ctx.build_meta['username'] = opts.username |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 534 | |
koder aka kdanilov | 168f609 | 2015-04-19 02:33:38 +0300 | [diff] [blame] | 535 | cfg_dict['keep_vm'] = opts.keep_vm |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 536 | cfg_dict['no_tests'] = opts.no_tests |
| 537 | cfg_dict['dont_discover_nodes'] = opts.dont_discover_nodes |
koder aka kdanilov | 6c49106 | 2015-04-09 22:33:13 +0300 | [diff] [blame] | 538 | |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 539 | try: |
| 540 | for stage in stages: |
| 541 | logger.info("Start {0.__name__} stage".format(stage)) |
| 542 | stage(cfg_dict, ctx) |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 543 | except Exception as exc: |
koder aka kdanilov | ec1b973 | 2015-04-23 20:43:29 +0300 | [diff] [blame] | 544 | msg = "Exception during {0.__name__}: {1!s}".format(stage, exc) |
koder aka kdanilov | cff7b2e | 2015-04-18 20:48:15 +0300 | [diff] [blame] | 545 | logger.error(msg) |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 546 | finally: |
| 547 | exc, cls, tb = sys.exc_info() |
| 548 | for stage in ctx.clear_calls_stack[::-1]: |
| 549 | try: |
| 550 | logger.info("Start {0.__name__} stage".format(stage)) |
| 551 | stage(cfg_dict, ctx) |
koder aka kdanilov | 1c2b511 | 2015-04-10 16:53:51 +0300 | [diff] [blame] | 552 | except Exception as exc: |
| 553 | logger.exception("During {0.__name__} stage".format(stage)) |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 554 | |
koder aka kdanilov | da45e88 | 2015-04-06 02:24:42 +0300 | [diff] [blame] | 555 | if exc is not None: |
| 556 | raise exc, cls, tb |
koder aka kdanilov | 2c47309 | 2015-03-29 17:12:13 +0300 | [diff] [blame] | 557 | |
koder aka kdanilov | e87ae65 | 2015-04-20 02:14:35 +0300 | [diff] [blame] | 558 | for report_stage in report_stages: |
| 559 | report_stage(cfg_dict, ctx) |
| 560 | |
| 561 | logger.info("All info stored in {0} folder".format(cfg_dict['var_dir'])) |
koder aka kdanilov | e06762a | 2015-03-22 23:32:09 +0200 | [diff] [blame] | 562 | return 0 |