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

Requesting queue policies failed with azure-cli and Storage Account Explorer #13

Open
nobiehl opened this issue Apr 1, 2018 · 1 comment
Labels
bug Something isn't working queue-storage

Comments

@nobiehl
Copy link

nobiehl commented Apr 1, 2018

Hi,

Currently I’m not able to list queue policies with azure cli and I’m also not able to list queue policies with the Storage Account explorer. But the policies will be created successfully.

I recognized that the storage account emulator is answering the get request different than azurite. There are some magic characters in front of the response and a zero at the end.

Storage Account Emulator 5.3.0.0
Azurite 2.6.5
Azure CLI 2.0.30
Windows 10 + WSL

1. Storage Account Emulator + azure cli

az storage queue create --name test-queue
az storage queue policy list --queue-name test-queue

RESPONSE (Fiddler):

3E
<?xml version="1.0" encoding="utf-8"?><SignedIdentifiers />
0
az storage queue policy create --name read --queue-name test-queue --permissions rp --start 2018-04-01 --expiry 2018-04-02
az storage queue policy list --queue-name test-queue

RESPONSE (Fiddler):

F7
<?xml version="1.0" encoding="utf-8"?><SignedIdentifiers><SignedIdentifier><Id>read</Id><AccessPolicy><Start>2018-04-01T00:00:00.0000000Z</Start><Expiry>2018-04-02T00:00:00.0000000Z</Expiry><Permission>rp</Permission></AccessPolicy></SignedIdentifier></SignedIdentifiers>
0

2. Azurite + azure cli

az storage queue create --name test-queue
az storage queue policy list –queue-name test-queue

RESPONSE (Fiddler):

<?xml version="1.0" encoding="utf-8"?>
<SignedIdentifiers/>
az storage queue policy create --name read --queue-name test-queue --permissions rp --start 2018-04-01 --expiry 2018-04-02
az storage queue policy list --queue-name test-queue

azure cli returns nothing. But the response from azurite looks like:
RESPONSE (Fiddler):

<?xml version="1.0" encoding="utf-8"?>
<SignedIdentifiers>
    <SignedIdentifiers>
        <Id>read</Id>
        <AccessPolicy>
            <Start>2018-04-01</Start>
            <Expiry>2018-04-02</Expiry>
            <Permission>rp</Permission>
        </AccessPolicy>
    </SignedIdentifiers>
</SignedIdentifiers>

As you can see the magic characters in front of the response are not there and the trailing zero is also not available.

Another issue because of the issue above is that azure cli requests the queue policies first, if there are some policies available it merges the policies (old+new) and sends them back. But this is not possible with azurite. All policies will be overwritten by the new one.

Currently I circumventing the issue by using custom scripts for creating queues and policies but for debugging and some test environment related topics I need to use azure cli and the Storage Account Explorer.

Best
nobiehl

@edwin-huber edwin-huber self-assigned this May 25, 2018
@XiaoningLiu XiaoningLiu added the bug Something isn't working label Jul 18, 2018
@edwin-huber
Copy link
Collaborator

This is still on our list, but currently relatively low down in the priorities as we work on fixing all the issues in blob storage.

@edwin-huber edwin-huber removed their assignment Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working queue-storage
Projects
None yet
Development

No branches or pull requests

3 participants