Revision history [back]

click to hide/show revision 1
initial version

Aodh unable to notify scalingpolicy

We have setup openstack ocata metering with ceilometer, gnocchi and aodh with sql backend.

Alarm is getting information as well as chaning state to ok and alarm from insufficient data but aodh throws following error unable to call scalingpolicy

2018-12-28 10:45:57.612 24166 DEBUG aodh.notifier [-] Notifying alarm 51d17032-4f1b-4757-bdad-783924c73cd9 with action SplitResult(scheme=u'trust+http', netloc=u'c18177041c6b4c5a8c1fce69f5c8f89a:delete@openstack-server:8004', path=u'/v1/1017debf6f4147dcb7ea20115c132311/stacks/a1/63338a93-8133-460a-94a6-87ce267656a5/resources/scaleup_policy/signal', query='', fragment='') _handle_action /usr/lib/python2.7/site-packages/aodh/notifier/__init__.py:138 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier [-] Unable to notify alarm 51d17032-4f1b-4757-bdad-783924c73cd9 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier Traceback (most recent call last): 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/aodh/notifier/__init__.py", line 140, in _handle_action 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier notifier.notify(action, alarm_id, alarm_name, severity, 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/aodh/notifier/trust.py", line 45, in notify 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier headers = {'X-Auth-Token': keystone_client.get_auth_token(client)} 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/aodh/keystone_client.py", line 58, in get_auth_token 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier return client.session.auth.get_access(client.session).auth_token 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 136, in get_access 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier self.auth_ref = self.get_auth_ref(session) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 198, in get_auth_ref 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier return self._plugin.get_auth_ref(session, *kwargs) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v3/base.py", line 167, in get_auth_ref 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier authenticated=False, log=False, *rkwargs) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 545, in post 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier return self.request(url, 'POST', *kwargs) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier return wrapped(args, **kwargs) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 445, in request 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier raise exceptions.from_response(resp, method, url) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier BadRequest: Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-1f4c3cd8-3672-4286-990a-15c8f620f01a) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier

Thanks a ton in advance....

Aodh unable to notify scalingpolicy

We have setup openstack ocata metering with ceilometer, gnocchi and aodh with sql backend.

Alarm is getting information as well as chaning state to ok and alarm from insufficient data but aodh throws following error unable to call scalingpolicy

scalingpolicy 2018-12-28 10:45:57.612 24166 DEBUG aodh.notifier [-] Notifying alarm 51d17032-4f1b-4757-bdad-783924c73cd9 with action SplitResult(scheme=u'trust+http', netloc=u'c18177041c6b4c5a8c1fce69f5c8f89a:delete@openstack-server:8004', path=u'/v1/1017debf6f4147dcb7ea20115c132311/stacks/a1/63338a93-8133-460a-94a6-87ce267656a5/resources/scaleup_policy/signal', query='', fragment='') _handle_action /usr/lib/python2.7/site-packages/aodh/notifier/__init__.py:138 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier [-] Unable to notify alarm 51d17032-4f1b-4757-bdad-783924c73cd9 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier Traceback (most recent call last): 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/aodh/notifier/__init__.py", line 140, in _handle_action 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier notifier.notify(action, alarm_id, alarm_name, severity, 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/aodh/notifier/trust.py", line 45, in notify 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier headers = {'X-Auth-Token': keystone_client.get_auth_token(client)} 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/aodh/keystone_client.py", line 58, in get_auth_token 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier return client.session.auth.get_access(client.session).auth_token 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 136, in get_access 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier self.auth_ref = self.get_auth_ref(session) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 198, in get_auth_ref 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier return self._plugin.get_auth_ref(session, *kwargs) **kwargs) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v3/base.py", line 167, in get_auth_ref 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier authenticated=False, log=False, *rkwargs) **rkwargs) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 545, in post 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier return self.request(url, 'POST', *kwargs) **kwargs) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier return wrapped(args, wrapped(*args, **kwargs) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 445, in request 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier raise exceptions.from_response(resp, method, url) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier BadRequest: Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-1f4c3cd8-3672-4286-990a-15c8f620f01a) 2018-12-28 10:45:57.827 24166 ERROR aodh.notifier

Thanks a ton in advance....

advance....

Aodh unable to notify scalingpolicy

We have setup openstack ocata metering with ceilometer, gnocchi and aodh with sql backend.

Alarm is getting information as well as chaning state to ok and alarm from insufficient data but aodh throws following error unable to call scalingpolicy

2018-12-28 10:45:57.612 24166 DEBUG aodh.notifier [-] Notifying alarm 51d17032-4f1b-4757-bdad-783924c73cd9 with action SplitResult(scheme=u'trust+http', netloc=u'c18177041c6b4c5a8c1fce69f5c8f89a:delete@openstack-server:8004', path=u'/v1/1017debf6f4147dcb7ea20115c132311/stacks/a1/63338a93-8133-460a-94a6-87ce267656a5/resources/scaleup_policy/signal', query='', fragment='') _handle_action /usr/lib/python2.7/site-packages/aodh/notifier/__init__.py:138
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier [-] Unable to notify alarm 51d17032-4f1b-4757-bdad-783924c73cd9
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier Traceback (most recent call last):
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/aodh/notifier/__init__.py", line 140, in _handle_action
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     notifier.notify(action, alarm_id, alarm_name, severity,
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/aodh/notifier/trust.py", line 45, in notify
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     headers = {'X-Auth-Token': keystone_client.get_auth_token(client)}
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/aodh/keystone_client.py", line 58, in get_auth_token
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     return client.session.auth.get_access(client.session).auth_token
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 136, in get_access
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     self.auth_ref = self.get_auth_ref(session)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 198, in get_auth_ref
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     return self._plugin.get_auth_ref(session, **kwargs)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v3/base.py", line 167, in get_auth_ref
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     authenticated=False, log=False, **rkwargs)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 545, in post
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     return self.request(url, 'POST', **kwargs)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     return wrapped(*args, **kwargs)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 445, in request
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     raise exceptions.from_response(resp, method, url)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier BadRequest: Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-1f4c3cd8-3672-4286-990a-15c8f620f01a)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier 



heat_template_version: 2016-10-14
description: Example auto scale group, policy and alarm
resources:
  scaleup_group:
    type: OS::Heat::AutoScalingGroup
    properties:
      cooldown: 60
      desired_capacity: 1
      max_size: 3
      min_size: 1
      resource:
        type: OS::Nova::Server
        properties:
          image: 'cirros-0.4.0 '
          metadata: {"metering.server_group": {get_param: "OS::stack_id"}}
          flavor: m1.small
          networks:
            - network: flat_9

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

  scaledown_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: scaleup_group }
      cooldown: 60
      scaling_adjustment: -1

  cpu_alarm_high:
    type: OS::Aodh::GnocchiAggregationByResourcesAlarm
    properties:
      description: Scale up if CPU > 80%
      metric: cpu_util
      aggregation_method: max
      granularity: 60
      evaluation_periods: 1
      threshold: 80
      resource_type: instance
      comparison_operator: gt
      alarm_actions:
        - str_replace:
            template: trust+url
            params:
              url: {get_attr: [scaleup_policy, signal_url]}
      query:
        str_replace:
          template: '{"=": {"server_group": "stack_id"}}'
          params:
            stack_id: {get_param: "OS::stack_id"}

  cpu_alarm_low:
    type: OS::Aodh::GnocchiAggregationByResourcesAlarm
    properties:
      metric: cpu_util
      aggregation_method: max
      granularity: 60
      evaluation_periods: 1
      threshold: 20
      resource_type: instance
      comparison_operator: lt
      alarm_actions:
        - str_replace:
            template: trust+url
            params:
              url: {get_attr: [scaledown_policy, signal_url]}
      query:
        str_replace:
          template: '{"=": {"server_group": "stack_id"}}'
          params:
            stack_id: {get_param: "OS::stack_id"}

outputs:
  scaleup_policy_signal_url:
    value: {get_attr: [scaleup_policy, signal_url]}

  scaledown_policy_signal_url:
    value: {get_attr: [scaledown_policy, signal_url]}

Thanks a ton in advance....

Aodh unable to notify scalingpolicy

We have setup openstack ocata metering with ceilometer, gnocchi and aodh with sql backend.

Alarm is getting information as well as chaning state to ok and alarm from insufficient data but aodh throws following error unable to call scalingpolicy scalingpolicy

2018-12-28 10:45:57.612 24166 DEBUG aodh.notifier [-] Notifying alarm 51d17032-4f1b-4757-bdad-783924c73cd9 with action SplitResult(scheme=u'trust+http', netloc=u'c18177041c6b4c5a8c1fce69f5c8f89a:delete@openstack-server:8004', path=u'/v1/1017debf6f4147dcb7ea20115c132311/stacks/a1/63338a93-8133-460a-94a6-87ce267656a5/resources/scaleup_policy/signal', query='', fragment='') _handle_action /usr/lib/python2.7/site-packages/aodh/notifier/__init__.py:138
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier [-] Unable to notify alarm 51d17032-4f1b-4757-bdad-783924c73cd9
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier Traceback (most recent call last):
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/aodh/notifier/__init__.py", line 140, in _handle_action
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     notifier.notify(action, alarm_id, alarm_name, severity,
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/aodh/notifier/trust.py", line 45, in notify
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     headers = {'X-Auth-Token': keystone_client.get_auth_token(client)}
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/aodh/keystone_client.py", line 58, in get_auth_token
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     return client.session.auth.get_access(client.session).auth_token
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 136, in get_access
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     self.auth_ref = self.get_auth_ref(session)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 198, in get_auth_ref
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     return self._plugin.get_auth_ref(session, **kwargs)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v3/base.py", line 167, in get_auth_ref
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     authenticated=False, log=False, **rkwargs)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 545, in post
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     return self.request(url, 'POST', **kwargs)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     return wrapped(*args, **kwargs)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier   File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 445, in request
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier     raise exceptions.from_response(resp, method, url)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier BadRequest: Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-1f4c3cd8-3672-4286-990a-15c8f620f01a)
2018-12-28 10:45:57.827 24166 ERROR aodh.notifier 



aodh.notifier

Template:

heat_template_version: 2016-10-14
description: Example auto scale group, policy and alarm
resources:
  scaleup_group:
    type: OS::Heat::AutoScalingGroup
    properties:
      cooldown: 60
      desired_capacity: 1
      max_size: 3
      min_size: 1
      resource:
        type: OS::Nova::Server
        properties:
          image: 'cirros-0.4.0 '
          metadata: {"metering.server_group": {get_param: "OS::stack_id"}}
          flavor: m1.small
          networks:
            - network: flat_9

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

  scaledown_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: scaleup_group }
      cooldown: 60
      scaling_adjustment: -1

  cpu_alarm_high:
    type: OS::Aodh::GnocchiAggregationByResourcesAlarm
    properties:
      description: Scale up if CPU > 80%
      metric: cpu_util
      aggregation_method: max
      granularity: 60
      evaluation_periods: 1
      threshold: 80
      resource_type: instance
      comparison_operator: gt
      alarm_actions:
        - str_replace:
            template: trust+url
            params:
              url: {get_attr: [scaleup_policy, signal_url]}
      query:
        str_replace:
          template: '{"=": {"server_group": "stack_id"}}'
          params:
            stack_id: {get_param: "OS::stack_id"}

  cpu_alarm_low:
    type: OS::Aodh::GnocchiAggregationByResourcesAlarm
    properties:
      metric: cpu_util
      aggregation_method: max
      granularity: 60
      evaluation_periods: 1
      threshold: 20
      resource_type: instance
      comparison_operator: lt
      alarm_actions:
        - str_replace:
            template: trust+url
            params:
              url: {get_attr: [scaledown_policy, signal_url]}
      query:
        str_replace:
          template: '{"=": {"server_group": "stack_id"}}'
          params:
            stack_id: {get_param: "OS::stack_id"}

outputs:
  scaleup_policy_signal_url:
    value: {get_attr: [scaleup_policy, signal_url]}

  scaledown_policy_signal_url:
    value: {get_attr: [scaledown_policy, signal_url]}
 

Thanks a ton in advance....

advance....