mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
Merge pull request #38918 from adk3798/ha-rgw-fix
mgr/cephadm: fix ha-rgw removal Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com> Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
This commit is contained in:
commit
7745ccfc10
@ -1464,7 +1464,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
|
|||||||
else:
|
else:
|
||||||
spec = ServiceSpec(
|
spec = ServiceSpec(
|
||||||
unmanaged=True,
|
unmanaged=True,
|
||||||
service_type=dd.daemon_type,
|
service_type=daemon_type_to_service(dd.daemon_type),
|
||||||
service_id=dd.service_id(),
|
service_id=dd.service_id(),
|
||||||
placement=PlacementSpec(
|
placement=PlacementSpec(
|
||||||
hosts=[dd.hostname]
|
hosts=[dd.hostname]
|
||||||
|
@ -13,6 +13,7 @@ from mgr_module import HandleCommandResult, MonCommandFailed
|
|||||||
from ceph.deployment.service_spec import ServiceSpec, RGWSpec
|
from ceph.deployment.service_spec import ServiceSpec, RGWSpec
|
||||||
from ceph.deployment.utils import is_ipv6, unwrap_ipv6
|
from ceph.deployment.utils import is_ipv6, unwrap_ipv6
|
||||||
from orchestrator import OrchestratorError, DaemonDescription
|
from orchestrator import OrchestratorError, DaemonDescription
|
||||||
|
from orchestrator._interface import daemon_type_to_service, service_to_daemon_types
|
||||||
from cephadm import utils
|
from cephadm import utils
|
||||||
from mgr_util import create_self_signed_cert, ServerConfigException, verify_tls
|
from mgr_util import create_self_signed_cert, ServerConfigException, verify_tls
|
||||||
|
|
||||||
@ -234,14 +235,14 @@ class CephadmService(metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Called before the daemon is removed.
|
Called before the daemon is removed.
|
||||||
"""
|
"""
|
||||||
assert self.TYPE == daemon.daemon_type
|
assert self.TYPE == daemon_type_to_service(daemon.daemon_type)
|
||||||
logger.debug(f'Pre remove daemon {self.TYPE}.{daemon.daemon_id}')
|
logger.debug(f'Pre remove daemon {self.TYPE}.{daemon.daemon_id}')
|
||||||
|
|
||||||
def post_remove(self, daemon: DaemonDescription) -> None:
|
def post_remove(self, daemon: DaemonDescription) -> None:
|
||||||
"""
|
"""
|
||||||
Called after the daemon is removed.
|
Called after the daemon is removed.
|
||||||
"""
|
"""
|
||||||
assert self.TYPE == daemon.daemon_type
|
assert self.TYPE == daemon_type_to_service(daemon.daemon_type)
|
||||||
logger.debug(f'Post remove daemon {self.TYPE}.{daemon.daemon_id}')
|
logger.debug(f'Post remove daemon {self.TYPE}.{daemon.daemon_id}')
|
||||||
|
|
||||||
def purge(self) -> None:
|
def purge(self) -> None:
|
||||||
@ -272,7 +273,9 @@ class CephService(CephadmService):
|
|||||||
"""
|
"""
|
||||||
Map the daemon id to a cephx keyring entity name
|
Map the daemon id to a cephx keyring entity name
|
||||||
"""
|
"""
|
||||||
if self.TYPE in ['rgw', 'rbd-mirror', 'nfs', "iscsi", 'haproxy', 'keepalived']:
|
# despite this mapping entity names to daemons, self.TYPE within
|
||||||
|
# the CephService class refers to service types, not daemon types
|
||||||
|
if self.TYPE in ['rgw', 'rbd-mirror', 'nfs', "iscsi", 'ha-rgw']:
|
||||||
return AuthEntity(f'client.{self.TYPE}.{daemon_id}')
|
return AuthEntity(f'client.{self.TYPE}.{daemon_id}')
|
||||||
elif self.TYPE == 'crash':
|
elif self.TYPE == 'crash':
|
||||||
if host == "":
|
if host == "":
|
||||||
|
Loading…
Reference in New Issue
Block a user