From: Redouane Kachach Date: Mon, 11 May 2026 19:29:37 +0000 (+0200) Subject: Merge pull request #66559 from timqn22/crash-dir-permission-setting X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e5014f3ae1bf1b87a26e699ca83ba730dbef345;p=ceph.git Merge pull request #66559 from timqn22/crash-dir-permission-setting src/cephadm: updated crash dir creation Reviewed-by: Adam King Reviewed-by: Redouane Kachach --- 8e5014f3ae1bf1b87a26e699ca83ba730dbef345 diff --cc src/cephadm/cephadmlib/daemons/ceph.py index 0134f69da151,ed30715841c7..0663f1d47a3b --- a/src/cephadm/cephadmlib/daemons/ceph.py +++ b/src/cephadm/cephadmlib/daemons/ceph.py @@@ -346,16 -338,36 +352,45 @@@ class OSD(Ceph) def osd_fsid(self) -> Optional[str]: return self._osd_fsid + def default_entrypoint(self) -> str: + config_json = fetch_configs(self.ctx) + if ( + config_json is not None + and config_json.get('osd_type') == 'crimson' + ): + return '/usr/bin/ceph-osd-crimson' + return '/usr/bin/ceph-osd' + + @register_daemon_form + class Crash(Ceph): + @classmethod + def for_daemon_type(cls, daemon_type: str) -> bool: + return daemon_type == 'crash' + + def __init__( + self, + ctx: CephadmContext, + ident: DaemonIdentity, + ) -> None: + super().__init__(ctx, ident) + + @classmethod + def create(cls, ctx: CephadmContext, ident: DaemonIdentity) -> 'Ceph': + (uid, gid) = extract_uid_gid(ctx) + data_dir_base = f'{ctx.data_dir}/{ident.fsid}' + makedirs( + os.path.join(data_dir_base, 'crash'), uid, gid, DATA_DIR_MODE + ) + makedirs( + os.path.join(data_dir_base, 'crash', 'posted'), + uid, + gid, + DATA_DIR_MODE, + ) + return cls(ctx, ident) + + @register_daemon_form class CephExporter(ContainerDaemonForm): """Defines a Ceph exporter container"""