Skip to content

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

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

mgr/cephadm: fix call to cephadm for daemon restarts etc#36338
sebastian-philipp merged 2 commits intoceph:masterfrom
pcuzner:fix-daemon-actions

Conversation

@pcuzner
Copy link
Contributor

@pcuzner pcuzner commented Jul 29, 2020

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 pcuzner@redhat.com

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 <pcuzner@redhat.com>
@pcuzner pcuzner requested a review from a team as a code owner July 29, 2020 04:02
@sebastian-philipp
Copy link
Contributor

sebastian-philipp commented Jul 29, 2020

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.

Copy link
Contributor

@varshar16 varshar16 left a comment

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 <pcuzner@redhat.com>
@pcuzner
Copy link
Contributor Author

pcuzner commented Jul 29, 2020

added test covering stop/start and restart

Copy link
Contributor

@mgfritch mgfritch left a comment

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
Contributor

varshar16 added a commit to ceph/ceph-ci that referenced this pull request Jul 31, 2020
Signed-off-by: Varsha Rao <varao@redhat.com>
@sebastian-philipp
Copy link
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