local:
----------
ID: test_subnet_group_creation
Function: boto_rds.subnet_group_present
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/modules/boto_rds.py", line 219, in subnet_group_exists
rds = conn.describe_db_subnet_groups(DBSubnetGroupName=name)
File "/usr/lib/python3/dist-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/lib/python3/dist-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.DBSubnetGroupNotFoundFault: An error occurred (DBSubnetGroupNotFoundFault) when calling the DescribeDBSubnetGroups operation: DB Subnet group 'test_subnet-group' not found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/state.py", line 2180, in call
*cdata["args"], **cdata["kwargs"]
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1249, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/states/boto_rds.py", line 556, in subnet_group_present
name=name, tags=tags, region=region, key=key, keyid=keyid, profile=profile
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/modules/boto_rds.py", line 222, in subnet_group_exists
if "DBSubnetGroupNotFoundFault" in e.message:
AttributeError: 'DBSubnetGroupNotFoundFault' object has no attribute 'message'
Started: 20:06:01.866093
Duration: 234.686 ms
Changes:
Description
boto_rds.subnet_group_presentno longer works on3004(it last worked for me on3000.9with Python 2.7)Setup
Please be as specific as possible and give set-up details.
System boto packages:
test_boto_subnet_group_present.sls:Steps to Reproduce the behavior
Expected behavior
salt state should work as documented and as it did previously
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Based on fugue/credstash#224 (comment), it seems like this is a Python 2 => Python 3 issue.
Potential solution:
This solution works for me, but maybe something like what
parameter_group_exists()has would be better.