diff options
author | Yuri Weinstein <yweinste@redhat.com> | 2024-07-31 18:05:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-31 18:05:41 +0200 |
commit | 1a2a617eddf819bd20753736a01cbcf265cc5ed3 (patch) | |
tree | 084f60a36b487f49c66a41d96c351c277e81d773 /src/cephadm | |
parent | Merge pull request #58931 from ronen-fr/wip-rf-repair-decode (diff) | |
parent | nvmeof gw monitor: disable by default (diff) | |
download | ceph-1a2a617eddf819bd20753736a01cbcf265cc5ed3.tar.xz ceph-1a2a617eddf819bd20753736a01cbcf265cc5ed3.zip |
Merge pull request #54671 from baum/ceph-nvmeof-mon
mon: add NVMe-oF gateway monitor and HA
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Diffstat (limited to 'src/cephadm')
-rw-r--r-- | src/cephadm/cephadmlib/daemons/nvmeof.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/cephadm/cephadmlib/daemons/nvmeof.py b/src/cephadm/cephadmlib/daemons/nvmeof.py index 7e8ab251636..9b849497e0e 100644 --- a/src/cephadm/cephadmlib/daemons/nvmeof.py +++ b/src/cephadm/cephadmlib/daemons/nvmeof.py @@ -63,7 +63,9 @@ class CephNvmeof(ContainerDaemonForm): return DaemonIdentity(self.fsid, self.daemon_type, self.daemon_id) @staticmethod - def _get_container_mounts(data_dir: str, log_dir: str) -> Dict[str, str]: + def _get_container_mounts( + data_dir: str, log_dir: str, mtls_dir: Optional[str] = None + ) -> Dict[str, str]: mounts = dict() mounts[os.path.join(data_dir, 'config')] = '/etc/ceph/ceph.conf:z' mounts[os.path.join(data_dir, 'keyring')] = '/etc/ceph/keyring:z' @@ -74,6 +76,8 @@ class CephNvmeof(ContainerDaemonForm): mounts['/dev/hugepages'] = '/dev/hugepages' mounts['/dev/vfio/vfio'] = '/dev/vfio/vfio' mounts[log_dir] = '/var/log/ceph:z' + if mtls_dir: + mounts[mtls_dir] = '/src/mtls:z' return mounts def _get_tls_cert_key_mounts( @@ -98,8 +102,15 @@ class CephNvmeof(ContainerDaemonForm): ) -> None: data_dir = self.identity.data_dir(ctx.data_dir) log_dir = os.path.join(ctx.log_dir, self.identity.fsid) - mounts.update(self._get_container_mounts(data_dir, log_dir)) - mounts.update(self._get_tls_cert_key_mounts(data_dir, self.files)) + mtls_dir = os.path.join(ctx.data_dir, self.identity.fsid, 'mtls') + if os.path.exists(mtls_dir): + mounts.update( + self._get_container_mounts( + data_dir, log_dir, mtls_dir=mtls_dir + ) + ) + else: + mounts.update(self._get_container_mounts(data_dir, log_dir)) def customize_container_binds( self, ctx: CephadmContext, binds: List[List[str]] |