Skip to content

mgr/cephadm: fix call to cephadm for daemon restarts etc - #36338

Merged
sebastian-philipp merged 2 commits into
ceph:masterfrom
pcuzner:fix-daemon-actions
Jul 31, 2020
Merged

sebastian-philipp merged 2 commits into
ceph:masterfrom
pcuzner:fix-daemon-actions

Conversation

@pcuzner

@pcuzner pcuzner commented Jul 29, 2020

Copy link
Copy Markdown
Contributor

The call currently passes the daemon_type as the first
parameter - but the function expects the hostname. This
results in failures when attempting daemon restarts through
the ceph orch daemon <daemon_id> command.

Fixes: https://tracker.ceph.com/issues/46740

Signed-off-by: Paul Cuzner [email protected]

The call currently passes the daemon_type as the first
parameter - but the function expects the hostname. This
results in failures when attempting daemon restarts through the ceph orch daemon <action> <daemon_id>
command.

Fixes: https://tracker.ceph.com/issues/46740

Signed-off-by: Paul Cuzner <[email protected]>
@pcuzner
pcuzner requested a review from a team as a code owner July 29, 2020 04:02
@sebastian-philipp

sebastian-philipp commented Jul 29, 2020 •

Copy link
Copy Markdown
Contributor

mind adding a test for this?

diff --git a/qa/tasks/cephadm_cases/test_cli.py b/qa/tasks/cephadm_cases/test_cli.py
index 3d39902a09..97f97bcfc9 100644
--- a/qa/tasks/cephadm_cases/test_cli.py
+++ b/qa/tasks/cephadm_cases/test_cli.py
@@ -43,3 +43,6 @@ class TestCephadmCLI(MgrTestCase):
         self.wait_for_health('CEPHADM_PAUSED', 30)
         self._orch_cmd('resume')
         self.wait_for_health_clear(30)
+
+    def test_daemon_restart(self):
+        self._orch_cmd('daemon', 'restart', 'osd.0')

I don't want to run into this again.

@varshar16 varshar16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it resolves the issue.

Added tests to cove daemon stop/start and restart

Signed-off-by: Paul Cuzner <[email protected]>
@pcuzner

pcuzner commented Jul 29, 2020

Copy link
Copy Markdown
Contributor Author

added test covering stop/start and restart

@mgfritch mgfritch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirm this fixes both a service restart:

$ ceph orch <service_name>

and also a per daemon restart:

$ ceph orch daemon restart <daemon_name>

@sebastian-philipp

Copy link
Copy Markdown
Contributor

varshar16 added a commit to ceph/ceph-ci that referenced this pull request Jul 31, 2020
Signed-off-by: Varsha Rao <[email protected]>
@sebastian-philipp

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants