mgr/orch: Make orchestrator interface synchronous. #39352
mgr/orch: Make orchestrator interface synchronous. #39352sebastian-philipp merged 13 commits intoceph:masterfrom
Conversation
| time.sleep(0.1) | ||
| assert False, "timeout" + str(c._state) | ||
| # type: (CephadmOrchestrator, OrchResult) -> Any | ||
| return raise_if_exception(c) |
There was a problem hiding this comment.
Does this method still need to exist? (Or should it be renamed?)
There was a problem hiding this comment.
Right. it's still needed due to the sub-interpreter magic:
ceph/src/pybind/mgr/orchestrator/_interface.py
Lines 215 to 226 in 3b42756
|
3b42756 to
5c1e213
Compare
|
57f75eb to
049d273
Compare
|
jenkins test make check |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
varshar16
left a comment
There was a problem hiding this comment.
Following changes are nice to have. Otherwise looks good.
| raise_if_exception(completion) | ||
| report = completion.result |
There was a problem hiding this comment.
report = raise_if_exception(completion)
There was a problem hiding this comment.
I'd like to keep the changes to the interface limited. Follow-up might be to rename raise_if_exception to get_orch_result() or something.
There was a problem hiding this comment.
I suggested because you made similar changes in _list_services(). If you are planning for follow-up PR then it is fine.
| @@ -20,41 +20,7 @@ | |||
| from mgr_module import MgrModule | |||
|
|
|||
| import orchestrator | |||
There was a problem hiding this comment.
that would blow-up the diff with unrelated changes.
|
|
||
| return wrapper | ||
| return inner | ||
| from orchestrator import handle_orch_error, raise_if_exception |
There was a problem hiding this comment.
Instead update the import here
There was a problem hiding this comment.
I'd like to avoid introducing unrelated changes
There was a problem hiding this comment.
As you are importing from orchestrator module here again, I suggested the change. If you don't plan do it then at least add a note to clean up later.
| c = orchestrator.OrchResult(result=None, exception=ZeroDivisionError('hello, world')) | ||
| return c |
There was a problem hiding this comment.
here too
return orchestrator.OrchResult(result=None, exception=ZeroDivisionError('hello, world'))
| completion = mgr.describe_service(service_type='nfs') | ||
| mgr._orchestrator_wait([completion]) | ||
| orchestrator.raise_if_exception(completion) | ||
| return [cluster.spec.service_id for cluster in completion.result |
There was a problem hiding this comment.
result = orchestrator.raise_if_exception(completion)
| completion = self.mgr.list_daemons(daemon_type='nfs') | ||
| self.mgr._orchestrator_wait([completion]) | ||
| orchestrator.raise_if_exception(completion) |
There was a problem hiding this comment.
nfs_daemon_ls = orchestrator.raise_if_exception(completion)
| self.mgr._orchestrator_wait([completion]) | ||
| orchestrator.raise_if_exception(completion) | ||
| host_ip = [] | ||
| # Here completion.result is a list DaemonDescription objects |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Greatly simplify the orchestrator interface Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
cd5436c to
be5bd09
Compare
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Fixes: f69abe6 Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
be5bd09 to
0f22f24
Compare
varshar16
left a comment
There was a problem hiding this comment.
Looks good but follow-up PR is required for some of the changes.

Only Rook's
create_osdfunction used the old interface. Everything else was redundant by now.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox