[Openstack] [openstack-ansible][ceilometer]

Kevin Jackson kevin at linuxservices.co.uk
Mon Aug 14 14:13:20 UTC 2017


I've a weird one that I'm hoping some OpenStack Ansible folk can help with.

I'm installing OpenStack-Ansible 15.1.7 (Ocata) and wanted to include
Telemetry.
So far so good on an install, but I noticed the policy.json files are
screwing up, causing errors.

The containers (API, polling) get the following contents for
/etc/ceilometer/policy.json which cause an error - it's invalid syntax:

{'telemetry:create_samples': u'', 'telemetry:query_sample': u'',
'telemetry:get_resources': u'', 'telemetry:get_meters': u'', 'segregation':
u'rule:context_is_admin', 'telemetry:get_resource': u'', 'context_is_admin':
u'role:admin', 'telemetry:get_sample': u'', 'telemetry:compute_statistics':
u'', 'telemetry:get_samples': u''}

However the policy.json files it is meant to use as  default, if I try and
follow the ansible code chain should be:

{
    "context_is_admin": "role:admin",
    "segregation": "rule:context_is_admin",

    "telemetry:get_samples": "",
    "telemetry:get_sample": "",
    "telemetry:query_sample": "",
    "telemetry:create_samples": "",

    "telemetry:compute_statistics": "",
    "telemetry:get_meters": "",

    "telemetry:get_resource": "",
    "telemetry:get_resources": "",
}

Note different formatting and content. These are pulled in during the
install from the git config locations, e.g.
https://git.openstack.org/cgit/openstack/ceilometer/plain/etc/ceilometer/policy.json.


I can't find out where it is trying to get the incorrectly set
"overrides" from - but it definitely has found some to use:

(Output from an os-ceilometer-install.yml run - you can see it rather
unhelpfully making up its own contents and getting it wrong)

TASK [os_ceilometer : Copy ceilometer configuration files] *********************

Monday 14 August 2017  13:03:24 +0000 (0:00:03.396)       0:00:36.739 *********

<snip>

ok: [controller-01_ceilometer_collector_container-4ca9e11a] =>
(item={u'dest': u'/etc/ceilometer/policy.json-15.1.7',
u'config_overrides': {}, u'config_type': u'json', u'content':
{'telemetry:create_samples': u'', 'telemetry:query_sample': u'',
'telemetry:get_meters': u'', 'telemetry:get_sample': u'',
'telemetry:compute_statistics': u'', 'telemetry:get_samples': u'',
'telemetry:get_resource': u'', 'segregation':
u'rule:context_is_admin', 'context_is_admin': u'role:admin',
'telemetry:get_resources': u''}})
<snip>

I've tried setting my own ceilometer_policy_overrides in
user_variables.yml but it just causes a different error (weirdly and
possibly related in a weird bug kinda way to the next task which is
the polling policy.)


Can someone help work out what is going on?

My configs for ceilometer are simple, nothing deviating from:
https://docs.openstack.org/openstack-ansible-os_ceilometer/latest/
(and using all defaults apart from what I need set as described
below):

I set the hosts in /etc/openstack_deploy/conf.d/ceilometer.yml and any
configuration for backends for ceilometer and what services to enable
ceilometer for in /etc/openstack_deploy/user_variables.yml. Then run
the install.

Note that when I manually copy the policy.json from the git locations,
ceilometer then works, but I obviously need this automated/fixed in a
far better way.

Cheers!

Kev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20170814/709f54a2/attachment.html>


More information about the Openstack mailing list