Project

General

Profile

Actions

Bug #68420

closed
NS NS

src: placement argument with special charaters giving python Assertion error

Bug #68420: src: placement argument with special charaters giving python Assertion error

Added by Neeraj Pratap Singh about 2 years ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Category:
Correctness/Safety
Target version:
-
Due date:
% Done:

0%

Source:
Q/A
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Tags (freeform):
Fixed In:
v21.0.0-490-g9dee703bbb
Released In:
v21.2.0~792
Upkeep Timestamp:
2026-10-24T01:44:04+00:00

Description

[root@ceph-amk-nfs-h8x293-node11 c6b9ef66-8107-4622-ba8a-cb809d92e227]# ceph fs volume create vol_1 vo_2
Error EINVAL: Traceback (most recent call last):
  File "/lib/python3.9/site-packages/ceph/deployment/hostspec.py", line 14, in assert_valid_host
    assert p.match(part), 'name component must include only a-z, 0-9, and -'
AssertionError: name component must include only a-z, 0-9, and -

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1907, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/usr/share/ceph/mgr/volumes/module.py", line 601, in handle_command
    return handler(inbuf, cmd)
  File "/usr/share/ceph/mgr/volumes/module.py", line 38, in wrap
    return f(self, inbuf, cmd)
  File "/usr/share/ceph/mgr/volumes/module.py", line 607, in _cmd_fs_volume_create
    return self.vc.create_fs_volume(vol_id, placement)
  File "/usr/share/ceph/mgr/volumes/fs/volume.py", line 120, in create_fs_volume
    return create_volume(self.mgr, volname, placement)
  File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 99, in create_volume
    return create_mds(mgr, volname, placement)
  File "/usr/share/ceph/mgr/volumes/fs/fs_util.py", line 52, in create_mds
    placement=PlacementSpec.from_string(placement))
  File "/lib/python3.9/site-packages/ceph/deployment/service_spec.py", line 544, in from_string
    ps = PlacementSpec(count=count,
  File "/lib/python3.9/site-packages/ceph/deployment/service_spec.py", line 271, in __init__
    self.validate()
  File "/lib/python3.9/site-packages/ceph/deployment/service_spec.py", line 429, in validate
    h.validate()
  File "/lib/python3.9/site-packages/ceph/deployment/service_spec.py", line 140, in validate
    assert_valid_host(self.hostname)
  File "/lib/python3.9/site-packages/ceph/deployment/hostspec.py", line 16, in assert_valid_host
    raise SpecValidationError(str(e) + f'. Got "{name}"')
ceph.deployment.hostspec.SpecValidationError: name component must include only a-z, 0-9, and -. Got "vo_2" 

The stacktrace should not be visible to users.

NS Updated by Neeraj Pratap Singh about 2 years ago Actions #1

  • Pull request ID set to 60156

NS Updated by Neeraj Pratap Singh about 2 years ago Actions #2

  • Status changed from New to Fix Under Review

UB Updated by Upkeep Bot 8 months ago Actions #3

  • Status changed from Fix Under Review to Resolved
  • Merge Commit set to 9dee703bbbeebba38fc7410670a6281310d61f24
  • Fixed In set to v21.0.0-490-g9dee703bbb
  • Upkeep Timestamp set to 2026-04-14T10:33:25+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #4

  • Released In set to v21.2.0~792
  • Upkeep Timestamp changed from 2026-04-14T10:33:25+00:00 to 2026-10-24T01:44:04+00:00
Actions

Also available in: PDF Atom