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

[Docs] Azurite SAS #2565

Open
gapra-msft opened this issue Feb 5, 2024 · 6 comments
Open

[Docs] Azurite SAS #2565

gapra-msft opened this issue Feb 5, 2024 · 6 comments

Comments

@gapra-msft
Copy link
Member

gapra-msft commented Feb 5, 2024

This is a copy of a request from @InteXX from an issue #1031. Creating a separate issue to track the investigation of the following and documentation.

Firstly, the SAS generator in Azure Storage Explorer generates incorrect URL syntax for a successful azcopy sync session when connecting to Azurite. Granted that's probably beyond the scope of this repo, but users still need to know this fact. The URL that's generated is in the form:

http://<hostname>:10000/devstoreaccount1/data?<SAS>
This is incorrect. The syntax should be instead:

http://devstoreaccount1.<hostname>:10000/data?<SAS>
For this to work the DNS record must exist, e.g. assuming we're hosting Azurite on server5 the hostname will be devstoreaccount1.server5. This can be an entry in the local hosts file as well—as long as the supplied hostname resolves to the machine that's hosting Azurite.

Also, this CLI switch is mandatory:

--from-to=LocalBlob
In the end, my complete successful command was:

azcopy sync "D:\Dev\Data" "http://devstoreaccount1.server5:10000/data/?sv=2018-03-28&spr=https%2Chttp&st=2024-01-25T00%3A26%3A20Z&se=2024-01-26T00%3A26%3A20Z&sr=c&sp=rwl&sig=a0xAslzjcTzZQ55z6RRrNULXGGp2af90xXF42lm3Z2M%3D" --from-to=LocalBlob
That's what is unclear in the documentation, in both online and CLI usage sources... the proper URL syntax to use when connecting locally to Azurite. All of the provided examples assume a remote connection with Azure.

I've searched the online documentation here for any mention of Azurite and I'm coming up empty. Nor am I finding Azurite syntax in the CLI usage text.

These documentation oversights may extend to other azcopy commands as well; I haven't looked. Perhaps a significant overhaul is in order—I'll of course leave that judgment to you and your team.

Let me know if you have any questions about my findings on the matter. Thank you for your consideration.

@InteXX
Copy link

InteXX commented Feb 5, 2024

This looks good, and thank you, but some formatting repair is needed here.

@gapra-msft
Copy link
Member Author

Could you take another look? I adjusted based on your comments.

@InteXX
Copy link

InteXX commented Feb 5, 2024

The CLI switch still needs code formatting, as well as the full successful command syntax.

@InteXX
Copy link

InteXX commented Feb 5, 2024

Looks good... did you see my comment over on the old ticket?

Could it be possible that we're looking in the wrong place, that maybe azcopy sync itself needs the attention?

@gapra-msft
Copy link
Member Author

Thanks for adding that detail, we'll be sure to consider that in this investigation.

@InteXX
Copy link

InteXX commented Feb 5, 2024

Very good, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants