Undefined ceilometer variables for additional services

Bug #1782357 reported by Ondrej Vasko
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Medium
Unassigned

Bug Description

During upgrade from P->Q, the task `Copy ceilometer configuration files` in role `os_ceilometer` fails on undefined variables. This most probably happens also during clean install, more below.

Issue above is occuring when one of following variables are enabled:

* glance_ceilometer_enabled: true
* nova_ceilometer_enabled: true
* cinder_ceilometer_enabled: true
* neutron_ceilometer_enabled: true
* heat_ceilometer_enabled: true
* keystone_ceilometer_enabled: true
* swift_ceilometer_enabled: true

Reason for that is that template `roles/os_ceilometer/templates/ceilometer.conf.j2` defines `messaging_urls`, which use variables defined in glance, nova, cinder, neutron, heat, keystone, swift role `group_vars` but are not defined in `group_vars` of ceilometer service. So ceilometer role does not have access to these variables.

Undefined variables are these (from OSA repository inventory/group_vars/):

* <service>_rabbitmq_telemetry_host_group
* <service>_rabbitmq_telemetry_userid
* <service>_rabbitmq_telemetry_password
* <service>_rabbitmq_telemetry_port
* <service>_rabbitmq_telemetry_vhost

Error in run looks like this:

```
TASK [os_ceilometer : Copy ceilometer configuration files] ********************************************************************************************************************************************************
Monday 09 July 2018 16:48:40 +0200 (0:00:01.719) 1:01:34.232 ***********
fatal: [controller3_ceilometer_central_container-ab785d14]: FAILED! => {"failed": true, "msg": "'glance_rabbitmq_telemetry_host_group' is undefined"}
fatal: [controller2_ceilometer_central_container-24ed1ea2]: FAILED! => {"failed": true, "msg": "'glance_rabbitmq_telemetry_host_group' is undefined"}
fatal: [compute1]: FAILED! => {"failed": true, "msg": "'glance_rabbitmq_telemetry_host_group' is undefined"}
fatal: [compute2]: FAILED! => {"failed": true, "msg": "'glance_rabbitmq_telemetry_host_group' is undefined"}
fatal: [controller1_ceilometer_central_container-35cf8678]: FAILED! => {"failed": true, "msg": "'glance_rabbitmq_telemetry_host_group' is undefined"}
```

Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

Looks valid. I didn't dig in the code, but we've got those issues in the past. Master is quite different due to the rework we've done, but Queens should get fixed in that regard, IMO.

(IIRC: ceilometer_all get ceilometer_rabbitmq_telemetry_* but there is no assurance that glance_rabbtimq_telemetry_ will be set on a ceilometer node, it's only set on a glance node. Whether these are required and are different nodes .... this is a different story...)

Mohammed Naser (mnaser)
Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Gilles Mocellin (gilles-mocellin) wrote :

Hello,

I'm facing that in a Queens deployment.
Any temporary workaround to deal with it ?

My metering-infra_hosts and storage-infra_hosts, image_hosts... are all on the same infrastructure hosts. But ceilometer role doesn't see glance and other services variables.

Revision history for this message
Gilles Mocellin (gilles-mocellin) wrote :

The missing variables are set in group_vars for Rocky release.
Is a backport possible ?

Revision history for this message
Christian Zunker (christian-zunker) wrote :

We hot the bug today. Digging through some irc logs, some more people had the problem:
http://eavesdrop.openstack.org/irclogs/%23openstack-ansible/%23openstack-ansible.2018-03-22.log.html#t2018-03-22T11:10:39
http://eavesdrop.openstack.org/irclogs/%23openstack-ansible/%23openstack-ansible.2018-07-20.log.html#t2018-07-20T09:21:19
Bhujay posted a workaround: http://paste.openstack.org/show/726321/ But that included changing the playbook.
You could also change the ansible command executing the playbook:
openstack-ansible os-ceilometer-install.yml \
-e @../inventory/group_vars/glance_all.yml \
-e @../inventory/group_vars/nova_all.yml \
-e @../inventory/group_vars/cinder_all.yml \
-e @../inventory/group_vars/neutron_all.yml \
-e @../inventory/group_vars/heat_all.yml \
-e @../inventory/group_vars/keystone_all.yml

When you use Swift or Sahara, you would have to add them also.

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

I think, that this problem has been already fixed in master already. So the question is to backport patches to Queens.

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

So queens is not supported anymore, but this patch is in rocky already.
Fix has been introduced with https://review.opendev.org/#/c/607653/

Changed in openstack-ansible:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.