Skip to content
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

mgr/dashboard: skip data pool testcase for none-bluestore clusters #21004

Merged
merged 2 commits into from Mar 27, 2018

Conversation

s0nea
Copy link
Member

@s0nea s0nea commented Mar 22, 2018

This pull request enhances the 'test_create_rbd_in_data_pool' test case so that it won't always be skipped. It will only be skipped if the cluster does not support bluestore.

Signed-off-by: Tatjana Dehler tdehler@suse.com

out = self.raw_cluster_cmd('osd', 'metadata', '--format=json')
return json.loads('\n'.join(out.split('\n')[1:]))

def get_osd_metadata(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete this method and rename get_osd_metadata_json to get_osd_metadata?

for osd in osd_metadata:
if osd['osd_objectstore'] != 'bluestore':
cls.bluestore_support = False
break
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s0nea
Copy link
Member Author

s0nea commented Mar 23, 2018

This PR depends on #21008 to run successfully in a vstart environment.

Tatjana Dehler added 2 commits March 23, 2018 11:11
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
Skip the test case 'test_create_rbd_in_data_pool' only if the cluster
does not support bluestore, otherwise run the test. The Ceph mgr
provides the information if the cluster supports bluestore or not, so
the test will be skipped depending on the current cluster.

Signed-off-by: Tatjana Dehler <tdehler@suse.com>
@s0nea s0nea force-pushed the wip-dashboard-skip-datapool-testcase branch from 9e0bfaf to 0751024 Compare March 23, 2018 10:15
@sebastian-philipp
Copy link
Contributor

I'm running into:

======================================================================
ERROR: test_create (tasks.mgr.dashboard.test_rbd.RbdTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sebastian/Repos/ceph/qa/tasks/mgr/dashboard/helper.py", line 23, in decorate
    return func(self, *args, **kwargs)
  File "/home/sebastian/Repos/ceph/qa/tasks/mgr/dashboard/test_rbd.py", line 67, in test_create
    for rbd in get_res['value']:
TypeError: 'NoneType' object is not iterable

----------------------------------------------------------------------
Ran 1 test in 92.931s

FAILED (errors=1)

Seems to be a timing issue where mgr.dashboard.controllers.rbd.Rbd#_rbd_list doesn't finish fast enough.

@sebastian-philipp
Copy link
Contributor

And now I'm running into

======================================================================
FAIL: test_create (tasks.mgr.dashboard.test_rbd.RbdTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sebastian/Repos/ceph/qa/tasks/mgr/dashboard/helper.py", line 23, in decorate
    return func(self, *args, **kwargs)
  File "/home/sebastian/Repos/ceph/qa/tasks/mgr/dashboard/test_rbd.py", line 60, in test_create
    self.assertStatus(201)
  File "/home/sebastian/Repos/ceph/qa/tasks/mgr/dashboard/helper.py", line 119, in assertStatus
    self.assertEqual(self._resp.status_code, status)
AssertionError: 400 != 201

----------------------------------------------------------------------
Ran 1 test in 58.220s

FAILED (failures=1)

@s0nea
Copy link
Member Author

s0nea commented Mar 23, 2018

Strange that this 400 error occurs now and not in the pull request before when the 'test_create' test case was added. This pull request doesn't contain any changes for this test case nor the RBD create functionality.

Copy link
Contributor

@sebastian-philipp sebastian-philipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

Copy link
Contributor

@rjfd rjfd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@LenzGr LenzGr merged commit 914faf2 into ceph:master Mar 27, 2018
@s0nea s0nea deleted the wip-dashboard-skip-datapool-testcase branch October 12, 2018 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants