mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
Merge pull request #53724 from adk3798/rm-get_unit_name_by_instance
cephadm: remove get_unit_name_by_instance func Reviewed-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
commit
0bca13c8bf
@ -1785,13 +1785,6 @@ def get_unit_name(
|
||||
return DaemonIdentity(fsid, daemon_type, daemon_id).unit_name
|
||||
|
||||
|
||||
def get_unit_name_by_instance(fsid: str, instance: str) -> str:
|
||||
"""Return the name of the systemd unit given an fsid and the name
|
||||
of the instance (the stuff after the @-sign and before the file extension).
|
||||
"""
|
||||
return 'ceph-%s@%s' % (fsid, instance)
|
||||
|
||||
|
||||
def get_unit_name_by_daemon_name(ctx: CephadmContext, fsid: str, name: str) -> str:
|
||||
daemon = get_daemon_description(ctx, fsid, name)
|
||||
try:
|
||||
@ -6505,7 +6498,7 @@ def _rm_cluster(ctx: CephadmContext, keep_logs: bool, zap_osds: bool) -> None:
|
||||
continue
|
||||
if d['style'] != 'cephadm:v1':
|
||||
continue
|
||||
disable_systemd_service(get_unit_name_by_instance(ctx.fsid, d['name']))
|
||||
disable_systemd_service('ceph-%s@%s' % (ctx.fsid, d['name']))
|
||||
|
||||
# cluster units
|
||||
for unit_name in ['ceph-%s.target' % ctx.fsid]:
|
||||
|
Loading…
Reference in New Issue
Block a user