I have trouble with using juju and maas with Ubuntu.
I I ran command 'juju bootstrap', the following error was shown in /var/log/maas/maas.log:
==================================================================================== ERROR 2012-11-26 09:05:09,041 maas.maasserver ################################ Exception: File not found ################################
159 ERROR 2012-11-26 09:05:09,041 maas.maasserver Traceback (most recent call last):
160 File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
161 response = callback(request, *callback_args, **callback_kwargs)
162 File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func
163 response = func(*args, **kwargs)
164 File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 167, in call
165 result = self.error_handler(e, request, meth, em_format)
166 File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 165, in call
167 result = meth(request, *args, **kwargs)
168 File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 296, in dispatch
169 return function(self, request, *args, **kwargs)
170 File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 945, in get_file
171 MAASAPINotFound: File not found
172
173 ERROR 2012-11-26 09:05:09,343 maas.maasserver ################################ Exception: You are not allowed to start up this node. ##### ###########################
174 ERROR 2012-11-26 09:05:09,343 maas.maasserver Traceback (most recent call last):
175 File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
176 response = callback(request, *callback_args, **callback_kwargs)
177 File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func
178 response = func(*args, **kwargs)
179 File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 167, in call
180 result = self.error_handler(e, request, meth, em_format)
181 File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 165, in call
182 result = meth(request, *args, **kwargs)
183 File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 296, in dispatch
184 return function(self, request, *args, **kwargs)
185 File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 585, in start
186 "You are not allowed to start up this node.")
187 PermissionDenied: You are not allowed to start up this node.
====================================================================================
It seems that there is problem with getting a file in api.py. So, I tried to add some logs like the following, but maasserver can not recognize 'logging' module.
import logging
...
logger = logging.getLogger('maas.maasserver')
logger.info(filename)
Could you let me know
- how to add logs in juju and maasserver python scripts ?
- how to debug maasserver and juju python script more easily ?
Thanks in advance,