<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br>Thanks for the quick fix.<div><br><div>Now kwapi-api is working just fine :-D . Now i have errors in ceilometer side:</div><div><br></div><div><div>2013-09-20 12:05:41 INFO [urllib3.connectionpool] Starting new HTTP connection (1): 10.10.10.121</div><div>2013-09-20 12:05:41 DEBUG [urllib3.connectionpool] "GET /v1/probes/ HTTP/1.1" 200 344</div><div>2013-09-20 12:05:41 WARNING [ceilometer.central.manager] Continue after error from kwapi: 'instancemethod' object has no attribute '__getitem__'</div><div>2013-09-20 12:05:41 ERROR [ceilometer.central.manager] 'instancemethod' object has no attribute '__getitem__'</div><div>Traceback (most recent call last):</div><div> File "/usr/lib/python2.7/dist-packages/ceilometer/central/manager.py", line 50, in poll_and_publish</div><div> self.manager)))</div><div> File "/usr/lib/python2.7/dist-packages/ceilometer/energy/kwapi.py", line 82, in get_counters</div><div> for probe in self.iter_probes(manager.keystone):</div><div> File "/usr/lib/python2.7/dist-packages/ceilometer/energy/kwapi.py", line 45, in iter_probes</div><div> probes = message['probes']</div><div>TypeError: 'instancemethod' object has no attribute '__getitem__'</div><div><br></div><div><br></div><div>Do you know something about this error?</div><div><br></div><div><hr id="stopSpelling">Date: Fri, 20 Sep 2013 11:38:36 +0200<br>From: francois.rossigneux@inria.fr<br>To: openstack-dev@lists.openstack.org<br>CC: eltonkevani@hotmail.com<br>Subject: Re: [openstack-dev] [energy] Kwapi Ceilometer plugin<br><br>
Hello,<br>
I fixed the issue.<br>
Thanks.<br>
<br>
<br>
<div class="ecxmoz-cite-prefix">Le 20/09/2013 10:09, Elton Kevani a
écrit :<br>
</div>
<blockquote cite="mid:DUB117-W911B3B9E30F22BEB73A343AD220@phx.gbl">
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Hello,
<div> I'm trying to install Kwapi from source and make it work
with ceilometer. The kwapi-driver,kwapi-forwarder and
kwapi-rrd are working fine<span style="font-size:12pt;"> but
when i try starting kwapi-api i have these errors:</span></div>
<div><span style="font-size:12pt;"><br>
</span></div>
<div>
<div style="font-size:12pt;">2013-09-20 10:04:37.231 19656
INFO kwapi.plugins.api.app [-] Starting API</div>
<div style="font-size:12pt;">2013-09-20 10:04:37.234 19656
INFO kwapi.plugins.api.collector [-] Starting Collector</div>
<div style="font-size:12pt;">2013-09-20 10:04:37.234 19656
INFO kwapi.plugins.api.collector [-] Cleaning collector</div>
<div style="font-size:12pt;">2013-09-20 10:04:37.235 19656
INFO kwapi.plugins.api.collector [-] API listening to
['ipc:///tmp/kwapi-forwarder']</div>
<div style="font-size:12pt;">2013-09-20 10:04:37.236 19656
INFO keystoneclient.middleware.auth_token [-] Starting
keystone auth_token middleware</div>
<div style="font-size:12pt;">2013-09-20 10:04:37.237 19656
INFO keystoneclient.middleware.auth_token [-] Using
/tmp/keystone-signing-xuW4AL as cache directory for signing
certificate</div>
<div style="font-size:12pt;">2013-09-20 10:04:37.240 19656
INFO werkzeug [-] * Running on <a class="ecxmoz-txt-link-freetext" href="http://0.0.0.0:5000/" target="_blank">http://0.0.0.0:5000/</a></div>
<div style="font-size:12pt;">2013-09-20 10:05:25.427 19656
INFO keystoneclient.middleware.auth_token [-] Auth Token
proceeding with requested v2.0 apis</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
ERROR kwapi.plugins.api.app [-] Exception on /v1/probes/
[GET]</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app Traceback (most recent call
last):</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/usr/local/lib/python2.7/dist-packages/flask/app.py", line
1817, in wsgi_app</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app response =
self.full_dispatch_request()</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/usr/local/lib/python2.7/dist-packages/flask/app.py", line
1477, in full_dispatch_request</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app rv =
self.handle_user_exception(e)</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/usr/local/lib/python2.7/dist-packages/flask/app.py", line
1381, in handle_user_exception</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app reraise(exc_type, exc_value,
tb)</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/usr/local/lib/python2.7/dist-packages/flask/app.py", line
1473, in full_dispatch_request</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app rv =
self.preprocess_request()</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/usr/local/lib/python2.7/dist-packages/flask/app.py", line
1666, in preprocess_request</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app rv = func()</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/root/kwapi/kwapi/plugins/api/acl.py", line 49, in check</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app if not
policy.check_is_admin(headers.get('X-Roles',
"").split(",")):</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/root/kwapi/kwapi/policy.py", line 53, in check_is_admin</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app init()</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/root/kwapi/kwapi/policy.py", line 41, in init</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app reload_func=_set_rules)</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/root/kwapi/kwapi/utils.py", line 41, in read_cached_file</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app
reload_func(cache_info['data'])</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app File
"/root/kwapi/kwapi/policy.py", line 46, in _set_rules</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app
policy.set_rules(policy.Rules.load_json(data, default_rule))</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app AttributeError: 'module' object
has no attribute 'set_rules'</div>
<div style="font-size:12pt;">2013-09-20 10:05:25.620 19656
TRACE kwapi.plugins.api.app </div>
<div style="font-size:12pt;">2013-09-20 10:05:25.631 19656
INFO werkzeug [-] 10.10.10.101 - - [20/Sep/2013 10:05:25]
"GET /v1/probes/ HTTP/1.1" 500 -</div>
<div style="font-size:12pt;"><br>
</div>
<div style="font-size:12pt;"><br>
</div>
<div style="font-size:12pt;">My api.conf for kwapi is :</div>
<div style="font-size:12pt;"><br>
</div>
<div style="font-size:12pt;"><br>
</div>
<div>
<div># Kwapi config file</div>
<div><br>
</div>
<div>[DEFAULT]</div>
<div><br>
</div>
<div># Communication</div>
<div>api_port = 5000</div>
<div>probes_endpoint = ipc:///tmp/kwapi-forwarder</div>
<div><br>
</div>
<div># Signature</div>
<div>signature_checking = true</div>
<div>driver_metering_secret = test</div>
<div><br>
</div>
<div># ACL</div>
<div>acl_enabled = true</div>
<div>#acl_auth_url = <a class="ecxmoz-txt-link-freetext" href="http://10.10.10.121:5000/v2.0" target="_blank">http://10.10.10.121:5000/v2.0</a></div>
<div>policy_file = /etc/kwapi/policy.json</div>
<div><br>
</div>
<div># Timers</div>
<div>cleaning_interval = 300</div>
<div><br>
</div>
<div># Log files</div>
<div>log_file = /var/log/kwapi/kwapi-api.log</div>
<div>verbose = true</div>
<div><br>
</div>
<div>[keystone_authtoken]</div>
<div>auth_uri = <a class="ecxmoz-txt-link-freetext" href="http://10.10.10.101:5000/v2.0" target="_blank">http://10.10.10.101:5000/v2.0</a></div>
<div>auth_host = 10.10.10.101</div>
<div>auth_port = 35357</div>
<div>auth_protocol = http</div>
<div>auth_version = v2.0</div>
<div>admin_user = kwapi</div>
<div>admin_password = test</div>
<div>admin_tenant_name = service</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Any suggestions <img src="https://a.gfx.ms/Emoji_1F60A.png" alt="Emoji" class="ecxEmoji$1F60A$AC0 ecxRenderedEmoji" style="font-size:12pt;"><span style="font-size:12pt;">?</span></div>
<div style="font-size:12pt;"><br>
</div>
<div style="font-size:12pt;"><br>
</div>
</div>
</div>
<br>
<fieldset class="ecxmimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
OpenStack-dev mailing list
<a class="ecxmoz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="ecxmoz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote></div></div></div> </div></body>
</html>