Actions
Bug #68420
opensrc: placement argument with special charaters giving python Assertion error
Status:
Fix Under Review
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
-
% 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):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:
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.
Updated by Neeraj Pratap Singh over 1 year ago
- Status changed from New to Fix Under Review
Actions