]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #66559 from timqn22/crash-dir-permission-setting
authorRedouane Kachach <rkachach@ibm.com>
Mon, 11 May 2026 19:29:37 +0000 (21:29 +0200)
committerGitHub <noreply@github.com>
Mon, 11 May 2026 19:29:37 +0000 (21:29 +0200)
src/cephadm: updated crash dir creation

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Redouane Kachach <rkachach@ibm.com>
1  2 
src/cephadm/cephadm.py
src/cephadm/cephadmlib/daemons/ceph.py

Simple merge
index 0134f69da1512812157646a70401d548f6e09279,ed30715841c7d64fa3bad8922726a4e416ac25ae..0663f1d47a3bcacf8d879eafd2fd2931fbbfb821
@@@ -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"""