]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: change version checks to use supports_split_cgroups method
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 14 Oct 2023 15:21:05 +0000 (11:21 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 18 Oct 2023 19:56:35 +0000 (15:56 -0400)
Use the recently added supports_split_cgroups method instead of checking
for an exact version.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadmlib/context_getters.py

index a78c67a7812e907ef12abaa1cfbc2bd164f9046a..0bd0c0e5e6c45fad54a26a39e21109e8ab532c6b 100644 (file)
@@ -6,7 +6,6 @@ import os
 
 from typing import Any, Dict, List, Optional, Tuple, Union
 
-from .constants import CGROUPS_SPLIT_PODMAN_VERSION
 from .container_engines import Podman
 from .context import CephadmContext
 from .exceptions import Error
@@ -186,5 +185,5 @@ def should_log_to_journald(ctx: CephadmContext) -> bool:
         return ctx.log_to_journald
     return (
         isinstance(ctx.container_engine, Podman)
-        and ctx.container_engine.version >= CGROUPS_SPLIT_PODMAN_VERSION
+        and ctx.container_engine.supports_split_cgroups
     )