Add copyright info to all python files and bump version
Related-PROD: PROD-36846
Change-Id: I47c25d81d4173286e1729cef7a1cc321a495316f
diff --git a/cfg_checker/agent/cfg_agent.py b/cfg_checker/agent/cfg_agent.py
index 5619fea..814d671 100644
--- a/cfg_checker/agent/cfg_agent.py
+++ b/cfg_checker/agent/cfg_agent.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from .webserver import agent_server
diff --git a/cfg_checker/agent/fio_runner.py b/cfg_checker/agent/fio_runner.py
index db012ac..f47566b 100644
--- a/cfg_checker/agent/fio_runner.py
+++ b/cfg_checker/agent/fio_runner.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import json
import os
import queue
diff --git a/cfg_checker/agent/webserver.py b/cfg_checker/agent/webserver.py
index 7f7e53a..ee72a42 100644
--- a/cfg_checker/agent/webserver.py
+++ b/cfg_checker/agent/webserver.py
@@ -1,4 +1,5 @@
-# author: Alex Savatieiev (osavatieiev@mirantis.com)
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from gevent import monkey, pywsgi
monkey.patch_all()
import falcon # noqa E402
diff --git a/cfg_checker/cfg_check.py b/cfg_checker/cfg_check.py
index 403483e..99f8dbe 100644
--- a/cfg_checker/cfg_check.py
+++ b/cfg_checker/cfg_check.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
import sys
from logging import DEBUG, INFO
diff --git a/cfg_checker/cli/arguments.py b/cfg_checker/cli/arguments.py
index 28f3a04..387ed59 100644
--- a/cfg_checker/cli/arguments.py
+++ b/cfg_checker/cli/arguments.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
from cfg_checker.common.settings import pkg_dir
diff --git a/cfg_checker/cli/command.py b/cfg_checker/cli/command.py
index 566a498..778cdb1 100644
--- a/cfg_checker/cli/command.py
+++ b/cfg_checker/cli/command.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import pkgutil
import sys
import traceback
diff --git a/cfg_checker/cli/network.py b/cfg_checker/cli/network.py
index 6d3059e..deb8f26 100644
--- a/cfg_checker/cli/network.py
+++ b/cfg_checker/cli/network.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from .command import cli_command
diff --git a/cfg_checker/cli/packages.py b/cfg_checker/cli/packages.py
index b1319a1..ea05a8c 100644
--- a/cfg_checker/cli/packages.py
+++ b/cfg_checker/cli/packages.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from .command import cli_command
diff --git a/cfg_checker/cli/reclass.py b/cfg_checker/cli/reclass.py
index 652f00a..1bc0d66 100644
--- a/cfg_checker/cli/reclass.py
+++ b/cfg_checker/cli/reclass.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from .command import cli_command
diff --git a/cfg_checker/clients/__init__.py b/cfg_checker/clients/__init__.py
index 5d3a48d..337821b 100644
--- a/cfg_checker/clients/__init__.py
+++ b/cfg_checker/clients/__init__.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from cfg_checker.common import logger
from cfg_checker.common.salt_utils import SaltRemote
from cfg_checker.common.kube_utils import KubeRemote
diff --git a/cfg_checker/common/__init__.py b/cfg_checker/common/__init__.py
index 6eecf92..badea96 100644
--- a/cfg_checker/common/__init__.py
+++ b/cfg_checker/common/__init__.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from cfg_checker.common.log import logger, logger_cli
from cfg_checker.common.other import Utils
diff --git a/cfg_checker/common/config_file.py b/cfg_checker/common/config_file.py
index 513e0ec..5f9dd55 100644
--- a/cfg_checker/common/config_file.py
+++ b/cfg_checker/common/config_file.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import configparser
import os
diff --git a/cfg_checker/common/const.py b/cfg_checker/common/const.py
index 95497ec..ac7b2ca 100644
--- a/cfg_checker/common/const.py
+++ b/cfg_checker/common/const.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
"""Constants that is not to be changed and used in all other files
"""
diff --git a/cfg_checker/common/decorators.py b/cfg_checker/common/decorators.py
index a8b6da0..1b39460 100644
--- a/cfg_checker/common/decorators.py
+++ b/cfg_checker/common/decorators.py
@@ -1,5 +1,5 @@
# Author: https://gist.github.com/FBosler/be10229aba491a8c912e3a1543bbc74e
-# Updated to fit current framework by Alex Savatieiev
+# Updated to fit current framework by Alex Savatieiev (a.savex@gmail.com)
from functools import wraps
import time
diff --git a/cfg_checker/common/exception.py b/cfg_checker/common/exception.py
index 4ee3a99..354fb16 100644
--- a/cfg_checker/common/exception.py
+++ b/cfg_checker/common/exception.py
@@ -1,4 +1,5 @@
-
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
class CheckerBaseExceptions(Exception):
pass
diff --git a/cfg_checker/common/file_utils.py b/cfg_checker/common/file_utils.py
index faf7cf0..8b1652a 100644
--- a/cfg_checker/common/file_utils.py
+++ b/cfg_checker/common/file_utils.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import atexit
import grp
import os
diff --git a/cfg_checker/common/kube_utils.py b/cfg_checker/common/kube_utils.py
index 6f303ff..195e791 100644
--- a/cfg_checker/common/kube_utils.py
+++ b/cfg_checker/common/kube_utils.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
"""
Module to handle interaction with Kube
"""
@@ -962,3 +964,68 @@
pod_object.metadata.namespace,
_svc
)
+
+ def get_pod_logs(self, podname, ns):
+ # Params
+ # read log of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
+
+ # >>> thread = api.read_namespaced_pod_log(name, namespace,
+ # async_req=True)
+ # >>> result = thread.get()
+ # :param async_req bool: execute request asynchronously
+ # :param str name: name of the Pod (required)
+ # :param str namespace: object name and auth scope, such as for teams
+ # and projects (required)
+ # :param str container: The container for which to stream logs.
+ # Defaults to only container if there is one container in
+ # the pod.
+ # :param bool follow: Follow the log stream of the pod. Defaults to
+ # false.
+ # :param bool insecure_skip_tls_verify_backend:
+ # insecureSkipTLSVerifyBackend indicates that the apiserver
+ # should not confirm the validity of the serving certificate
+ # of the backend it is connecting to. This will make the
+ # HTTPS connection between the apiserver and the backend
+ # insecure. This means the apiserver cannot verify the log
+ # data it is receiving came from the real kubelet. If the
+ # kubelet is configured to verify the apiserver's TLS
+ # credentials, it does not mean the connection to the real
+ # kubelet is vulnerable to a man in the middle attack (e.g.
+ # an attacker could not intercept the actual log data coming
+ # from the real kubelet).
+ # :param int limit_bytes: If set, the number of bytes to read from the
+ # server before terminating the log output. This may not
+ # display a complete final line of logging, and may return
+ # slightly more or slightly less than the specified limit.
+ # :param str pretty: If 'true', then the output is pretty printed.
+ # :param bool previous: Return previous terminated container logs.
+ # Defaults to false.
+ # :param int since_seconds: A relative time in seconds before the
+ # current time from which to show logs. If this value precedes
+ # the time a pod was started, only logs since the pod start will
+ # be returned. If this value is in the future, no logs will be
+ # returned. Only one of sinceSeconds or sinceTime may be
+ # specified.
+ # :param int tail_lines: If set, the number of lines from the end of
+ # the logs to show. If not specified, logs are shown from the
+ # creation of the container or sinceSeconds or sinceTime
+ # :param bool timestamps: If true, add an RFC3339 or RFC3339Nano
+ # timestamp at the beginning of every line of log output.
+ # Defaults to false.
+ # :param _preload_content: if False, the urllib3.HTTPResponse object
+ # will be returned without reading/decoding response data.
+ # Default is True.
+ # :param _request_timeout: timeout setting for this request. If one
+ # number provided, it will be total request timeout. It can
+ # also be a pair (tuple) of (connection, read) timeouts.
+ # :return: str
+ # If the method is called asynchronously, returns the request
+ # thread.
+
+ return self.CoreV1.read_namespaced_pod_log(
+ podname,
+ ns,
+ # timestamps=True,
+ tail_lines=50,
+ # pretty=True
+ )
diff --git a/cfg_checker/common/log.py b/cfg_checker/common/log.py
index 4c1c02c..d1f053c 100644
--- a/cfg_checker/common/log.py
+++ b/cfg_checker/common/log.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import logging
import os
diff --git a/cfg_checker/common/other.py b/cfg_checker/common/other.py
index b5a0406..4c3ef04 100644
--- a/cfg_checker/common/other.py
+++ b/cfg_checker/common/other.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import functools
import os
import re
diff --git a/cfg_checker/common/salt_utils.py b/cfg_checker/common/salt_utils.py
index 08f2d2b..97d806f 100644
--- a/cfg_checker/common/salt_utils.py
+++ b/cfg_checker/common/salt_utils.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
"""
Module to handle interaction with salt
"""
diff --git a/cfg_checker/common/settings.py b/cfg_checker/common/settings.py
index 7b79354..f24cc33 100644
--- a/cfg_checker/common/settings.py
+++ b/cfg_checker/common/settings.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
import json
import pwd
diff --git a/cfg_checker/common/ssh_utils.py b/cfg_checker/common/ssh_utils.py
index d500e36..7ab2ea5 100644
--- a/cfg_checker/common/ssh_utils.py
+++ b/cfg_checker/common/ssh_utils.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import queue
import subprocess
import traceback
diff --git a/cfg_checker/helpers/args_utils.py b/cfg_checker/helpers/args_utils.py
index 0804617..dc1f391 100644
--- a/cfg_checker/helpers/args_utils.py
+++ b/cfg_checker/helpers/args_utils.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import argparse
import os
import sys
diff --git a/cfg_checker/helpers/console_utils.py b/cfg_checker/helpers/console_utils.py
index 0cfdecf..fa770a3 100644
--- a/cfg_checker/helpers/console_utils.py
+++ b/cfg_checker/helpers/console_utils.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import sys
diff --git a/cfg_checker/helpers/errors.py b/cfg_checker/helpers/errors.py
index 27ed242..6a0c97b 100644
--- a/cfg_checker/helpers/errors.py
+++ b/cfg_checker/helpers/errors.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
from configparser import NoSectionError
diff --git a/cfg_checker/helpers/tgz.py b/cfg_checker/helpers/tgz.py
index 9ac84f2..23b28bb 100644
--- a/cfg_checker/helpers/tgz.py
+++ b/cfg_checker/helpers/tgz.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
import tarfile as tarfile
import tempfile
diff --git a/cfg_checker/modules/ceph/__init__.py b/cfg_checker/modules/ceph/__init__.py
index 3f726f8..29b9a29 100644
--- a/cfg_checker/modules/ceph/__init__.py
+++ b/cfg_checker/modules/ceph/__init__.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from cfg_checker.agent.fio_runner import get_fio_options
from cfg_checker.agent.fio_runner import seq_modes, mix_modes
from cfg_checker.common import logger_cli
diff --git a/cfg_checker/modules/ceph/bench.py b/cfg_checker/modules/ceph/bench.py
index c0877db..fbb0a13 100644
--- a/cfg_checker/modules/ceph/bench.py
+++ b/cfg_checker/modules/ceph/bench.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import csv
import os
import json
@@ -697,18 +699,23 @@
_totals = data["totals"]
_r_bw = 0
_r_avglat = []
+ _r_95clat = []
_r_iops = 0
_w_bw = 0
_w_avglat = []
+ _w_95clat = []
_w_iops = 0
for _a, _d in data["agents"].items():
# Hardcoded number of jobs param :(
_j = _d["jobs"][0]
_r_bw += _j["read"]["bw_bytes"]
_r_avglat += [_j["read"]["lat_ns"]["mean"]]
+ _r_95clat += [_j["read"]["clat_ns"]["percentile"]["95.000000"]]
_r_iops += _j["read"]["iops"]
_w_bw += _j["write"]["bw_bytes"]
_w_avglat += [_j["write"]["lat_ns"]["mean"]]
+ _w_95clat += \
+ [_j["write"]["clat_ns"]["percentile"]["95.000000"]]
_w_iops += _j["write"]["iops"]
# Save storage class name
if "storage_class" not in _totals:
@@ -726,10 +733,14 @@
_totals["read_bw_bytes"] = _r_bw
_totals["read_avg_lat_us"] = \
(sum(_r_avglat) / len(_r_avglat)) / 1000
+ _totals["read_95p_clat_us"] = \
+ (sum(_r_95clat) / len(_r_95clat)) / 1000
_totals["read_iops"] = _r_iops
_totals["write_bw_bytes"] = _w_bw
_totals["write_avg_lat_us"] = \
(sum(_w_avglat) / len(_w_avglat)) / 1000
+ _totals["write_95p_clat_us"] = \
+ (sum(_w_95clat) / len(_w_95clat)) / 1000
_totals["write_iops"] = _w_iops
def calculate_ceph_stats(self):
diff --git a/cfg_checker/modules/ceph/info.py b/cfg_checker/modules/ceph/info.py
index 2a23936..0eb1f15 100644
--- a/cfg_checker/modules/ceph/info.py
+++ b/cfg_checker/modules/ceph/info.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import base64
import json
import os
diff --git a/cfg_checker/modules/network/__init__.py b/cfg_checker/modules/network/__init__.py
index 736be50..19c0b6b 100644
--- a/cfg_checker/modules/network/__init__.py
+++ b/cfg_checker/modules/network/__init__.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from cfg_checker.common import logger_cli
from cfg_checker.common.settings import ENV_TYPE_SALT, ENV_TYPE_KUBE
from cfg_checker.common.exception import CheckerException
diff --git a/cfg_checker/modules/network/checker.py b/cfg_checker/modules/network/checker.py
index 0b336f2..ee28e25 100644
--- a/cfg_checker/modules/network/checker.py
+++ b/cfg_checker/modules/network/checker.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from cfg_checker.common import logger_cli
from cfg_checker.modules.network.mapper import SaltNetworkMapper, \
KubeNetworkMapper
diff --git a/cfg_checker/modules/network/mapper.py b/cfg_checker/modules/network/mapper.py
index c853724..54ce630 100644
--- a/cfg_checker/modules/network/mapper.py
+++ b/cfg_checker/modules/network/mapper.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import ipaddress
import json
from copy import deepcopy
diff --git a/cfg_checker/modules/network/network_errors.py b/cfg_checker/modules/network/network_errors.py
index 63966a8..6925048 100644
--- a/cfg_checker/modules/network/network_errors.py
+++ b/cfg_checker/modules/network/network_errors.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import itertools
from cfg_checker.helpers.errors import ErrorIndex
diff --git a/cfg_checker/modules/network/pinger.py b/cfg_checker/modules/network/pinger.py
index 60c80cc..e53f75f 100644
--- a/cfg_checker/modules/network/pinger.py
+++ b/cfg_checker/modules/network/pinger.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import ipaddress
import json
diff --git a/cfg_checker/modules/packages/__init__.py b/cfg_checker/modules/packages/__init__.py
index e482eec..6d84a80 100644
--- a/cfg_checker/modules/packages/__init__.py
+++ b/cfg_checker/modules/packages/__init__.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
from cfg_checker.common.settings import ENV_TYPE_SALT, \
ENV_TYPE_KUBE, ENV_TYPE_LINUX
from cfg_checker.helpers import args_utils
diff --git a/cfg_checker/modules/packages/checker.py b/cfg_checker/modules/packages/checker.py
index 174691f..e8339cb 100644
--- a/cfg_checker/modules/packages/checker.py
+++ b/cfg_checker/modules/packages/checker.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import json
from cfg_checker.common import const, logger_cli
diff --git a/cfg_checker/modules/packages/repos.py b/cfg_checker/modules/packages/repos.py
index 02d1357..4c5d0a4 100644
--- a/cfg_checker/modules/packages/repos.py
+++ b/cfg_checker/modules/packages/repos.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import json
import os
import re
diff --git a/cfg_checker/modules/packages/versions.py b/cfg_checker/modules/packages/versions.py
index 05eaad8..3f9dac2 100644
--- a/cfg_checker/modules/packages/versions.py
+++ b/cfg_checker/modules/packages/versions.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import csv
import os
import re
diff --git a/cfg_checker/modules/reclass/__init__.py b/cfg_checker/modules/reclass/__init__.py
index 8d498c3..85d5b81 100644
--- a/cfg_checker/modules/reclass/__init__.py
+++ b/cfg_checker/modules/reclass/__init__.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
from cfg_checker.common import logger_cli
diff --git a/cfg_checker/modules/reclass/comparer.py b/cfg_checker/modules/reclass/comparer.py
index c9cac60..84e10a6 100644
--- a/cfg_checker/modules/reclass/comparer.py
+++ b/cfg_checker/modules/reclass/comparer.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
"""Model Comparer:
- yaml parser
- class tree comparison
diff --git a/cfg_checker/modules/reclass/validator.py b/cfg_checker/modules/reclass/validator.py
index 8fc65a5..8dc7841 100644
--- a/cfg_checker/modules/reclass/validator.py
+++ b/cfg_checker/modules/reclass/validator.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
from cfg_checker.common import logger_cli
diff --git a/cfg_checker/nodes.py b/cfg_checker/nodes.py
index ebf0e00..fdda358 100644
--- a/cfg_checker/nodes.py
+++ b/cfg_checker/nodes.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import json
import os
import yaml
@@ -1422,3 +1424,6 @@
logger_cli.error("ERROR: '{}' is not supported yet".format(typ))
return None
return [[i.metadata.namespace, i.metadata.name] for i in _items.items]
+
+ def get_logs_for_pod(self, podname, namespace):
+ return self.kube.get_pod_logs(podname, namespace)
diff --git a/cfg_checker/reports/reporter.py b/cfg_checker/reports/reporter.py
index de0c83c..8af20db 100644
--- a/cfg_checker/reports/reporter.py
+++ b/cfg_checker/reports/reporter.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import abc
import os
import re
diff --git a/runtests.py b/runtests.py
index 3da567f..4190d4b 100644
--- a/runtests.py
+++ b/runtests.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
import shutil
import unittest
diff --git a/scripts/ifs_data.py b/scripts/ifs_data.py
index 34263b3..a87769f 100644
--- a/scripts/ifs_data.py
+++ b/scripts/ifs_data.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import json
import re
import subprocess
diff --git a/scripts/ping.py b/scripts/ping.py
index c283e90..d627f38 100644
--- a/scripts/ping.py
+++ b/scripts/ping.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import json
import os
import platform
diff --git a/scripts/pkg_versions.py b/scripts/pkg_versions.py
index ae76833..687e982 100644
--- a/scripts/pkg_versions.py
+++ b/scripts/pkg_versions.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import json
import subprocess
import sys
diff --git a/scripts/sniffer.py b/scripts/sniffer.py
index 72ccbb9..96e49a0 100644
--- a/scripts/sniffer.py
+++ b/scripts/sniffer.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
"""
This is a WIP script.
Work is halted,
diff --git a/setup.py b/setup.py
index da4f628..28f8bfc 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import glob
import os
@@ -27,10 +29,10 @@
entry_points = {
"console_scripts": [
- "mcp-checker = cfg_checker.cfg_check:config_check_entrypoint",
- "mcp-pkg = cfg_checker.cli.packages:entrypoint",
- "mcp-net = cfg_checker.cli.network:entrypoint",
- "cmp-reclass = cfg_checker.cli.reclass:entrypoint",
+ "mos-checker = cfg_checker.cfg_check:config_check_entrypoint",
+ "chk-pkg = cfg_checker.cli.packages:entrypoint",
+ "chk-net = cfg_checker.cli.network:entrypoint",
+ "chk-reclass = cfg_checker.cli.reclass:entrypoint",
"checker-agent = cfg_checker.agent.cfg_agent:entrypoint"
]
}
@@ -38,7 +40,7 @@
setup(
name="mcp-checker",
- version="0.68",
+ version="0.7",
author="Alex Savatieiev",
author_email="osavatieiev@mirantis.com",
classifiers=[
diff --git a/templates/ceph_bench_html.j2 b/templates/ceph_bench_html.j2
index 7bdcfcc..1a9e994 100644
--- a/templates/ceph_bench_html.j2
+++ b/templates/ceph_bench_html.j2
@@ -130,7 +130,7 @@
}
td > .props_group {
display: grid;
- grid-template-columns: 60px 60px 80px 35px 45px 95px 50px 60px 45px;
+ grid-template-columns: 60px 80px 35px 45px 95px 110px;;
padding-left: 0px;
padding-right: 0px;
margin: 1px;
@@ -159,7 +159,7 @@
}
td > .bench_run_group {
display: grid;
- grid-template-columns: 80px 80px 80px 80px 75px 75px;
+ grid-template-columns: 80px 110px 80px 80px 110px 80px;;
padding-left: 0px;
padding-right: 0px;
margin: 1px;
@@ -429,24 +429,21 @@
<td class="status">Data point</td>
<td class="col_properties">
<div class="props_group">
- <div class="item prop">Warmup</div>
<div class="item prop">Run Time</div>
<div class="item prop">Storage class</div>
<div class="item pg">PGs</div>
<div class="item prop">Engine</div>
<div class="item prop">Mode</div>
- <div class="item prop">BS</div>
- <div class="item prop">IOdepth</div>
- <div class="item prop">Size</div>
+ <div class="item prop">BS / IODepth / Size</div>
</div>
</td>
<td class="col_bench">
<div class="bench_run_group">
<div class="item bench">Read, MB/s</div>
- <div class="item bench">Avg lat, usec</div>
+ <div class="item bench">Avg/cLat 95p, usec</div>
<div class="item bench">Read, op/s</div>
<div class="item bench">Write, MB/s</div>
- <div class="item bench">Avg lat, usec</div>
+ <div class="item bench">Avg/cLat 95p, usec</div>
<div class="item bench">Write, op/s</div>
</div>
</td>
@@ -461,24 +458,21 @@
<td class="status">All agents</td>
<td class="col_properties">
<div class="props_group">
- <div class="item prop">{{ o["ramp_time"] }}</div>
- <div class="item prop">{{ o["runtime"] }}</div>
+ <div class="item prop">{{ o["ramp_time"] }}/{{ o["runtime"] }}</div>
<div class="item prop">{{ t["storage_class"] }}</div>
<div class="item pg">{{ t["storage_class_stats"]["num_pg"] }}</div>
<div class="item prop">{{ o["ioengine"] }}</div>
<div class="item prop">{{ o["readwrite"] }} ({{ o["rwmixread"] }}/{{ 100 - (o["rwmixread"]|int) }})</div>
- <div class="item prop">{{ o["bs"] }}</div>
- <div class="item prop">{{ o["iodepth"] }}</div>
- <div class="item prop">{{ o["size"] }}</div>
+ <div class="item prop">{{ o["bs"] }}/{{ o["iodepth"] }}/{{ o["size"] }}</div>
</div>
</td>
<td class="col_bench">
<div class="bench_run_group">
<div class="item bench">{{ t["read_bw_bytes"] | to_mb }}</div>
- <div class="item bench">{{ "%0.2f" | format(t["read_avg_lat_us"]|float) }}</div>
+ <div class="item bench">{{ "%0.2f" | format(t["read_avg_lat_us"]|float) }} / {{ "%0.2f" | format(t["read_95p_clat_us"]|float) }}</div>
<div class="item bench">{{ "%0.2f" | format(t["read_iops"]|float) }}</div>
<div class="item bench">{{ t["write_bw_bytes"] | to_mb }}</div>
- <div class="item bench">{{ "%0.2f" | format(t["write_avg_lat_us"]|float) }}</div>
+ <div class="item bench">{{ "%0.2f" | format(t["write_avg_lat_us"]|float) }} / {{ "%0.2f" | format(t["write_95p_clat_us"]|float) }}</div>
<div class="item bench">{{ "%0.2f" | format(t["write_iops"]|float) }}</div>
</div>
</td>
@@ -600,24 +594,21 @@
<td class="status">{{ agent }}</td>
<td class="col_properties">
<div class="props_group">
- <div class="item prop">{{ j["job options"]["ramp_time"] }}</div>
- <div class="item prop">{{ j["job options"]["runtime"] }}</div>
+ <div class="item prop">{{ j["job options"]["ramp_time"] }}/{{ j["job options"]["runtime"] }}</div>
<div class="item prop">{{ t["storage_class"] }}</div>
<div class="item pg">{{ t["storage_class_stats"]["num_pg"] }}</div>
<div class="item prop">{{ o["ioengine"] }}</div>
<div class="item prop">{{ o["readwrite"] }} ({{ o["rwmixread"] }}/{{ 100 - (o["rwmixread"]|int) }})</div>
- <div class="item prop">{{ j["job options"]["bs"] }}</div>
- <div class="item prop">{{ o["iodepth"] }}</div>
- <div class="item prop">{{ j["job options"]["size"] }}</div>
+ <div class="item prop">{{ j["job options"]["bs"] }}/{{ o["iodepth"] }}/{{ j["job options"]["size"] }}</div>
</div>
</td>
<td class="col_bench">
<div class="bench_run_group">
<div class="item bench">{{ j["read"]["bw_bytes"] | to_mb }}</div>
- <div class="item bench">{{ "%0.2f" | format(j["read"]["lat_ns"]["mean"]|float / 1000) }}</div>
+ <div class="item bench">{{ "%0.2f" | format(j["read"]["lat_ns"]["mean"]|float / 1000) }} / {{ "%0.2f" | format(j["read"]["clat_ns"]["percentile"]["95.000000"]|float / 1000) }}</div>
<div class="item bench">{{ "%0.2f" | format(j["read"]["iops"]|float) }}</div>
<div class="item bench">{{ j["write"]["bw_bytes"] | to_mb }}</div>
- <div class="item bench">{{ "%0.2f" | format(j["write"]["lat_ns"]["mean"]|float / 1000) }}</div>
+ <div class="item bench">{{ "%0.2f" | format(j["write"]["lat_ns"]["mean"]|float / 1000) }} / {{ "%0.2f" | format(j["write"]["clat_ns"]["percentile"]["95.000000"]|float / 1000) }}</div>
<div class="item bench">{{ "%0.2f" | format(j["write"]["iops"]|float) }}</div>
</div>
</td>
diff --git a/tests/mocks.py b/tests/mocks.py
index 9d9c534..afb6112 100644
--- a/tests/mocks.py
+++ b/tests/mocks.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import json
import os
diff --git a/tests/test_base.py b/tests/test_base.py
index 8673a73..6e6e3e2 100644
--- a/tests/test_base.py
+++ b/tests/test_base.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import contextlib
import io
import os
diff --git a/tests/test_cli.py b/tests/test_cli.py
index bad05c9..1f81376 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
from unittest import mock
diff --git a/tests/test_common.py b/tests/test_common.py
index 42f2988..6a36a23 100644
--- a/tests/test_common.py
+++ b/tests/test_common.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import inspect
import os
import sys
diff --git a/tests/test_entrypoints.py b/tests/test_entrypoints.py
index 7c420d5..b09bab6 100644
--- a/tests/test_entrypoints.py
+++ b/tests/test_entrypoints.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
from tests.test_base import CfgCheckerTestBase
diff --git a/tests/test_network.py b/tests/test_network.py
index 3a1867b..0ac43df 100644
--- a/tests/test_network.py
+++ b/tests/test_network.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
import shutil
diff --git a/tests/test_packages.py b/tests/test_packages.py
index 6d8990d..feb20d2 100644
--- a/tests/test_packages.py
+++ b/tests/test_packages.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
from unittest.mock import patch
diff --git a/tests/test_reclass_comparer.py b/tests/test_reclass_comparer.py
index a1a94b3..56be5ef 100644
--- a/tests/test_reclass_comparer.py
+++ b/tests/test_reclass_comparer.py
@@ -1,3 +1,5 @@
+# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
+# Copyright 2019-2022 Mirantis, Inc.
import os
from tests.mocks import _res_dir