diff --git a/ceph/ceph-manager/ceph-manager/ceph_manager/monitor.py b/ceph/ceph-manager/ceph-manager/ceph_manager/monitor.py index b06e7577..16228e0f 100644 --- a/ceph/ceph-manager/ceph-manager/ceph_manager/monitor.py +++ b/ceph/ceph-manager/ceph-manager/ceph_manager/monitor.py @@ -48,7 +48,8 @@ class HandleUpgradesMixin(object): and state != constants.UPGRADE_COMPLETED and from_version == constants.TITANIUM_SERVER_VERSION_18_03): - LOG.info(_LI("Wait for ceph upgrade to complete before monitoring cluster.")) + LOG.info(_LI("Wait for ceph upgrade to complete " + "before monitoring cluster.")) self.wait_for_upgrade_complete = True def set_flag_require_jewel_osds(self): @@ -90,7 +91,8 @@ class HandleUpgradesMixin(object): reason = reason.strip() if len(reason) == 0: continue - if constants.CEPH_HEALTH_WARN_REQUIRE_JEWEL_OSDS_NOT_SET in reason: + if constants.CEPH_HEALTH_WARN_REQUIRE_JEWEL_OSDS_NOT_SET \ + in reason: continue reasons_list.append(reason) if len(reasons_list) == 0: @@ -168,8 +170,9 @@ class Monitor(HandleUpgradesMixin): try: self.ceph_get_fsid() except Exception: - LOG.exception("Error getting fsid, " - "will retry in %ss" % constants.CEPH_HEALTH_CHECK_INTERVAL) + LOG.exception( + "Error getting fsid, will retry in %ss" + % constants.CEPH_HEALTH_CHECK_INTERVAL) if self.service.entity_instance_id: break time.sleep(constants.CEPH_HEALTH_CHECK_INTERVAL) @@ -180,8 +183,10 @@ class Monitor(HandleUpgradesMixin): self.ceph_poll_status() self.ceph_poll_quotas() except Exception: - LOG.exception("Error running periodic monitoring of ceph status, " - "will retry in %ss" % constants.CEPH_HEALTH_CHECK_INTERVAL) + LOG.exception( + "Error running periodic monitoring of ceph status, " + "will retry in %ss" + % constants.CEPH_HEALTH_CHECK_INTERVAL) time.sleep(constants.CEPH_HEALTH_CHECK_INTERVAL) def ceph_get_fsid(self): @@ -705,7 +710,8 @@ class Monitor(HandleUpgradesMixin): return ( msg['head'] + - (health['health'] + lbracket + parsed_reasons_text)[:max_size - 1] + + (health['health'] + lbracket + + parsed_reasons_text)[:max_size - 1] + rbracket + msg['tail']) def _report_fault(self, health, alarm_id): diff --git a/ceph/ceph-manager/ceph-manager/ceph_manager/server.py b/ceph/ceph-manager/ceph-manager/ceph_manager/server.py index 05b8f5a1..49d9ca96 100644 --- a/ceph/ceph-manager/ceph-manager/ceph_manager/server.py +++ b/ceph/ceph-manager/ceph-manager/ceph_manager/server.py @@ -24,14 +24,11 @@ from oslo_log import log as logging from oslo_service import service # noinspection PyUnresolvedReferences from oslo_service.periodic_task import PeriodicTasks -# noinspection PyUnresolvedReferences -from oslo_service import loopingcall # noinspection PyUnresolvedReferences from cephclient import wrapper from ceph_manager.monitor import Monitor -from ceph_manager import exception from ceph_manager import constants from ceph_manager.i18n import _LI diff --git a/ceph/ceph-manager/ceph-manager/tox.ini b/ceph/ceph-manager/ceph-manager/tox.ini index 41d3854b..cad30d50 100644 --- a/ceph/ceph-manager/ceph-manager/tox.ini +++ b/ceph/ceph-manager/ceph-manager/tox.ini @@ -10,17 +10,12 @@ toxworkdir = /tmp/{env:USER}_ceph_manager_tox [testenv] setenv = VIRTUAL_ENV={envdir} usedevelop = True -install_command = pip install --no-use-wheel -U --force-reinstall {opts} {packages} +install_command = pip install -U --force-reinstall {opts} {packages} deps = -r{toxinidir}/test-requirements.txt commands = py.test {posargs} whitelist_externals = bash passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY -[testenv:py27] -basepython = python2.7 -setenv = - PYTHONPATH={toxinidir}/../../../../sysinv/recipes-common/sysinv/sysinv:{toxinidir}/../../../../config/recipes-common/tsconfig/tsconfig - [testenv:pep8] commands = flake8 {posargs}