Project

General

Profile

Bug #23265

FAIL: test_get (tasks.mgr.dashboard_v2.test_cluster_configuration.ClusterConfigurationTest)

Added by Ricardo Dias over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
dashboard/general
Target version:
-
Start date:
03/07/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
Yes
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

The dashboard_v2 API tests became broken in master (sha-1 480f078c147792c6bb234ee0c0b5ab9dbead5b05)

2018-03-07 14:52:49,681.681 INFO:tasks.mgr.dashboard_v2.helper:request POST to http://rdias-suse-laptop.rdias.home.pt:7789//api/auth
2018-03-07 14:52:49,957.957 INFO:tasks.mgr.dashboard_v2.helper:request GET to http://rdias-suse-laptop.rdias.home.pt:7789//api/cluster_conf/admin_socket
2018-03-07 14:52:49,977.977 INFO:__main__:test_get (tasks.mgr.dashboard_v2.test_cluster_configuration.ClusterConfigurationTest) ... FAIL
2018-03-07 14:52:49,977.977 INFO:__main__:run args=['./bin/ceph', 'log', 'Ended test tasks.mgr.dashboard_v2.test_cluster_configuration.ClusterConfigurationTest.test_get']
2018-03-07 14:52:49,977.977 INFO:__main__:Running ['./bin/ceph', 'log', 'Ended test tasks.mgr.dashboard_v2.test_cluster_configuration.ClusterConfigurationTest.test_get']
2018-03-07 14:52:51,152.152 INFO:__main__:Stopped test: test_get (tasks.mgr.dashboard_v2.test_cluster_configuration.ClusterConfigurationTest) in 2.902976s
2018-03-07 14:52:51,152.152 INFO:__main__:
2018-03-07 14:52:51,153.153 INFO:__main__:======================================================================
2018-03-07 14:52:51,153.153 INFO:__main__:FAIL: test_get (tasks.mgr.dashboard_v2.test_cluster_configuration.ClusterConfigurationTest)
2018-03-07 14:52:51,153.153 INFO:__main__:----------------------------------------------------------------------
2018-03-07 14:52:51,153.153 INFO:__main__:Traceback (most recent call last):
2018-03-07 14:52:51,153.153 INFO:__main__:  File "/home/rdias/Work/ceph/qa/tasks/mgr/dashboard_v2/helper.py", line 23, in decorate
2018-03-07 14:52:51,153.153 INFO:__main__:    return func(self, *args, **kwargs)
2018-03-07 14:52:51,153.153 INFO:__main__:  File "/home/rdias/Work/ceph/qa/tasks/mgr/dashboard_v2/test_cluster_configuration.py", line 43, in test_get
2018-03-07 14:52:51,153.153 INFO:__main__:    self.assertStatus(200)
2018-03-07 14:52:51,153.153 INFO:__main__:  File "/home/rdias/Work/ceph/qa/tasks/mgr/dashboard_v2/helper.py", line 119, in assertStatus
2018-03-07 14:52:51,153.153 INFO:__main__:    self.assertEqual(self._resp.status_code, status)
2018-03-07 14:52:51,153.153 INFO:__main__:AssertionError: 500 != 200
2018-03-07 14:52:51,153.153 INFO:__main__:
2018-03-07 14:52:51,154.154 INFO:__main__:----------------------------------------------------------------------

History

#1 Updated by Ricardo Dias over 1 year ago

To reproduce this bug:

$ git checkout 480f078c147792c6bb234ee0c0b5ab9dbead5b05
$ cd src/pybind/mgr/dashboard_v2/
$ ./run-backend-api-tests.sh

#3 Updated by Sebastian Wagner over 1 year ago

Some details. Before my commit,

1. md_config_t::config_options expected Option::dump to start an object section. This was no longer the case.
2. Therefore md_config_t::config_options did return a long array of things.
3. Therefore ActivePyModules::get_python("config_objects") returned garbage
4. Therefore @src/pybind/mgr/dashboard_v2/controllers/cluster_configuration.py:ClusterConfiguration#list
raised an `IndexError` when filtering for a level.
5. Therefore dashboard_v2 returned an Internal Server Error.
6. Therefore The test in /ceph/qa/tasks/mgr/dashboard_v2/test_cluster_configuration.py, line 43, in test_get failed.

#4 Updated by Sebastian Wagner over 1 year ago

Turned out, this issue consists of two parts: the first one is described above, and the second one was a rename of "developer" to "dev", which was fixed by removing unused code.

#5 Updated by Ricardo Dias over 1 year ago

Sebastian Wagner wrote:

... the second one was a rename of "developer" to "dev", which was fixed by removing unused code.

I don't understand how the issue is fixed just by removing unused code, the "rename" should break the dashboard frontend, right?

#6 Updated by Sebastian Wagner over 1 year ago

I don't understand how the issue is fixed just by removing unused code,

The test failure was fixed by removing unused code. The bug is still present in the frontend code.

#7 Updated by Kefu Chai over 1 year ago

  • Status changed from New to Resolved

Also available in: Atom PDF