[Bug 1368403] Re: juju-deployer traceback AttributeError: 'NoneType' object has no attribute 'get_stat'

Jorge Niedbalski 1368403 at bugs.launchpad.net
Tue Sep 16 16:35:30 UTC 2014


Hello,

I did a trace back on this issue, and this is being raised by an non-
handled exception raised on the jujuclient  package (not part of juju-
deployer). In particular the issue is being raised at this function:

357    def get_state_server(self, data):
 358        """Given a list of state servers, return one that's listening."""
 359        found = False
 360        for s in data['state-servers']:
 361            if self.is_server_available(s):
 362                found = True
 363                break

Since data['state-servers'] has a None value the function just returns
None, and that causes that the 'AttributeError: 'NoneType' object has no
attribute 'get_stat''. Jujuclient code has changed recently to Abstract
out the details of connecting to state servers, and that's the reason
nobody noticed this behavior on earlier versions.

As a side note, the 'data' dictionary comes from a read to the local
environment file ~/.juju/environments/name.jenv.

However, this appears to be  a juju-core bug, since after bootstrap a
fresh environment, there is no 'state-servers' available on the
environment file, but after running a juju status those values seems to
be appended properly, that explains why after a 'juju status' this works
fine.

I don't think we should fix anything on juju-deployer/jujuclient for
now.

I opened a public juju-core reference bug  LP:
https://bugs.launchpad.net/juju-core/+bug/1370149

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1368403

Title:
  juju-deployer traceback AttributeError: 'NoneType' object has no
  attribute 'get_stat'

To manage notifications about this bug go to:
https://bugs.launchpad.net/juju-deployer/+bug/1368403/+subscriptions



More information about the Ubuntu-server-bugs mailing list