Skip to content

Commit 438f57a

Browse files
authored
Merge pull request ceph#58062 from rhcs-dashboard/cephadm-flake8-fix
mgr/cephadm: fix flake8 test failures Reviewed-by: Ilya Dryomov <[email protected]>
2 parents 414085c + a9563d9 commit 438f57a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/pybind/mgr/cephadm/configchecks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(self, subnet: str, hostname: str, mtu: str, speed: str):
9191
speed: [hostname]
9292
}
9393

94-
@ property
94+
@property
9595
def host_list(self) -> List[str]:
9696
hosts = []
9797
for mtu in self.mtu_map:

src/pybind/mgr/cephadm/module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3014,7 +3014,7 @@ def _create_daemons(self,
30143014
)
30153015
daemons.append(sd)
30163016

3017-
@ forall_hosts
3017+
@forall_hosts
30183018
def create_func_map(*args: Any) -> str:
30193019
daemon_spec = self.cephadm_services[daemon_type].prepare_create(*args)
30203020
with self.async_timeout_handler(daemon_spec.host, f'cephadm deploy ({daemon_spec.daemon_type} daemon)'):
@@ -3341,7 +3341,7 @@ def _apply_service_spec(self, spec: ServiceSpec) -> str:
33413341
(f'The maximum number of {spec.service_type} daemons allowed with {host_count} hosts is {max(5, host_count)}.'))
33423342
elif spec.service_type != 'osd':
33433343
if spec.placement.count > (max_count * host_count):
3344-
raise OrchestratorError((f'The maximum number of {spec.service_type} daemons allowed with {host_count} hosts is {host_count*max_count} ({host_count}x{max_count}).'
3344+
raise OrchestratorError((f'The maximum number of {spec.service_type} daemons allowed with {host_count} hosts is {host_count * max_count} ({host_count}x{max_count}).'
33453345
+ ' This limit can be adjusted by changing the mgr/cephadm/max_count_per_host config option'))
33463346

33473347
if spec.placement.count_per_host is not None and spec.placement.count_per_host > max_count and spec.service_type != 'osd':

src/pybind/mgr/cephadm/tests/test_cephadm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ def test_find_destroyed_osds(self, _mon_cmd, cephadm_module):
979979
assert osd_claims.filtered_by_host('host1') == ['0']
980980
assert osd_claims.filtered_by_host('host1.domain.com') == ['0']
981981

982-
@ pytest.mark.parametrize(
982+
@pytest.mark.parametrize(
983983
"ceph_services, cephadm_daemons, strays_expected, metadata",
984984
# [ ([(daemon_type, daemon_id), ... ], [...], [...]), ... ]
985985
[

0 commit comments

Comments
 (0)