Project

General

Profile

Bug #50946

mgr/stats: exception ValueError in perf stats

Added by Jos Collin over 1 year ago. Updated about 1 year ago.

Status:
Duplicate
Priority:
Normal
Category:
Administration/Usability
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
pacific,octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
task(easy)
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

'ceph fs perf stats' command excepts for giving strings mistakenly in the rank list.

$ ./bin/ceph fs perf stats --mds_rank=0,aoeu
Error EINVAL: Traceback (most recent call last):
  File "/home/jcollin/review/ceph/src/pybind/mgr/mgr_module.py", line 1335, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/module.py", line 37, in handle_command
    return self.fs_perf_stats.get_perf_data(cmd)
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/fs/perf_stats.py", line 448, in get_perf_data
    filter_spec = self.extract_query_filters(cmd)
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/fs/perf_stats.py", line 441, in extract_query_filters
    mds_ranks = extract_mds_ranks_from_spec(mds_rank_spec)
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/fs/perf_stats.py", line 71, in extract_mds_ranks_from_spec
    raise ValueError("invalid mds filter spec: {}".format(mds_rank_spec))
ValueError: invalid mds filter spec: 0,aoeu
$ ./bin/ceph fs perf stats --mds_rank=0,
$ ./bin/ceph fs perf stats --mds_rank=0, aoeu
Error EINVAL: Traceback (most recent call last):
  File "/home/jcollin/review/ceph/src/pybind/mgr/mgr_module.py", line 1335, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/module.py", line 37, in handle_command
    return self.fs_perf_stats.get_perf_data(cmd)
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/fs/perf_stats.py", line 448, in get_perf_data
    filter_spec = self.extract_query_filters(cmd)
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/fs/perf_stats.py", line 441, in extract_query_filters
    mds_ranks = extract_mds_ranks_from_spec(mds_rank_spec)
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/fs/perf_stats.py", line 72, in extract_mds_ranks_from_spec
    return tuple(int(mds_rank) for mds_rank in match.group(0).split(','))
  File "/home/jcollin/review/ceph/src/pybind/mgr/stats/fs/perf_stats.py", line 72, in <genexpr>
    return tuple(int(mds_rank) for mds_rank in match.group(0).split(','))
ValueError: invalid literal for int() with base 10: ''

History

#1 Updated by Jos Collin over 1 year ago

  • Description updated (diff)

#2 Updated by Venky Shankar about 1 year ago

  • Category set to Administration/Usability
  • Assignee set to Nikhilkumar Shelke
  • Target version set to v17.0.0
  • Backport set to pacific,octopus
  • Labels (FS) task(easy) added

Nikhil, please take this one.

#3 Updated by Nikhilkumar Shelke about 1 year ago

This issue seems duplicate of https://tracker.ceph.com/issues/48473
It will automatically get resolved once https://tracker.ceph.com/issues/48473 will be fixed.

#4 Updated by Jos Collin about 1 year ago

  • Status changed from New to Duplicate

Also available in: Atom PDF