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

services/azfile: azfile doesn't work if root starts with / #3647

Closed
Xuanwo opened this issue Nov 22, 2023 · 7 comments
Closed

services/azfile: azfile doesn't work if root starts with / #3647

Xuanwo opened this issue Nov 22, 2023 · 7 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed services/azfile

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Nov 22, 2023

For example, if we set root to /opendal/, azfile will return error:

---- behavior::test_stat_dir ----
test panicked: write must succeed: Unexpected (persistent) at create_dir => failed to create directory: /

Context:
   service: azfile
   path: 33b8a8d5-0213-4787-a5df-04244e9a6b6a/

We should make it work by normalize the root.

@Xuanwo Xuanwo added services/azfile good first issue Good for newcomers help wanted Extra attention is needed labels Nov 22, 2023
@CookiePieWw
Copy link

I'd like to give it a try.

@Xuanwo
Copy link
Member Author

Xuanwo commented Nov 22, 2023

I'd like to give it a try.

Thanks!

@CookiePieWw
Copy link

azfile doesn't work if root starts with /

I found here that azure file storage does not have the 'root'.

We should make it work by normalize the root.

Is it appropriate to remove the first / in path while calling the Azure File APIs of reading and writing?

@Xuanwo
Copy link
Member Author

Xuanwo commented Nov 22, 2023

I found here that azure file storage does not have the 'root'.

root is the concept in opendal that we prepend in all our requests, not related to services

Is it appropriate to remove the first / in path while calling the Azure File APIs of reading and writing?

We already performing this via calling build_abs_path. The root cause need to find out.

@Xuanwo
Copy link
Member Author

Xuanwo commented Nov 23, 2023

This issue seems silently fixed by #3651 and #3652

Not reproduced again.

@CookiePieWw
Copy link

CookiePieWw commented Nov 23, 2023

This issue seems silently fixed by #3651 and #3652

Not reproduced again.

Got it. I'll close the PR. Here are some observations may be useful:

The error message is failed to create directory: / while test_stat_dir. With setting /opendal/ as the root, the failed request sent to azure file storage may be

"https://{accountname}.file.core.windows.net/{sharename}/opendal/?restype=directory"

But before or after the patch mentioned above, the request is actually the same. I think it more likely that the failure is caused by azure file storage REST APIs.

@Xuanwo
Copy link
Member Author

Xuanwo commented Nov 24, 2023

Thanks to @CookiePieWw for the research!

@Xuanwo Xuanwo closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed services/azfile
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants