Azure / Azure/azure-cli-docker

Create storage share fails

Aperta
#39 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Dockerfile
Stelle
40
Fork
42
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When I run the following command on my host system, it is successful:
`azure storage share create --account-name myaccount --account-key mykey myshare`
But when I run a azure-cli Container via `docker run -it microsoft/azure-cli` and then execute the exact same command (with another share name, of course) then it fails:

> info: Executing command storage share create
info: Creating storage file share myshare
error: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:8ce76eed-001a-0134-6355-3b8268000000
Time:2016-11-10T13:19:30.9105340Z
error: Error information has been recorded to /root/.azure/azure.err
error: storage share create command failed

Edit:
Not only "storage share create" fails - every command where I need my STORAGE_ACCOUNT_ACCESS_KEY fails. I also tried putting the key in quotes and set the STORAGE_ACCOUNT_ACCESS_KEY environment variable, but it always fails.

azure.err:
> 2016-11-10T03:26:33.910Z:
{ [StorageError: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:7fe67ede-001a-005b-0857-3b6ce9000000
Time:2016-11-10T13:37:48.2185958Z]
stack: [Getter/Setter],
name: 'StorageError',
message: 'Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:7fe67ede-001a-005b-0857-3b6ce9000000\nTime:2016-11-10T13:37:48.2185958Z',
code: 'AuthenticationFailed',
authenticationerrordetail: 'Request date header too old: \'Thu, 10 Nov 2016 03:26:28 GMT\'',
statusCode: 403,
requestId: '7fe67ede-001a-005b-0857-3b6ce9000000',
__frame:
{ name: '__1',
line: 477,
file: '/usr/lib/node_modules/azure-cli/lib/util/storage.util.js',
prev:
{ name: 'StorageUtil_performStorageOperation__1',
line: 458,
file: '/usr/lib/node_modules/azure-cli/lib/util/storage.util.js',
prev: [Object],
calls: 1,
active: false,
offset: 19,
col: 4 },
calls: 0,
active: false,
offset: 2,
col: 34 },
rawStack: [Getter] }
StorageError: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:7fe67ede-001a-005b-0857-3b6ce9000000
Time:2016-11-10T13:37:48.2185958Z
<<< async stack >>>
at __1 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:479:35)
at StorageUtil_performStorageOperation__1 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:477:5)
at createShare (/usr/lib/node_modules/azure-cli/lib/commands/storage/storage.file.js:347:21)
<<< raw stack >>>
at Function.StorageServiceClient._normalizeError (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/services/storageserviceclient.js:1146:23)
at Object.StorageServiceClient._processResponse (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/services/storageserviceclient.js:706:50)
at Request.processResponseCallback [as _callback] (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/services/storageserviceclient.js:306:37)
at Request.self.callback (/usr/lib/node_modules/azure-cli/node_modules/request/request.js:187:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request. (/usr/lib/node_modules/azure-cli/node_modules/request/request.js:1044:10)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at IncomingMessage. (/usr/lib/node_modules/azure-cli/node_modules/request/request.js:965:12)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Riproduci il problema con il comando docker run documentato e ispeziona il dettaglio di autenticazione di azure.err, in particolare la vecchia data della richiesta. Quindi traccia l’operazione di storage attraverso /usr/lib/node_modules/azure-cli/lib/util/storage.util.js e il punto di ingresso del comando storage file; il lavoro è completato quando i comandi storage che usano la chiave dell’account eseguono correttamente l’autenticazione nel container.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, docker
Ambito
cli, cloud
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.