libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clemens Wolff (JIRA)" <>
Subject [jira] [Created] (LIBCLOUD-1037) Azure Storage driver crashes when used with Azurite
Date Tue, 26 Feb 2019 21:33:00 GMT
Clemens Wolff created LIBCLOUD-1037:

             Summary: Azure Storage driver crashes when used with Azurite
                 Key: LIBCLOUD-1037
             Project: Libcloud
          Issue Type: Bug
            Reporter: Clemens Wolff

There's a popular emulator for Azure Storage called [Azurite|].
I tried to configure libcloud to talk to Azurite like so:

 from import Provider
 from import get_driver

# the secret and account name are defined in the azurite documentation
 key = 'devstoreaccount1'
 secret = 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='

# run azurite via `docker run -e executable=blob -d -t -p 10000:10000 -v arafato/azurite`
 host = 'localhost:10000'

AzureBlobs = get_driver(Provider.AZURE_BLOBS)
 driver = AzureBlobs(key, secret, host=host, secure=False)

Running this script crashes: [Python stacktrace|],
[Azurite stacktrace|].

The root cause is that the AzureBlobsStorageDriver currently assumes that the storage accounts
are always going to be identified via the hostname (e.g.
but Azurite expects the accounts to be identified via a path prefix (e.g. /someaccount).


Fixing this will require a change in the driver to add a prefix to all action URLs if a custom
host is set. I believe it's valuable to make this change since it would enable the Azure Blobs
driver in libcloud to be used more easily for automated integration testing where developers
don't necessarily want to talk to a live Azure Storage account.

This message was sent by Atlassian JIRA

View raw message