New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qa/mgr/selftest: handle always-on module fall out #23681
Conversation
we cannot enable "status" module anymore -- it's listed as an always-on module. i am copying my comment at https://github.com/ceph/ceph/pull/23558/files#r211944383 for as a reference
|
For this test, we need a module that really can be enabled and disabled (it was added to check that commands properly wait for a newly enabled module to start). We can avoid needing another module if we add a call to "self-test run" immediately after the _load_module("selftest") -- that would provide the same coverage. |
now it failed in
|
@jcsp instead of using |
@tchaikov ill work on this today. sorry for the troubles! |
need a non-always-on module. hello doesn't work because it isn't installed. so switch to selftest. Signed-off-by: Noah Watkins <nwatkins@redhat.com>
@tchaikov i wasn't able to reproduce the assertion error you mentioned above. was that fixed by the switch to "self-test config get" rather than "self-test run"? I was testing with this dotnwat@ea15b62 and it passed tests with
that patch is effectively this patch, but I loaded selftest at the beginning before disabling it to explicitly show we are testing that it is disabled rather than assuming it is enabled. diff --git a/qa/tasks/mgr/test_module_selftest.py b/qa/tasks/mgr/test_module_selftest.py
index 3851a5be8672..30968118f822 100644
--- a/qa/tasks/mgr/test_module_selftest.py
+++ b/qa/tasks/mgr/test_module_selftest.py
@@ -231,15 +231,14 @@ def test_module_commands(self):
disabled/failed/recently-enabled modules.
"""
- self._load_module("selftest")
-
# Calling a command on a disabled module should return the proper
# error code.
+ self._load_module("selftest")
self.mgr_cluster.mon_manager.raw_cluster_cmd(
- "mgr", "module", "disable", "hello")
+ "mgr", "module", "disable", "selftest")
with self.assertRaises(CommandFailedError) as exc_raised:
self.mgr_cluster.mon_manager.raw_cluster_cmd(
- "hello")
+ "mgr", "self-test", "run")
self.assertEqual(exc_raised.exception.exitstatus, errno.EOPNOTSUPP)
@@ -252,9 +251,9 @@ def test_module_commands(self):
# Enabling a module and then immediately using ones of its commands
# should work (#21683)
+ self._load_module("selftest")
self.mgr_cluster.mon_manager.raw_cluster_cmd(
- "mgr", "module", "enable", "status")
- self.mgr_cluster.mon_manager.raw_cluster_cmd("osd", "status")
+ "mgr", "self-test", "config", "get", "testkey")
# Calling a command for a failed module should return the proper
# error code. |
b963c09
to
ea15b62
Compare
@noahdesu yeah. and i cherry-picked your change into this PR. could you help me approve it? or i can do so if you want to create a PR by yourself. |
…disabled command test
Per Noah Watkins,
so we should use "selftest" instead "hello" for disabled command test.
in this change, we make sure "selftest" is disabled and then, try to run
one of its announced command. then re-enable this module, so the
following tests can use this module for sending commands like 'mgr self-test'
Fixes: http://tracker.ceph.com/issues/26994
Signed-off-by: Noah Watkins nwatkins@redhat.com