← Back to team overview

nagios-charmers team mailing list archive

[Bug 1715086] Re: upgrade-charm and config-changed fail on Juju < 2.2.2

 

** Merge proposal linked:
   https://code.launchpad.net/~jhebden/nagios-charm/+git/nagios-charm/+merge/330199

** Description changed:

  Due to principal_unitname not being available, the logic to assign a
  hostname for localhost in update_config() falls back to code containing
  a reference to the undefined 'self' variable.
  
  This code was taken from the NRPE helpers file in the NRPE charm, but in
  this invocation, self is not provided as an argument to the calling
- functional, meaning the hooks fail with the following backtrace -
+ functiona, meaning the hooks fail with the following backtrace -
  
-      line 231, in update_config                                                                                                               
-        for relunit in self[self.name]:                                                                                                        
-      NameError: global name 'self' is not defined
+      line 231, in update_config
+        for relunit in self[self.name]:
+      NameError: global name 'self' is not defined

** Tags added: canonical-bootstack

-- 
You received this bug notification because you are a member of Nagios
Charm developers, which is subscribed to Nagios Charm.
https://bugs.launchpad.net/bugs/1715086

Title:
  upgrade-charm and config-changed fail on Juju < 2.2.2

Status in Nagios Charm:
  New

Bug description:
  Due to principal_unitname not being available, the logic to assign a
  hostname for localhost in update_config() falls back to code
  containing a reference to the undefined 'self' variable.

  This code was taken from the NRPE helpers file in the NRPE charm, but
  in this invocation, self is not provided as an argument to the calling
  functiona, meaning the hooks fail with the following backtrace -

       line 231, in update_config
         for relunit in self[self.name]:
       NameError: global name 'self' is not defined

To manage notifications about this bug go to:
https://bugs.launchpad.net/nagios-charm/+bug/1715086/+subscriptions


References