Answers4AWS / graffiti-monkey

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

_snapshot_tags_to_be_set and _volume_tags_to_be_set should be optional parameters #26

Closed fsperling closed 8 years ago

fsperling commented 8 years ago

Hi,

when making use of a .yaml file the _snapshot_tags_to_be_set and _volume_tags_to_be_set parameters are mandatory. I only want to propagate existing tags from instances to volumes to snapshots and not add default tags to everything.

A config like: `--- _instance_tags_to_propagate:

_volume_tags_to_propagate:

Fails with: $ graffiti-monkey --region ap-southeast-1 --dryrun --config config.yaml --verbose Traceback (most recent call last): File "/usr/local/bin/graffiti-monkey", line 9, in <module> load_entry_point('graffiti-monkey==1.0.0', 'console_scripts', 'graffiti-monkey')() File "/usr/local/lib/python2.7/dist-packages/graffiti_monkey-1.0.0-py2.7.egg/graffiti_monkey/cli.py", line 211, in run cli.run() File "/usr/local/lib/python2.7/dist-packages/graffiti_monkey-1.0.0-py2.7.egg/graffiti_monkey/cli.py", line 200, in run self.initialize_monkey() File "/usr/local/lib/python2.7/dist-packages/graffiti_monkey-1.0.0-py2.7.egg/graffiti_monkey/cli.py", line 166, in initialize_monkey self.config["_volume_tags_to_be_set"], KeyError: '_volume_tags_to_be_set'

It also seems that the dryrun has a problem. In the dryrun (new) tags are only propagated from instances to volumes but not from volumes to snapshots. I guess in the 2nd run with the snapshots the volumes are still the same (because its a dryrun) and the tags are not there.

Cheers, Felix

fsperling commented 8 years ago

Pull request where _volume_tags_to_be_set and _snapshot_tags_to_be_set are optional https://github.com/Answers4AWS/graffiti-monkey/pull/27

pas256 commented 8 years ago

Merged. Thanks!