Answers4AWS / graffiti-monkey

Goes around tagging things
Apache License 2.0
255 stars 88 forks source link

TypeError: 'NoneType' object is not iterable #36

Open PaulCapestany opened 7 years ago

PaulCapestany commented 7 years ago

I just ran graffiti-monkey for the first time, and while all the volumes were tagged appropriately, graffiti-monkey crashed when it came to tagging snapshots with the same tags.

Here's the output from the error:

2016-11-04 00:29:36 [INFO] Completed processing all volumes
2016-11-04 00:29:36 [INFO] Getting list of all snapshots
2016-11-04 00:29:41 [INFO] Found 1415 snapshots
2016-11-04 00:29:41 [INFO] Processing snapshot 1 of 1415 total snapshots
Traceback (most recent call last):
  File "/usr/local/bin/graffiti-monkey", line 11, in <module>
    sys.exit(run())
  File "/usr/local/lib/python2.7/site-packages/graffiti_monkey/cli.py", line 168, in run
    cli.run()
  File "/usr/local/lib/python2.7/site-packages/graffiti_monkey/cli.py", line 158, in run
    self.start_tags_propagation()
  File "/usr/local/lib/python2.7/site-packages/graffiti_monkey/cli.py", line 138, in start_tags_propagation
    self.monkey.propagate_tags()
  File "/usr/local/lib/python2.7/site-packages/graffiti_monkey/core.py", line 71, in propagate_tags
    self.tag_snapshots()
  File "/usr/local/lib/python2.7/site-packages/graffiti_monkey/core.py", line 153, in tag_snapshots
    self.tag_snapshot(snapshot)
  File "/usr/local/lib/python2.7/site-packages/graffiti_monkey/core.py", line 180, in tag_snapshot
    for tag_name in self._volume_tags_to_propagate:
TypeError: 'NoneType' object is not iterable
paulwakeford commented 7 years ago

Could we see your command line and config yaml file?

PaulCapestany commented 7 years ago

@paulwakeford sure thing! I should probably have included them from the get-go, oops…

Command

▸ graffiti-monkey -c ~/.graffiti-monkey.yml

Config YAML file

---
region: us-east-1
_instance_tags_to_propagate:
  - 'host'
  - 'owner'
  - 'role'
  - 'stype'

_volume_tags_to_propagate:

_volume_tags_to_be_set:

_snapshot_tags_to_be_set:

_instance_filter:

_volumes_to_tag:

_snapshots_to_tag: