Skip to content
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: Fix mkdir relative path error #27822

Merged
merged 1 commit into from
May 15, 2019

Conversation

varshar16
Copy link
Contributor

Directory is not created for relative path. This patch fixes it.

Fixes: https://tracker.ceph.com/issues/39507
Signed-off-by: Varsha Rao varao@redhat.com

@varshar16
Copy link
Contributor Author

jenkins test make check arm64

if cwd is '/':
path = to_bytes(cwd + dir_name)
else:
path = to_bytes(cwd + '/' + dir_name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should need to do any of this processing. libcephfs already has a concept of a current working directory and should handle all paths correctly. No preprocessing in cephfs-shell should be required.

The original code is wrong though. It should not be prepending a /. Can you remove that and give it another try? If that works, please remove the other instances of that if you find any.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for explaining. Removing '/' works here. Few other places, where it has been used causes error if removed.

Directory is not created for relative path. This patch fixes it.

Fixes: https://tracker.ceph.com/issues/39507
Signed-off-by: Varsha Rao <varao@redhat.com>
@batrick batrick merged commit e892876 into ceph:master May 15, 2019
batrick added a commit that referenced this pull request May 15, 2019
* refs/pull/27822/head:
	cephfs-shell: Fix mkdir relative path error

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
@varshar16 varshar16 deleted the wip-cephfs-mkdir-error branch July 15, 2019 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants