Project

General

Profile

Bug #26994

test_module_commands (tasks.mgr.test_module_selftest.TestModuleSelftest) fails

Added by Kefu Chai 12 months ago. Updated 12 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
08/22/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:

Description

in https://github.com/ceph/ceph/pull/23558/commits/00223d2364b5a6cc32eb5f83f5a642b5aef2c946 , hello is used for testing errno.EOPNOTSUPP return code. but EINVAL is returned in the test.


2018-08-21T16:15:10.700 INFO:teuthology.orchestra.run.mira022.stderr:no valid command found; 10 closest matches:
2018-08-21T16:15:10.701 INFO:teuthology.orchestra.run.mira022.stderr:osd erasure-code-profile ls
2018-08-21T16:15:10.701 INFO:teuthology.orchestra.run.mira022.stderr:osd erasure-code-profile rm <name>
2018-08-21T16:15:10.701 INFO:teuthology.orchestra.run.mira022.stderr:osd erasure-code-profile get <name>
2018-08-21T16:15:10.701 INFO:teuthology.orchestra.run.mira022.stderr:osd erasure-code-profile set <name> {<profile> [<profile>...]}
2018-08-21T16:15:10.701 INFO:teuthology.orchestra.run.mira022.stderr:osd unpause
2018-08-21T16:15:10.701 INFO:teuthology.orchestra.run.mira022.stderr:osd pause
2018-08-21T16:15:10.701 INFO:teuthology.orchestra.run.mira022.stderr:osd set-require-min-compat-client <version> {--yes-i-really-mean-it}
2018-08-21T16:15:10.702 INFO:teuthology.orchestra.run.mira022.stderr:osd get-require-min-compat-client
2018-08-21T16:15:10.702 INFO:teuthology.orchestra.run.mira022.stderr:osd set-nearfull-ratio <float[0.0-1.0]>
2018-08-21T16:15:10.702 INFO:teuthology.orchestra.run.mira022.stderr:osd set-backfillfull-ratio <float[0.0-1.0]>
2018-08-21T16:15:10.702 INFO:teuthology.orchestra.run.mira022.stderr:Error EINVAL: invalid command
...
2018-08-21T16:15:10.713 INFO:tasks.cephfs_test_runner:test_module_commands (tasks.mgr.test_module_selftest.TestModuleSelftest) ... FAIL
...
2018-08-21T16:15:12.076 INFO:tasks.cephfs_test_runner:FAIL: test_module_commands (tasks.mgr.test_module_selftest.TestModuleSelftest)
2018-08-21T16:15:12.076 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2018-08-21T16:15:12.076 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2018-08-21T16:15:12.076 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-kefu-testing-2018-08-21-1839/qa/tasks/mgr/test_mod
ule_selftest.py", line 244, in test_module_commands
2018-08-21T16:15:12.076 INFO:tasks.cephfs_test_runner:    self.assertEqual(exc_raised.exception.exitstatus, errno.EOPNOTSUPP)
2018-08-21T16:15:12.076 INFO:tasks.cephfs_test_runner:AssertionError: 22 != 95

http://pulpito.ceph.com/kchai-2018-08-21_15:56:38-rados-wip-kefu-testing-2018-08-21-1839-distro-basic-mira/2932436/

History

#1 Updated by Kefu Chai 12 months ago

  • Description updated (diff)

#2 Updated by Kefu Chai 12 months ago

  • Description updated (diff)

#3 Updated by Noah Watkins 12 months ago

I can't reproduce this... it is as if the monitor has not received a summary of commands from the manager at the the time `ceph hello` runs.

#4 Updated by Noah Watkins 12 months ago

The manager logs show all the modules except for `hello` being loaded

nwatkins@teuthology:/a/kchai-2018-08-21_15:56:38-rados-wip-kefu-testing-2018-08-21-1839-distro-basic-mira/2932436/remote/mira022/log$ zgrep "Loading python module" ceph-mgr.x.log.gz | cut -d' ' -f 10 | sort | uniq
'balancer'
'crash'
'dashboard'
'devicehealth'
'influx'
'iostat'
'localpool'
'orchestrator_cli'
'progress'
'prometheus'
'restful'
'rook'
'selftest'
'smart'
'status'
'telegraf'
'telemetry'
'zabbix'

#5 Updated by Noah Watkins 12 months ago

Here's the culprit: hello isn't packaged so it can't announce its commands.

  install(DIRECTORY
    ${CMAKE_CURRENT_SOURCE_DIR}/mgr
    DESTINATION ${CMAKE_INSTALL_PKGLIBDIR}
    REGEX ".*/\\.gitignore" EXCLUDE
    REGEX ".*/hello/.*" EXCLUDE)
  add_subdirectory(mgr)

#6 Updated by Noah Watkins 12 months ago

Something like this will probably fix it

diff --git a/qa/tasks/mgr/test_module_selftest.py b/qa/tasks/mgr/test_module_selftest.py
index fa609f7348..dd3c3123a4 100644
--- a/qa/tasks/mgr/test_module_selftest.py
+++ b/qa/tasks/mgr/test_module_selftest.py
@@ -231,18 +231,18 @@ class TestModuleSelftest(MgrTestCase):
         disabled/failed/recently-enabled modules.
         """ 

-        self._load_module("selftest")
-
         # Calling a command on a disabled module should return the proper
         # error code.
         self.mgr_cluster.mon_manager.raw_cluster_cmd(
-            "mgr", "module", "disable", "status")
+            "mgr", "module", "disable", "selftest")
         with self.assertRaises(CommandFailedError) as exc_raised:
             self.mgr_cluster.mon_manager.raw_cluster_cmd(
-                "osd", "status")
+                "mgr", "self-test", "run")

         self.assertEqual(exc_raised.exception.exitstatus, errno.EOPNOTSUPP)

+        self._load_module("selftest")
+
         # Calling a command that really doesn't exist should give me EINVAL.
         with self.assertRaises(CommandFailedError) as exc_raised:
             self.mgr_cluster.mon_manager.raw_cluster_cmd(

#7 Updated by Kefu Chai 12 months ago

  • Status changed from New to Need Review
  • Assignee set to Noah Watkins

#8 Updated by Kefu Chai 12 months ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF