Subnet ID query can fail, leading to NoneType error

Bug #1809340 reported by Tim Van Steenburgh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AWS Integrator Charm
New
Undecided
Unassigned

Bug Description

Opened by johnsca on 2018-08-13 15:26:41+00:00 at https://github.com/juju-solutions/charm-aws-integrator/issues/23

------------------------------------------------------------

I'm not at all clear on how or why this might happen. First pass may be to add additional debug logging.
unit-aws-integrator-0: 09:15:18 ERROR unit.aws-integrator/0.juju-log aws:11: Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-aws-integrator-0/.venv/lib/python3.5/site-packages/charms/reactive/__init__.py", line 72, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-aws-integrator-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 382, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-aws-integrator-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 358, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-aws-integrator-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 180, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-aws-integrator-0/charm/reactive/aws.py", line 74, in handle_requests
    request.instance_subnet_tags)
  File "lib/charms/layer/aws.py", line 155, in tag_instance_subnet
    _apply_tags(region, [subnet_id], tags)
  File "lib/charms/layer/aws.py", line 470, in _apply_tags
    ['--tags'] + tags))
  File "lib/charms/layer/aws.py", line 354, in _aws
    output = subprocess.check_output(cmd, stderr=subprocess.PIPE)
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 693, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1490, in _execute_child
    restore_signals, start_new_session, preexec_fn)
TypeError: Can't convert 'NoneType' object to str implicitly

====================== COMMENTS ============================

Comment created by hatched on 2018-08-13 15:45:03+00:00

It turns out that because JAAS doesn't currently support `juju trust` I was manually adding the access/secret keys. While they keys were valid they were different keys than the ones used to deploy the model. If I used the same keys then the error goes away.

This of course is a non-issue if using `juju trust` but without it, you have to create new keys on aws, deploy the model with those, and set the config with those new credentials.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.