cloudtools / cloudtools/stacker
Handle S3 eventual consistency better?
- Lingua principale
- Python
- Stelle
- 707
- Fork
- 162
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Every once in a while, I get an error like this:
```
Traceback (most recent call last):
File "/usr/local/bin/stacker", line 4, in
__import__('pkg_resources').run_script('stacker==1.0.3', 'stacker')
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 748, in run_script
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1524, in run_script
File "/usr/local/lib/python2.7/site-packages/stacker-1.0.3-py2.7.egg/EGG-INFO/scripts/stacker", line 9, in
File "build/bdist.linux-x86_64/egg/stacker/commands/stacker/build.py", line 52, in run
File "build/bdist.linux-x86_64/egg/stacker/actions/base.py", line 127, in execute
File "build/bdist.linux-x86_64/egg/stacker/actions/build.py", line 304, in run
File "build/bdist.linux-x86_64/egg/stacker/plan.py", line 267, in execute
File "build/bdist.linux-x86_64/egg/stacker/plan.py", line 227, in _single_run
File "build/bdist.linux-x86_64/egg/stacker/plan.py", line 74, in run
File "build/bdist.linux-x86_64/egg/stacker/actions/build.py", line 252, in _launch_stack
File "build/bdist.linux-x86_64/egg/stacker/providers/aws/default.py", line 233, in update_stack
File "build/bdist.linux-x86_64/egg/stacker/providers/aws/default.py", line 71, in retry_on_throttling
File "build/bdist.linux-x86_64/egg/stacker/util.py", line 61, in retry_with_backoff
File "/usr/local/lib/python2.7/site-packages/botocore-1.7.17-py2.7.egg/botocore/client.py", line 312, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python2.7/site-packages/botocore-1.7.17-py2.7.egg/botocore/client.py", line 601, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the UpdateStack operation: Template file referenced by https://s3.amazonaws.com//-0480ad10.json does not exist.
```
From http://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html:
> Amazon S3 provides read-after-write consistency for PUTS of new objects in your S3 bucket in all regions with one caveat. The caveat is that if you make a HEAD or GET request to the key name (to find if the object exists) before creating the object, Amazon S3 provides eventual consistency for read-after-write.
So, if I'm understanding that correctly, because a do a `head_object` before uploading the template, it's making that key eventually consistent?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia in stacker/providers/aws/default.py, all’interno di update_stack e retry_on_throttling, quindi segui il flusso di upload e head_object fino a stacker/util.py. Riproduci o caratterizza la race di consistenza di S3 e definisci il completamento come la prevenzione del missing-template error o il recupero affidabile da esso, con la copertura del flusso interessato se il repository la fornisce.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, python
- Ambito
- cloud, devops
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100