mgr/cephadm: Also make ssh._reset_con async#42919
Merged
tchaikov merged 4 commits intoceph:masterfrom Sep 6, 2021
Merged
Conversation
Otherwise `conn.close()` might raise: `RuntimeError: Non-thread-safe operation invoked on an event loop other than the current one` Fixes: https://tracker.ceph.com/issues/52407 Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
Also increase mypy coverage by avoiding kwargs Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
nizamial09
approved these changes
Aug 25, 2021
Member
nizamial09
left a comment
There was a problem hiding this comment.
Thank you @sebastian-philipp for the quick fix
mgfritch
approved these changes
Aug 25, 2021
melissa-kun-li
approved these changes
Aug 25, 2021
| def reset_con(self, host: str) -> None: | ||
| self.mgr.event_loop.get_result(self._reset_con(host)) | ||
|
|
||
| def _reset_cons(self) -> None: |
Contributor
There was a problem hiding this comment.
I think you can probably do the same thing to _reset_cons and _reconfig_ssh. It looks like if _reset_cons is called and there are hosts to remove, it will result in the same error as _reset_con was causing before
This was referenced Aug 26, 2021
adk3798
approved these changes
Sep 2, 2021
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Otherwise
conn.close()might raise:RuntimeError: Non-thread-safe operation invoked on an event loop other than the current oneFixes: https://tracker.ceph.com/issues/52407
Signed-off-by: Sebastian Wagner sewagner@redhat.com
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 dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox