Finally got round to reviewing your updates; Although its more verbose I think I prefer the separation of logic and juju calls from the puppet templates.
The collectd-server looks OK - however I was unable to get the collectd sub to work - here are the errors:
2012-11-12 10:53:53,217 unit:collectd/0: hook.output INFO: Failed to parse template collectd.conf.erb: private method `split' called for nil:NilClass at /var/lib/juju/units/collectd-0/units/collectd-0/charm/manifests/collectd.pp:26
I'm testing this on an openstack cloud for reference.
Hi Clint
Finally got round to reviewing your updates; Although its more verbose I think I prefer the separation of logic and juju calls from the puppet templates.
The collectd-server looks OK - however I was unable to get the collectd sub to work - here are the errors:
1) install error
2012-11-12 10:49:57,326 unit:collectd/2: hook.output INFO: ++ relation-get -r collectd-server:1 security-level collectd-server/0
2012-11-12 10:49:57,519 unit:collectd/2: unit.hook.api DEBUG: Getting relation collectd-server:1 level=
2012-11-12 10:49:57,538 unit:collectd/2: hook.output INFO: + unit_security_
+ '[' -n '' ']'
+ fact-add relation_units ''
2012-11-12 10:49:57,539 unit:collectd/2: hook.output INFO: Fact value is needed
2012-11-12 10:49:57,540 unit:collectd/2: hook.output DEBUG: hook install exited, exit code Traceback (most recent call last): CharmInvocation Error: Error processing '/var/lib/ juju/units/ collectd- 2/units/ collectd- 2/charm/ hooks/install' : exit code 1.
Failure: juju.errors.
2) Hacked in a -n check to drop through the fact-add failing and got:
2012-11-12 10:53:48,818 unit:collectd/0: hook.output INFO: + puppet apply --templatedir= /var/lib/ juju/units/ collectd- 0/units/ collectd- 0/charm/ manifests/ templates manifests/ collectd. pp
2012-11-12 10:53:53,217 unit:collectd/0: hook.output INFO: Failed to parse template collectd.conf.erb: private method `split' called for nil:NilClass at /var/lib/ juju/units/ collectd- 0/units/ collectd- 0/charm/ manifests/ collectd. pp:26
I'm testing this on an openstack cloud for reference.