Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

autoscalling with yaml templates

Hi all,

autoscaling should happen when cpu utilosation reached to certain threshold say 50%. i have written yaml heat template for the same and when i execute heat stack-create command for template keystone is throwing an error. 3 node architecture for kilo on ubuntu 14.04 http://docs.openstack.org/kilo/install-guide/install/apt/content/neutron-network-node.html--> installation manual followed manual says in orchestration part-> The Orchestration service automatically assigns the heat_stack_user role to users that it creates during stack deploy-ment. By default, this role restricts API operations. To avoid conflicts, do not add this role to users with the heat_stack_owner role. so heat-stack-user is not added to any role. from the beolow logs its taking heat-stack-user as role. 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 015-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?

autoscalling with yaml templates

Hi all,

autoscaling should happen 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 cpu utilosation reached we are trying to certain threshold say 50%. add one more resource 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 have written yaml heat template for the same remove scale_up_policy: everything works fine and when i execute heat stack-create command for template keystone is throwing an error. 3 node architecture for kilo on ubuntu 14.04 http://docs.openstack.org/kilo/install-guide/install/apt/content/neutron-network-node.html--> installation manual followed manual says in orchestration part-> The Orchestration service automatically assigns the heat_stack_user role to users that it creates during stack deploy-ment. By default, this role restricts API operations. To avoid conflicts, do not add this role to users with the heat_stack_owner role. so heat-stack-user is not added to any role. from the beolow logs its taking heat-stack-user as role. 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 015-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?

autoscalling with yaml templates

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 resource 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 015-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?

autoscalling with yaml templates

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 resource 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 015-09-09 10:52:57.710 3048 INFO keystone.common.wsgi [-] POST /auth/tokens? /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? /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 admin_required

2015-09-09 10:53:06.552 3047 INFO keystone.common.wsgi [-] GET /roles?name=heat_stack_user /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? /tokens?

2015-09-09 10:53:07.785 3046 WARNING keystone.token.controllers [-] User b729500e0a6c49e8a257de395920a3a2 is unauthorized for tenant demo 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 10.0.0.11

2015-09-09 10:53:09.073 3049 INFO keystone.common.wsgi [-] POST /tokens?

autoscalling with yaml templates

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"}}

"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

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"}}

"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 015-09-09 keystone

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

/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?

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

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

/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?

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

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

10.0.0.11 2015-09-09 10:53:09.073 3049 INFO keystone.common.wsgi [-] POST /tokens?

/tokens?

autoscalling with yaml templates

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?