nagios-charmers team mailing list archive
-
nagios-charmers team
-
Mailing list archive
-
Message #00089
Re: [Merge] ~jhebden/nagios-charm:fix-lp1715086 into nagios-charm:master
Review: Approve
LGTM, +1
Minor nitpicking, see inline comment.
Diff comments:
> diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm
> index 9ba994b..64b7e1d 100755
> --- a/hooks/upgrade-charm
> +++ b/hooks/upgrade-charm
> @@ -225,13 +225,13 @@ def enable_ssl():
>
> def update_config():
> host_context = hookenv.config('nagios_host_context')
> + local_host_name = 'nagios'
> principal_unitname = hookenv.principal_unit()
> # Fallback to using "primary" if it exists.
This is not really true anymore since you're falling back to 'nagios' instead of the 'primary=True' from the relation.
> - if not principal_unitname:
> - for relunit in self[self.name]:
> - if relunit.get('primary', 'False').lower() == 'true':
> - principal_unitname = relunit['__unit__']
> - break
> + if principal_unitname:
> + local_host_name = principal_unitname
> + else:
> + local_host_name = hookenv.local_unit().replace('/', '-')
> template_values = {'nagios_user': nagios_user,
> 'nagios_group': nagios_group,
> 'enable_livestatus': enable_livestatus,
--
https://code.launchpad.net/~jhebden/nagios-charm/+git/nagios-charm/+merge/330199
Your team Nagios Charm developers is subscribed to branch nagios-charm:master.
References