Autoscaling alarms are not triggered

Asked by David Fernandes

I have Openstack and Tacker installed at the following versions:

Openstack version: 3.8.1 (Ocata)
Tacker version: 0.9.0

I want to perform autoscaling based on the cpu usage (scale in if cpu_util < 10%, scale out if cpu_util > 50%).

I use the following VNFD file :

tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
description: Demo example
metadata:
 template_name: sample-tosca-vnfd
topology_template:
  node_templates:
    VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      capabilities:
        nfv_compute:
          properties:
            disk_size: 10 GB
            mem_size: 1024 MB
            num_cpus: 1
      properties:
        image: centos
        mgmt_driver: noop
        availability_zone: nova
        metadata: {metering.vnf: SG1}
        key_name: key_pair
    CP1:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        management: true
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL1
        - virtualBinding:
            node: VDU1
    CP2:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL2
        - virtualBinding:
            node: VDU1
    VL1:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: net_mgmt
        vendor: Tacker
    VL2:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: Dev
        vendor: Tacker
  policies:
    - SP1:
        type: tosca.policies.tacker.Scaling
        properties:
          increment: 1
          cooldown: 10
          min_instances: 1
          max_instances: 3
          default_instances: 1
          targets: [VDU1]
    - vdu_cpu_usage_monitoring_policy:
        type: tosca.policies.tacker.Alarming
        triggers:
            vdu_hcpu_usage_scaling_out:
                event_type:
                    type: tosca.events.resource.utilization
                    implementation: ceilometer
                metrics: cpu_util
                condition:
                    threshold: 50
                    constraint: utilization greater_than 50%
                    period: 60
                    evaluations: 1
                    method: avg
                    comparison_operator: gt
                metadata: SG1
                actions: [SP1]
            vdu_lcpu_usage_scaling_in:
                targets: [VDU1]
                event_type:
                    type: tosca.events.resource.utilization
                    implementation: ceilometer
                metrics: cpu_util
                condition:
                    threshold: 10
                    constraint: utilization less_than 10%
                    period: 60
                    evaluations: 1
                    method: avg
                    comparison_operator: lt
                metadata: SG1
                actions: [SP1]

When I launch the VNF creation from the VNFD, the VNF and the alarms are created correctly, but when I stress the CPU of the VNF the alarms are never triggered. The alarms are always at the "Insufficient Data" state, even after several hours :

aodh alarm list
+--------------------------------------+-----------+-----------------------------------------------------------------------------+-------------------+----------+---------+
| alarm_id | type | name | state | severity | enabled |
+--------------------------------------+-----------+-----------------------------------------------------------------------------+-------------------+----------+---------+
| 4bd2fd4e-ff45-4fe9-ab84-633c95095191 | threshold | tacker.vnfm.infra_drivers.openstack.openstack_OpenStack- | insufficient data | low | True |
| | | ef602dbf-f207-4421-91b8-26f6b014d8ca-vdu_hcpu_usage_scaling_out- | | | |
| | | w7kkft25idzk | | | |
| 0bbcefb4-7985-4920-90b4-6dd57e59cea7 | threshold | tacker.vnfm.infra_drivers.openstack.openstack_OpenStack- | insufficient data | low | True |
| | | ef602dbf-f207-4421-91b8-26f6b014d8ca-vdu_lcpu_usage_scaling_in-6thsrcmv6m7i | | | |
+--------------------------------------+-----------+-----------------------------------------------------------------------------+-------------------+----------+---------+

However, there are measures stored in the gnocchi database:

gnocchi measures show 45618bb7-a573-4577-af01-c5cc7d2084b9
+---------------------------+-------------+----------------+
| timestamp | granularity | value |
+---------------------------+-------------+----------------+
| 2018-04-24T13:15:00+00:00 | 300.0 | 0.538792203796 |
| 2018-04-24T13:25:00+00:00 | 300.0 | 0.528332944128 |
| 2018-04-24T13:35:00+00:00 | 300.0 | 99.21666290197 |
| 2018-04-24T13:45:00+00:00 | 300.0 | 99.52666635337 |
| 2018-04-24T13:55:00+00:00 | 300.0 | 99.18333038747 |

Checking /var/log/aodh/evaluator.log I see the following:

2018-04-24 13:34:03.870 32877 INFO aodh.evaluator [-] initiating evaluation cycle on 2 alarms
2018-04-24 13:34:04.090 32877 WARNING aodh.evaluator.threshold [-] This telemetry installation is not configured to support alarm of type 'threshold', they should be disabled or removed.
2018-04-24 13:34:04.095 32877 WARNING aodh.evaluator.threshold [-] This telemetry installation is not configured to support alarm of type 'threshold', they should be disabled or removed.
2018-04-24 13:35:03.850 32877 WARNING oslo_db.sqlalchemy.utils [-] Unique keys not in sort_keys. The sorting order may be unstable.

So I have several questions:

1- Is tacker autoscaling feature compatible with Ceilometer/Gnocchi/Aodh ?

2- Does tacker support other types of alarms apart from “threshold” (i.e. gnocchi_aggregation_by_metrics_threshold, gnocchi_aggregation_by_resources_threshold, etc…)

Any help will be really appreciated, even if it is not related to the 2 questions. Thanks in advance !

Question information

Language:
English Edit question
Status:
Expired
For:
tacker Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cong Phuoc Hoang (hoangphuoc) said :
#1

Hi David,

Tacker has a bug related to moving from Ceilometer to Gnocchi. Currently, you can not use scaling feature. I have 2 patch set to fix this bug, but it is not merged by now.
https://review.openstack.org/#/c/523021/
https://review.openstack.org/#/c/524260/

I will try to finish this issue soon. But if you want to try scaling feature, I can send you email to fix it in this weekend.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.