Project

General

Profile

Cleanup #49305

cephadm: don't block the CLI handler thread

Added by Sebastian Wagner 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
cephadm
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

We still have a lot of places where we run remote SSH calls form within the CLI hander thread:

grep -n 'CephadmServe(self' module.py
469:        serve = CephadmServe(self)
842:        r = CephadmServe(self)._check_host(host)
887:        r = CephadmServe(self)._registry_login(host, url, username, password)
903:            out, err, code = CephadmServe(self)._run_cephadm(host, cephadmNoImage, 'check-host',
925:        out, err, code = CephadmServe(self)._run_cephadm(host, cephadmNoImage, 'prepare-host',
1192:        out, err, code = CephadmServe(self)._run_cephadm(spec.hostname, cephadmNoImage, 'check-host',
1359:            _out, _err, _code = CephadmServe(self)._run_cephadm(hostname, cephadmNoImage, "host-maintenance",
1410:        outs, errs, _code = CephadmServe(self)._run_cephadm(hostname, cephadmNoImage, 'host-maintenance',
1612:            return CephadmServe(self)._create_daemon(daemon_spec, reconfig=(action == 'reconfig'))
1622:                out, err, code = CephadmServe(self)._run_cephadm(
1743:        out, err, code = CephadmServe(self)._run_cephadm(
1778:            out, err, code = CephadmServe(self)._run_cephadm(
1887:        return CephadmServe(self)._remove_daemon(name, host)
1962:            return CephadmServe(self)._create_daemon(daemon_spec)
2204:        image_info = CephadmServe(self)._get_container_image_info(target_name)

For some backgroud, see https://docs.ceph.com/en/latest/dev/cephadm/developing-cephadm/#note-regarding-network-calls-from-cli-handlers

Also available in: Atom PDF