mirror of
https://github.com/ceph/ceph
synced 2025-03-06 08:20:12 +00:00
cephadm: covert iscsi type to provide a customize_container_binds method
Convert the CephIscsi type's get_container_binds to customize_container_binds and use it in the generic method. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
f80cf438b3
commit
21563528d1
@ -1087,16 +1087,16 @@ class CephIscsi(ContainerDaemonForm):
|
||||
mounts['/dev'] = '/dev'
|
||||
return mounts
|
||||
|
||||
@staticmethod
|
||||
def get_container_binds():
|
||||
# type: () -> List[List[str]]
|
||||
binds = []
|
||||
lib_modules = ['type=bind',
|
||||
'source=/lib/modules',
|
||||
'destination=/lib/modules',
|
||||
'ro=true']
|
||||
def customize_container_binds(
|
||||
self, ctx: CephadmContext, binds: List[List[str]]
|
||||
) -> None:
|
||||
lib_modules = [
|
||||
'type=bind',
|
||||
'source=/lib/modules',
|
||||
'destination=/lib/modules',
|
||||
'ro=true',
|
||||
]
|
||||
binds.append(lib_modules)
|
||||
return binds
|
||||
|
||||
@staticmethod
|
||||
def get_version(ctx, container_id):
|
||||
@ -2554,10 +2554,11 @@ def _write_custom_conf_files(
|
||||
def get_container_binds(
|
||||
ctx: CephadmContext, ident: 'DaemonIdentity'
|
||||
) -> List[List[str]]:
|
||||
binds = list()
|
||||
binds: List[List[str]] = list()
|
||||
|
||||
if ident.daemon_type == CephIscsi.daemon_type:
|
||||
binds.extend(CephIscsi.get_container_binds())
|
||||
iscsi = CephIscsi.create(ctx, ident)
|
||||
iscsi.customize_container_binds(ctx, binds)
|
||||
if ident.daemon_type == CephNvmeof.daemon_type:
|
||||
binds.extend(CephNvmeof.get_container_binds())
|
||||
elif ident.daemon_type == CustomContainer.daemon_type:
|
||||
|
Loading…
Reference in New Issue
Block a user