mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #43514 from mgfritch/cephadm-agent-binary
cephadm: use the current cephadm binary for the agent Reviewed-by: Adam King <adking@redhat.com>
This commit is contained in:
commit
a755ffa678
src
@ -3505,7 +3505,7 @@ class CephadmAgent():
|
||||
loop_interval = 30
|
||||
stop = False
|
||||
|
||||
required_files = ['cephadm', 'agent.json', 'keyring']
|
||||
required_files = ['agent.json', 'keyring']
|
||||
|
||||
def __init__(self, ctx: CephadmContext, fsid: str, daemon_id: Union[int, str] = ''):
|
||||
self.ctx = ctx
|
||||
@ -3515,7 +3515,6 @@ class CephadmAgent():
|
||||
self.target_port = ''
|
||||
self.host = ''
|
||||
self.daemon_dir = os.path.join(ctx.data_dir, self.fsid, f'{self.daemon_type}.{self.daemon_id}')
|
||||
self.binary_path = os.path.join(self.daemon_dir, 'cephadm')
|
||||
self.config_path = os.path.join(self.daemon_dir, 'agent.json')
|
||||
self.keyring_path = os.path.join(self.daemon_dir, 'keyring')
|
||||
self.ca_path = os.path.join(self.daemon_dir, 'root_cert.pem')
|
||||
@ -3559,7 +3558,8 @@ class CephadmAgent():
|
||||
|
||||
def unit_run(self) -> str:
|
||||
py3 = shutil.which('python3')
|
||||
return ('set -e\n' + f'{py3} {self.binary_path} agent --fsid {self.fsid} --daemon-id {self.daemon_id} &\n')
|
||||
binary_path = os.path.realpath(sys.argv[0])
|
||||
return ('set -e\n' + f'{py3} {binary_path} agent --fsid {self.fsid} --daemon-id {self.daemon_id} &\n')
|
||||
|
||||
def unit_file(self) -> str:
|
||||
return """#generated by cephadm
|
||||
|
@ -1036,7 +1036,6 @@ class CephadmAgent(CephService):
|
||||
self.mgr.inventory.get_addr(daemon_spec.host))
|
||||
config = {
|
||||
'agent.json': json.dumps(cfg),
|
||||
'cephadm': self.mgr._cephadm,
|
||||
'keyring': daemon_spec.keyring,
|
||||
'root_cert.pem': self.mgr.cherrypy_thread.ssl_certs.get_root_cert(),
|
||||
'listener.crt': listener_cert,
|
||||
|
Loading…
Reference in New Issue
Block a user