How to disable and recover ceilometer

The ceilometer is the mandatory component in IBM® Cloud Manager with OpenStack. But if you need to disable ceilometer for some reason, several IBM Cloud Manager with OpenStack functions will be impacted, such as heat auto scaling, PRS, and so on.

About this task

If you decide to disable ceilometer, perform the following steps.

On one controller +n Compute Node environment.

Procedure

  1. Add policy on rabbitmq server.
    Run the following command on the rabbit mq server:
    rabbitmqctl set_policy <policy_name> "notifications.info" '{"message-ttl":0}' --apply-to queues 
  2. Stop the ceilometer services on the controller node:
    systemctl stop openstack-ceilometer-api.service                                                                
    systemctl stop openstack-ceilometer-collector.service  
    systemctl stop openstack-ceilometer-notification.service                                                       
    systemctl stop openstack-ceilometer-central.service                                                       
    systemctl stop openstack-ceilometer-alarm-evaluator.service                                                    
    systemctl stop openstack-ceilometer-alarm-notifier.service
  3. Disable ceilometer services started at boot time:
    systemctl disable openstack-ceilometer-api.service                                                                
    systemctl disable openstack-ceilometer-collector.service
    systemctl disable openstack-ceilometer-notification.service                                        
    systemctl disable openstack-ceilometer-central.service                                                            
    systemctl disable openstack-ceilometer-alarm-evaluator.service                                                    
    systemctl disable openstack-ceilometer-alarm-notifier.service
  4. Stop the ceilometer service on the Compute Node:
    systemctl stop openstack-ceilometer-compute.service
    Note: If you use the KVM hypervisor, run the above CLI command. If you use the vCenter/PowerVC hypervisor, there is no need to do this step.
  5. Disable the ceilometer service started at boot time on the Compute Node:
    systemctl disable openstack-ceilometer-compute.service
    Note: If you use the vCenter/PowerVC hypevisor, there is no need to do this step.
  6. If you use DS to start IBM Cloud Manager with OpenStack services without ceilometer, then first remove it from the list of services and then run the knife command:
    1. Open /opt/ibm/cmwo/cli/config/services.yml file in edit mode and remove every reference that contains ceilometer.

      For example, original line with ceilometer:

      [neutron-openvswitch-agent, openstack-nova-compute, openstack-ceilometer-compute]
      After you remove ceilometer:
      [neutron-openvswitch-agent, openstack-nova-compute]
    Note: If you use the vCenter/PowerVC hypevisor, then this step is not required.
Note: If you upgrade the IBM Cloud Manager with OpenStack to higher version or update a deployed topology, after that you need to redo the step 2 to step 6 to keep the ceilometer disabled. Because the upgrade of IBM Cloud Manager with OpenStack and update topology resets those services that are enabled and started.
On a high availability environment
  1. Add a policy on the rabbitmq server.
    Run the following command on any controller node:
    rabbitmqctl set_policy <policy_name> --priority 9 "notifications.info" '{"message-ttl":0}' --apply-to  queues
  2. Stop the ceilometer services from pacemaker on high availability controllers (running on any controller nodes):
    pcs resource disable ibm-os-telemetry-api  --wait=300 
    pcs resource disable ibm-os-telemetry-collector  --wait=300 
    pcs resource disable ibm-os-telemetry-notification  --wait=300 
    pcs resource disable ibm-os-telemetry-central  --wait=300 
    pcs resource disable ibm-os-telemetry-alarm-evaluator  --wait=300 
    pcs resource disable ibm-os-telemetry-alarm-notifier --wait=300 
    pcs resource disable ibm-os-db2nosql --wait=300
  3. Remove the ceilometer services from pacemaker on high availability controllers (running on any controller node):
    pcs resource unmanage ibm-os-telemetry-api 
    pcs resource unmanage ibm-os-telemetry-collector 
    pcs resource unmanage ibm-os-telemetry-notification 
    pcs resource unmanage ibm-os-telemetry-central 
    pcs resource unmanage ibm-os-telemetry-alarm-evaluator 
    pcs resource unmanage ibm-os-telemetry-alarm-notifier 
    pcs resource unmanage ibm-os-db2nosql
  4. Disable the ceilometer services started at boot time (running on each controller node):
    systemctl disable openstack-ceilometer-api 
    systemctl disable openstack-ceilometer-collector 
    systemctl disable openstack-ceilometer-notification 
    systemctl disable openstack-ceilometer-central
    systemctl disable openstack-ceilometer-alarm-evaluator
    systemctl disable openstack-ceilometer-alarm-notifier 
    systemctl disable db2.nosql
  5. Stop the ceilometer service on the Compute Node (running on each Compute Node):
    systemctl stop openstack-ceilometer-compute
  6. Disable the ceilometer services started at boot time (running on each Compute Node):
    systemctl disable openstack-ceilometer-compute
    Note: If you use the KVM hypervisor, run the above CLI command on the Compute Node. If you use the vCenter hypervisor, there is no need to do this.
Note: If you want to upgrade the IBM Cloud Manager with OpenStack to higher version or update a deployed topology, you need to let the celiometer services re-managed by pacemaker firstly. Perform the following step.
Add the ceilometer services managed by pacemaker on high availability controllers (running on any controller node):
pcs resource manage ibm-os-db2nosql 
pcs resource manage ibm-os-telemetry-api 
pcs resource manage ibm-os-telemetry-collector 
pcs resource manage ibm-os-telemetry-notification 
pcs resource manage ibm-os-telemetry-central 
pcs resource manage ibm-os-telemetry-alarm-evaluator 
pcs resource manage ibm-os-telemetry-alarm-notifier

Then continue the upgrade of IBM Cloud Manager with OpenStack or update the topology process.

Note: If you upgrade the IBM Cloud Manager with OpenStack to higher version or update a deployed topology, after that you must re-do the step 2 to 6 to keep the ceilometer disabled. Because the upgrade of IBM Cloud Manager with OpenStack and update topology will reset those services enabled and started.

How to recover ceilometer

If you followed the steps to disable ceilometer, but for some reason need to recover it, perform the following steps.

On one controller +n Compute Node environment:
  1. Start the ceilometer services on the controller node:
    systemctl start openstack-ceilometer-api.service                                                                
    systemctl start openstack-ceilometer-collector.service  
    systemctl start openstack-ceilometer-notification.service                                                       
    systemctl start openstack-ceilometer-central.service                                                        
    systemctl start openstack-ceilometer-alarm-evaluator.service                                                     
    systemctl start openstack-ceilometer-alarm-notifier.service
  2. Enable the ceilometer services started at boot time:
    systemctl enable openstack-ceilometer-api.service                                           
    systemctl enable openstack-ceilometer-collector.service
    systemctl enable openstack-ceilometer-notification.service                                                
    systemctl enable openstack-ceilometer-centralrvice
    systemctl enable openstack-ceilometer-alarm-evaluator.service                                                    
    systemctl enable openstack-ceilometer-alarm-notifier.service
  3. Start the ceilometer service on the Compute Node:
    systemctl start openstack-ceilometer-compute.service
    Note: If you use the KVM hypervisor, run the above command on the Compute Node. If you use the vCenter/PowerVC hypevisor, there is no need to do this.
  4. Enable the ceilometer service started at boot time on the Compute Node:
    systemctl enable openstack-ceilometer-compute.service
    Note: If you use the KVM hypervisor, run the above command on the Compute Node. If you use the vCenter/PowerVC hypervisor, there is no need to do this.
  5. Delete the policy on the rabbitmq server.
    Run this command on the rabbitqm server:
    rabbitmqctl clear_policy <policy_name>
On a high availability environment
  1. Enable the ceilometer services started at boot time (running on each controller node):
    systemctl enable openstack-ceilometer-api 
    systemctl enable openstack-ceilometer-collector 
    systemctl enable openstack-ceilometer-notification
    systemctl enable openstack-ceilometer-central
    systemctl enable openstack-ceilometer-alarm-evaluator 
    systemctl enable openstack-ceilometer-alarm-notifier 
    systemctl enable db2.nosql
  2. Add the ceilometer services managed by pacemaker on high availability controllers (running on any controller node):
    pcs resource manage ibm-os-db2nosql
    pcs resource manage ibm-os-telemetry-api
    pcs resource manage ibm-os-telemetry-collector
    pcs resource manage ibm-os-telemetry-notification
    pcs resource manage ibm-os-telemetry-central
    pcs resource manage ibm-os-telemetry-alarm-evaluator
    pcs resource manage ibm-os-telemetry-alarm-notifier
  3. Start the ceilometer services on high availability controllers (running on any controller node):
    pcs resource enable ibm-os-db2nosql --wait=300 
    pcs resource enable ibm-os-telemetry-api  --wait=300 
    pcs resource enable ibm-os-telemetry-collector --wait=300 
    pcs resource enable ibm-os-telemetry-notification  --wait=300 
    pcs resource enable ibm-os-telemetry-central  --wait=300 
    pcs resource enable ibm-os-telemetry-alarm-evaluator  --wait=300 
    pcs resource enable ibm-os-telemetry-alarm-notifier --wait=300
  4. Start the ceilometer service on Compute Node (running on each compute node):
    systemctl start openstack-ceilometer-compute
  5. Enable the ceilometer service started at boot time (running on each Compute Node):
    systemctl enable openstack-ceilometer-compute
    Note: If you use the KVM hypervisor, run the above command on the Compute Node. If you use the vCenter/PowerVC hypevisor, there is no need to do this.
  6. Remove the policy on the rabbitmq server. Run the following command on any controller node:
    rabbitmqctl clear_policy <policy_name>