Project

General

Profile

Actions

Bug #77589

closed
JM KC

dashboard unit test WRT nvmeof cli is consistently failing make check

Bug #77589: dashboard unit test WRT nvmeof cli is consistently failing make check

Added by John Mulligan 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-338-gb4f29b38df
Released In:
Upkeep Timestamp:
2026-08-28T01:41:33+00:00

Description

Make check is consistently failing:

The following tests FAILED:
      7 - run-tox-mgr-dashboard-py3 (Failed)
tests/test_host.py .....................                                 [ 36%]
tests/test_iscsi.py .............................................        [ 42%]
tests/test_nfs.py ..............                                         [ 43%]
tests/test_notification.py ....                                          [ 44%]
tests/test_nvmeof_cli.py ......F

__________ TestNvmeofCLICommand.test_command_return_empty_cmd_result ___________

self = <dashboard.tests.test_nvmeof_cli.TestNvmeofCLICommand object at 0x7a5c3a807250>
base_call_return_none_mock = <MagicMock id='134536497250464'>
sample_command = 'test command'

    def test_command_return_empty_cmd_result(self, base_call_return_none_mock, sample_command):
        result = NvmeofCLICommand.COMMANDS[sample_command].call(MagicMock(), {})
        assert isinstance(result, HandleCommandResult)
>       assert result.retval == 0
E       AssertionError: assert -22 == 0
E        +  where -22 = HandleCommandResult(retval=-22, stdout='', stderr='max() arg is an empty sequence').retval

tests/test_nvmeof_cli.py:119: AssertionError

tests/test_nvmeof_cli.py ......................F

_ TestNvmeofCLICommandSuccessMessage.test_success_message_fn_failure_falls_back_to_default_formatting _

self = <dashboard.tests.test_nvmeof_cli.TestNvmeofCLICommandSuccessMessage object at 0x7a5c3a805330>

    def test_success_message_fn_failure_falls_back_to_default_formatting(self):
        test_cmd = "nvmeof success fn failure fallback" 

        class Model(NamedTuple):
            status: str

        @NvmeofCLICommand(
            test_cmd,
            Model,
            success_message_template="TEMPLATE {nqn}",
            success_message_fn=lambda _f: 1 / 0
        )
        def fn(self, nqn: str):
            return {"status": 0}

        res = NvmeofCLICommand.COMMANDS[test_cmd].call(
            MagicMock(),
            {"format": "plain", "nqn": "subsysB"}
        )
>       assert res.retval == 0
E       AssertionError: assert -22 == 0
E        +  where -22 = HandleCommandResult(retval=-22, stdout='', stderr='max() arg is an empty sequence').retval

tests/test_nvmeof_cli.py:789: AssertionError
------------------------------ Captured log call -------------------------------
WARNING  dashboard.services.nvmeof_cli:nvmeof_cli.py:447 success_message_fn failed for nvmeof success fn failure fallback
Traceback (most recent call last):
  File "/ceph/src/pybind/mgr/dashboard/services/nvmeof_cli.py", line 444, in get_success_msg
    return self._success_message_fn(merged_fields)
  File "/ceph/src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py", line 780, in <lambda>
    success_message_fn=lambda _f: 1 / 0
ZeroDivisionError: division by zero

https://jenkins.ceph.com/job/ceph-pull-requests/186651/console
https://jenkins.ceph.com/job/ceph-pull-requests/186652/console
https://jenkins.ceph.com/job/ceph-pull-requests/186653/console
https://jenkins.ceph.com/job/ceph-pull-requests/186654/console


Related issues 2 (0 open — 2 closed)

Copied to Dashboard - Backport #77608: tentacle: dashboard unit test WRT nvmeof cli is consistently failing make checkResolvedKefu Chai

Actions
Copied to Dashboard - Backport #77609: umbrella: dashboard unit test WRT nvmeof cli is consistently failing make checkResolvedKefu Chai

Actions

JM Updated by John Mulligan 5 months ago Actions #1

  • Description updated (diff)

KC Updated by Kefu Chai 5 months ago Actions #2

  • Assignee changed from Afreen Misbah to Kefu Chai

KC Updated by Kefu Chai 5 months ago Actions #3

  • Status changed from New to Fix Under Review
  • Pull request ID set to 69659

UB Updated by Upkeep Bot 5 months ago Actions #4

  • Status changed from Fix Under Review to Resolved
  • Merge Commit set to b4f29b38dfdd3ee2d83c44aa6ced47f704030d2f
  • Fixed In set to v21.3.0-338-gb4f29b38df
  • Upkeep Timestamp set to 2026-06-23T10:14:22+00:00

KC Updated by Kefu Chai 5 months ago Actions #5

  • Status changed from Resolved to Pending Backport
  • Backport set to tentacle umbrella

UB Updated by Upkeep Bot 5 months ago Actions #6

  • Copied to Backport #77608: tentacle: dashboard unit test WRT nvmeof cli is consistently failing make check added

UB Updated by Upkeep Bot 5 months ago Actions #7

  • Copied to Backport #77609: umbrella: dashboard unit test WRT nvmeof cli is consistently failing make check added

UB Updated by Upkeep Bot 5 months ago Actions #8

  • Tags (freeform) set to backport_processed

KC Updated by Kefu Chai 5 months ago Actions #9

  • Status changed from Pending Backport to Resolved

UB Updated by Upkeep Bot 3 months ago Actions #10

  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-06-23T10:14:22+00:00 to 2026-08-28T01:41:33+00:00
Actions

Also available in: PDF Atom