Tacker scale does not work

Asked by futangw on 2017-01-11

Hi,

I've created a very simple scale vnfd, but it failed to scale out/in. The VNF state changed from active->pending scale out -> active, but no more instance was created. do i miss anything?

Here's the VNFD:

tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0

description: sample-tosca-vnfd-scaling

topology_template:
  node_templates:
    VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      capabilities:
        nfv_compute:
          properties:
            num_cpus: 1
            mem_size: 512 MB
            disk_size: 1 GB
      properties:
        image: cirros-0.3.0-x86_64
        mgmt_driver: noop
        availability_zone: nova1
        config: |
          param0: key1
          param1: key2
        user_data_format: RAW

    CP1:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        management: true
        order: 0
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
          node: VL1
        - virtualBinding:
          node: VDU1

    VL1:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: demo
        vendor: nokia

  policies:
    - SP1:
        type: tosca.policies.tacker.Scaling
        properties:
          increment: 1
          cooldown: 60
          min_instances: 1
          max_instances: 8
          default_instances: 2
          targets: VDU1

With this VNFD i can deploy VNF successfully where 2 instance have been created.

But when i run scale, it does not work.
tacker vnf-scale --vnf-name vnfd-scale-vnf --scaling-policy-name SP1 --scaling-type out

2017-01-11 04:32:58.101 16893 DEBUG tacker.vnfm.plugin [req-cf20c782-327f-4d43-902d-48a1a91e8c8b 87e7883ddd0a4b6d82d772f7750e52ee baed394410eb49fe8d4ce02a83ce6879 - - -] Policy SP1 action is started successfully _vnf_policy_action /usr/lib/python2.7/site-packages/tacker/vnfm/plugin.py:580

2017-01-11 04:38:13.807 16893 DEBUG tacker.vnfm.plugin [-] Policy SP1 action is completed successfully _vnf_policy_action_wait /usr/lib/python2.7/site-packages/tacker/vnfm/plugin.py:609

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu heat Edit question
Assignee:
No assignee Edit question
Solved by:
futangw
Solved:
2017-01-16
Last query:
2017-01-16
Last reply:
futangw (futangw) said : #1

Looks there's some problem on heat:

2017-01-11 06:30:58.334 11748 ERROR heat.engine.resources.aws.autoscaling.autoscaling_group [req-75d4f705-801b-4933-98ac-11eabdfde6fe - - - - -] Error in performing scaling adjustment forgroup G1.
2017-01-11 06:30:58.344 11748 ERROR heat.engine.resources.openstack.heat.scaling_policy [req-75d4f705-801b-4933-98ac-11eabdfde6fe - - - - -] Error in performing scaling adjustment with G1_scale_out alarm for group G1.
2017-01-11 06:30:58.353 11748 INFO heat.engine.resource [req-75d4f705-801b-4933-98ac-11eabdfde6fe - - - - -] signal AutoScalingPolicy "G1_scale_out" [a04f439444024763b2c1a389c1b63c77] Stack "tacker.vnfm.infra_drivers.openstack.openstack_OpenStack-aa1249d0-0bc0-4bdc-899b-748119048903" [8b969a56-532b-4768-9534-0a30f8dad312] : resources.662a633trhti: resources.G1.You are not authorized to use OS: : Nova: : Flavor.
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource Traceback (most recent call last):
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 2129, in _handle_signal
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource signal_result = self.handle_signal(details)
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/heat/scaling_policy.py", line 195, in handle_signal
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource self.properties[self.MIN_ADJUSTMENT_STEP])
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/aws/autoscaling/autoscaling_group.py", line 330, in adjust
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource LOG.exception(_LE('Failed sending error notification'))
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource self.force_reraise()
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource six.reraise(self.type_, self.value, self.tb)
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/aws/autoscaling/autoscaling_group.py", line 320, in adjust
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource self.resize(new_capacity)
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/heat/instance_group.py", line 358, in resize
2017-01-11 06:30:58.353 11748 ERROR heat.engine.resource checker(timeout=self.stack.timeout_secs())

........

2017-01-11 06:30:59.248 11810 ERROR heat.engine.resource raise exception.ResourceFailure(message, self, action=self.action)
2017-01-11 06:30:59.248 11810 ERROR heat.engine.resource ResourceFailure: resources.sn3lwd3b6efy: You are not authorized to use OS::Nova::Flavor.
2017-01-11 06:30:59.248 11810 ERROR heat.engine.resource
2017-01-11 06:30:59.294 11810 INFO heat.engine.stack [req-6743b7d0-91d2-4d72-9b63-cfbb99ee5225 - - - - -] Stack UPDATE FAILED (tacker.vnfm.infra_drivers.openstack.openstack_OpenStack-aa1249d0-0bc0-4bdc-899b-748119048903-G1-esxzhpiras5w): Resource CREATE failed: resources.sn3lwd3b6efy: You are not authorized to use OS::Nova::Flavor.
2017-01-11 06:30:59.301 11810 WARNING heat.engine.stack [req-6743b7d0-91d2-4d72-9b63-cfbb99ee5225 - - - - -] Failed to set state of stack tacker.vnfm.infra_drivers.openstack.openstack_OpenStack-aa1249d0-0bc0-4bdc-899b-748119048903-G1-esxzhpiras5w with traversal ID e3f47728-5c55-47f0-a032-395c3f2298e5, to UPDATE_FAILED
2017-01-11 06:30:59.313 11810 INFO heat.engine.check_resource [req-6743b7d0-91d2-4d72-9b63-cfbb99ee5225 - - - - -] Re-trigger resource: (33, True)

futangw (futangw) said : #2

referred to suggestion on http://eavesdrop.openstack.org/irclogs/%23heat/%23heat.2016-06-22.log.html, i used admin role and also update keystone.conf file. but got same error.

futangw (futangw) said : #3

For other reference in case someone encounters this again.
The heat error is due to no permission of operating OS::Nova::Flavor. The role used for scale is heat_stack_owner, so by adding
"resource_types:OS::Nova::Flavor": "role:heat_stack_owner" in the heat policy file, the error was gone.

Then in case see another error: Policy doesn't allow os_compute_api: os-flavor-manage to be performed. (HTTP 403), it's an permission error in nova-api, add or update to "os_compute_api:os-flavor-manage": "" in nova policy file.

just fyi