Project

General

Profile

Actions

Bug #40729

closed

qa: vstart_runner fails because of string index out of range

Added by Volker Theile almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When running the tasks.mgr.dashboard.test_auth.AuthTest QA test via vstart the following error occurs;

2019-07-11 12:50:40,896.896 INFO:__main__:======================================================================
2019-07-11 12:50:40,896.896 INFO:__main__:ERROR: test_login_without_password (tasks.mgr.dashboard.test_auth.AuthTest)
2019-07-11 12:50:40,896.896 INFO:__main__:----------------------------------------------------------------------
2019-07-11 12:50:40,896.896 INFO:__main__:Traceback (most recent call last):
2019-07-11 12:50:40,896.896 INFO:__main__:  File "/ceph/qa/tasks/mgr/dashboard/test_auth.py", line 32, in test_login_without_password
2019-07-11 12:50:40,897.897 INFO:__main__:    self.create_user('admin2', '', ['administrator'])
2019-07-11 12:50:40,897.897 INFO:__main__:  File "/ceph/qa/tasks/mgr/dashboard/helper.py", line 46, in create_user
2019-07-11 12:50:40,897.897 INFO:__main__:    cls._ceph_cmd(['dashboard', 'ac-user-create', username, password])
2019-07-11 12:50:40,897.897 INFO:__main__:  File "/ceph/qa/tasks/mgr/dashboard/helper.py", line 367, in _ceph_cmd
2019-07-11 12:50:40,897.897 INFO:__main__:    res = cls.mgr_cluster.mon_manager.raw_cluster_cmd(*cmd)
2019-07-11 12:50:40,897.897 INFO:__main__:  File "../qa/tasks/vstart_runner.py", line 700, in raw_cluster_cmd
2019-07-11 12:50:40,897.897 INFO:__main__:    proc = self.controller.run([os.path.join(BIN_PREFIX, "ceph")] + list(args), **kwargs)
2019-07-11 12:50:40,897.897 INFO:__main__:  File "../qa/tasks/vstart_runner.py", line 287, in run
2019-07-11 12:50:40,898.898 INFO:__main__:    args = self._perform_checks_and_return_list_of_args(args, omit_sudo)
2019-07-11 12:50:40,898.898 INFO:__main__:  File "../qa/tasks/vstart_runner.py", line 263, in _perform_checks_and_return_list_of_args
2019-07-11 12:50:40,898.898 INFO:__main__:    if (arg[0] in ['"', "'"] or arg[-1] in ['"', "'"]) and \
2019-07-11 12:50:40,898.898 INFO:__main__:IndexError: string index out of range
2019-07-11 12:50:40,898.898 INFO:__main__:

The problem occurs when LocalCephManager::raw_cluster_cmd() is called with a empty command parameter, e.g.

DashboardTestCase::_ceph_cmd(['dashboard', 'ac-user-create', 'foo', ''])

Actions #1

Updated by Volker Theile almost 5 years ago

  • Description updated (diff)
Actions #2

Updated by Volker Theile almost 5 years ago

  • Description updated (diff)
Actions #3

Updated by Volker Theile almost 5 years ago

  • Description updated (diff)
Actions #4

Updated by Volker Theile almost 5 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 28990
Actions #5

Updated by Sage Weil almost 5 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF