Log error. The integer comparison is Python 3 compatible and ripped from
[1]. This will catch incorrectly implemented version comparison
functions.
[1] http://stackoverflow.com/a/3646519/260805
sig4() and query() upon getting a location set to None will attempt
to fetch it from EC2 instance metadata before falling back to
us-east-1.
get_region_from_metadata() uses caching just like creds() does. If
it can't connect to the metadata service, it does not try again.
If a value is successfully retrieved, it is cached so that future
calls are faster.
get_location() will call get_region_from_metadata() if location is
not explicitly set in config.
If sig4() receives an empty location value, it tries to
fetch it using get_region_from_metadata()
These were throwing errors on some platforms:
Traceback (most recent call last):
File "/testing/tests/unit/modules/random_org_test.py", line 296, in test_generateblobs
format='hex'), ret6)
File "/testing/salt/modules/random_org.py", line 743, in generateBlobs
result = _query(api_version=api_version, data=data)
File "/testing/salt/modules/random_org.py", line 125, in _query
log.debug('result {0}'.format(result.text))
AttributeError: 'dict' object has no attribute 'text'
t1.micro no longer supports HVM AMIs. Attempted launch with a t1.micro results in:
[ERROR ] AWS Response Status Code and Error: [400 400 Client Error: Bad Request] {'Errors': {'Error': {'Message': "Non-Windows instances with a virtualization type of 'hvm' are currently not supported for this instance type.", 'Code': 'InvalidParameterCombination'}}, 'RequestID': 'd8d20595-0a17-42ad-9f9a-41cbd009098d'}
pygit2 0.20.3 is the only supported pygit2 for gitfs which doesn't have
this errors submodule. We need to account for it not being there.
Fixes#26245 for the 2015.5 branch
s3fs fileserver and s3 pillar backend both use utils.aws to query
Amazon S3 API. This change avoids setting hard-coded fallback values
and rather forwards None values of key and keyid so that
utils.aws can make the fallback decision.
Fallback features:
* pillar.s3.ext_pillar() allows key and keyid to be empty
* utils.s3.query() does not use utils.iam anymore to retrieve
credentials from EC2 instance meta-data
* utils.s3.query() falls back on setting empty key & keyid to magical
value from utils.aws.IROLE_CODE to let utils.aws.sig4() fill in
credentials from EC2 meta-data.
utils.aws features:
X-Amz-Security-Token header, which is necessary when using temporary
credentials from IAM roles, now properly signed.