markround/tiller

Tiller 0.9 throws an exception if missing envrionment_json

tonyfinn opened this issue · 3 comments

Hi, we had a common.yaml file where we specified environment_json but never actually used it. Upon upgrading to tiller 0.9.6 from tiller 0.7.3, tiller begun to crash. This turned out to be because of the missing tiller_json environment variable when environment_json was listed as a data source.

/usr/local/share/gems/gems/tiller-0.9.6/lib/tiller/data/environment_json.rb:29:in `global_values': undefined method `<' for nil:NilClass (NoMethodError)
	from /usr/local/share/gems/gems/tiller-0.9.6/bin/tiller:117:in `block in <module:Tiller>'
	from /usr/local/share/gems/gems/tiller-0.9.6/bin/tiller:107:in `each'
	from /usr/local/share/gems/gems/tiller-0.9.6/bin/tiller:107:in `<module:Tiller>'
	from /usr/local/share/gems/gems/tiller-0.9.6/bin/tiller:34:in `<top (required)>'
	from /usr/local/bin/tiller:23:in `load'
	from /usr/local/bin/tiller:23:in `<main>'
tiller v0.9.6 (https://github.com/markround/tiller) <github@markround.com>
Loading config file /etc/tiller/config.d/00-base.yaml
Loading config file /etc/tiller/config.d/01-defaults.yaml
Loading config file /etc/tiller/config.d/02-ingester.yaml
Using common.yaml v2 format configuration file
Using configuration from /etc/tiller
Using plugins from /usr/local/lib/tiller
Using environment awsPerf
Template sources loaded [FileTemplateSource]
Data sources loaded [DefaultsDataSource, FileDataSource, EnvironmentDataSource, EnvironmentJsonDataSource]

This should probably either print a more clear error message, or else treat a missing tiller_json env variable as an empty hash like 0.7 did (maybe with a warning)

Thanks for the bug report, I'll sort that out for you now.

Hi, 0.9.7 has just been pushed, with a fix for your issue (https://github.com/markround/tiller/blob/master/CHANGELOG.md). Could you test please and let me know if it's all working for you now ?

I'm assuming this is fixed for you now, so will close this issue. If you're still having problems, please re-open this issue. Thanks for the bug report!