autoscaling policy fails authentication but heat template works fine without

asked 2015-09-09 08:47:57 -0500

Ashok gravatar image

updated 2015-09-09 16:23:05 -0500

smaffulli gravatar image

Hi all,

I am trying to do auto scaling using heat templates. we written simple template to create the VM. This is successfully executed , VM is up and running.

when we are trying to add one more autoscallingpolicy for scaling in same yaml. its giving authentication error with keystone.

here is yaml template

resources:
  asg:
    type: OS::Heat::AutoScalingGroup
    properties:
      min_size: 1
      max_size: 3
      resource:
        type: OS::Nova::Server
        properties:
          flavor: {get_param: flavor}
          image: {get_param: image}
          key_name: { get_param: key }
          networks:
            - network: { get_param: private_network}
          metadata: {"metering.stack": {get_param: "OS::stack_id"}}

  scale_up_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: asg}
      cooldown: 60
      scaling_adjustment: 1

  cpu_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-up if the average CPU > 50% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: 60
      threshold: 50
      alarm_actions:
      - {get_attr: [scale_up_policy, alarm_url]}
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}

when i remove scale_up_policy: everything works fine and when i add this error is thrown.

can anyone help how to resolve this issue?

also can anyone explain how autoscalling is performed in kilo version?

please find the details of logs from keystone

2015-09-09 10:52:57.710 3048 INFO keystone.common.wsgi [-] POST /auth/tokens?

2015-09-09 10:52:57.761 3048 WARNING keystone.openstack.common.versionutils [-] Deprecated: assignment.get_domain() is deprecated as of Kilo in favor of resource.get_domain() and may be removed in M.
2015-09-09 10:52:57.803 3047 INFO keystone.common.wsgi [-] POST /projects?
2015-09-09 10:53:01.844 3048 INFO keystone.common.wsgi [-] DELETE /tokens f250c2e9e54e448692ce09e731aad424?

2015-09-09 10:53:01.854 3048 WARNING keystone.common.wsgi [-] You are not authorized to perform the requested action: admin_required

2015-09-09 10:53:06.552 3047 INFO keystone.common.wsgi [-] GET /roles?name=heat_stack_user

2015-09-09 10:53:06.568 3049 INFO keystone.common.wsgi [-] POST /users?
2015-09-09 10:53:06.589 3050 INFO keystone.common.wsgi [-] PUT /projects/0c11babcafb84b638cbfe2907636ab7a/users/1c36851227ee4e6cba728024000c3cc2/roles/5d3faedc507a4c7d9e520126827e956a?
2015-09-09 10:53:06.634 3048 INFO keystone.common.wsgi [-] POST /credentials?
2015-09-09 10:53:07.766 3046 INFO keystone.common.wsgi [-] GET /?
2015-09-09 10:53:07.776 3046 INFO keystone.common.wsgi [-] POST /tokens?

2015-09-09 10:53:07.785 3046 WARNING keystone.token.controllers [-] User b729500e0a6c49e8a257de395920a3a2 is unauthorized for tenant demo

2015-09-09 10:53:07.785 3046 WARNING keystone.common.wsgi [-] Authorization failed. The request you have made requires authentication. from 10.0.0.11

2015-09-09 10:53:09.073 3049 INFO keystone.common.wsgi [-] POST /tokens?
edit retag flag offensive close merge delete