-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
cephfs-shell: getxattr fail while the xattr's length > 256 #53126
Conversation
@@ -1633,7 +1633,7 @@ class CephFSShell(Cmd): | |||
""" | |||
try: | |||
poutput('{}'.format(cephfs.getxattr(args.path, | |||
to_bytes(args.name)).decode('utf-8'))) | |||
to_bytes(args.name), size=65536).decode('utf-8'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a problem with the xattr name or value ?
Please mention the same as part of the commit message as the description in the tracker is confusing too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is about length of xattr's value.when the value's length >256, report this error.I've read code of function getxattr,default value of size is 256,so I set it to 65536 like linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux also uses MAX_SIZE as power 16, seems ok to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename the commit title to:
cephfs-shell: bump up acceptable xattr value len to 64K
Also, remove the spurious line in the commit message:
Please enter the commit message for your changes. Lines starting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mchangir Title has been modified,thanks for the review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is about length of xattr's value.when the value's length >256, report this error.I've read code of function getxattr,default value of size is 256,so I set it to 65536 like linux.
I think it'll be useful to add this detail to the commit message and to the tracker ticket.
9d11ae1
to
2befcd2
Compare
@neesingh-rh hi,excuse me,Is there a problem with the API test?it reported error as follows,i don't think it caused by my pr. AssertionError: timeout expired in wait_for_all_osds_up |
jenkins test api |
@joscollin api test has a new error,could you help me to take a look? thanks. |
Could you please rebase your branch and force push again? |
Fixes: https://tracker.ceph.com/issues/62545 Signed-off-by: teng jie <tengjie5@asiainfo.com>
It's ok now, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a testcase for this in qa/tasks/cephfs/test_cephfs_shell.py
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CephFS integration tests ran successfully - https://tracker.ceph.com/projects/cephfs/wiki/Main#3-Nov-2023
Fixes: https://tracker.ceph.com/issues/62545
Signed-off-by: teng jie tengjie5@asiainfo.com
Please enter the commit message for your changes. Lines starting
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows