+++ This bug was initially created as a clone of Bug #1573339 +++ +++ This bug was initially created as a clone of Bug #1558461 +++ Description of problem: When I try to suspend a stack that has alarm in it, it gives me below error. ~~~ 2018-03-19 12:03:14Z [Stack02.cpu_alarm_high]: SUSPEND_FAILED BadRequest: resources.cpu_alarm_high: trust URL cannot contain a trust ID. (HTTP 400) (Request-ID: req-d8a1af95-6176-40e4-81f4-39455ca3476e) 2018-03-19 12:03:14Z [Stack02]: SUSPEND_FAILED Resource SUSPEND failed: BadRequest: resources.cpu_alarm_high: trust URL cannot contain a trust ID. (HTTP 400) (Request-ID: req-d8a1af95-6176-40e4-81f4-39455ca3476e) ~~~ Version-Release number of selected component (if applicable): [stack@instack ~]$ rpm -qa | grep heat heat-cfntools-1.3.0-2.el7ost.noarch openstack-heat-common-7.0.6-1.el7ost.noarch openstack-heat-api-7.0.6-1.el7ost.noarch openstack-tripleo-heat-templates-5.3.3-1.el7ost.noarch puppet-heat-9.5.0-2.el7ost.noarch python-heatclient-1.5.2-1.el7ost.noarch openstack-heat-engine-7.0.6-1.el7ost.noarch openstack-heat-templates-0-0.14.1e6015dgit.el7ost.noarch python-heat-agent-0-0.14.1e6015dgit.el7ost.noarch openstack-heat-api-cfn-7.0.6-1.el7ost.noarch How reproducible: 100% Steps to Reproduce: 1. Create a auto-scaling stack with alarms. Snippet of template: ~~~ .. .. cpu_alarm_high: type: OS::Aodh::GnocchiAggregationByResourcesAlarm properties: description: Scale-up if the average CPU > x% for y minute metric: cpu_util aggregation_method: mean granularity: { get_param: time_range } evaluation_periods: { get_param: cpu_up_period_time } threshold: { get_param: max_cpu } resource_type: instance comparison_operator: gt alarm_actions: - str_replace: template: trust+url params: url: {get_attr: [server_scaleup_policy, signal_url]} query: list_join: - '' - - {'=': {server_group: {get_param: "OS::stack_id"}}} .. .. ~~~ 2. Suspend the stack using the below command. ~~~ openstack stack suspend Stack02 ~~~ 3. Stack suspend fails with below error. [stack@instack ~]$ openstack stack list +--------------------------------------+------------+-----------------+----------------------+--------------+ | ID | Stack Name | Stack Status | Creation Time | Updated Time | +--------------------------------------+------------+-----------------+----------------------+--------------+ | eb15d973-09ce-4af8-8c74-9b86e8ba75df | Stack02 | SUSPEND_FAILED | 2018-03-19T11:30:37Z | None | | db0fff87-0a0a-41fa-9466-6a948dcefabd | Stack01 | RESUME_COMPLETE | 2018-03-19T07:44:44Z | None | +--------------------------------------+------------+-----------------+----------------------+--------------+ [stack@instack ~]$ openstack stack show Stack02 +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | id | eb15d973-09ce-4af8-8c74-9b86e8ba75df | | stack_name | Stack02 | | description | Simple template to deploy a single compute instance | | creation_time | 2018-03-19T11:30:37Z | | updated_time | None | | stack_status | SUSPEND_FAILED | | stack_status_reason | Resource SUSPEND failed: BadRequest: resources.cpu_alarm_high: trust URL cannot contain a trust ID. (HTTP 400) (Request-ID: req-d8a1af95-6176-40e4-81f4-39455ca3476e) | | parameters | OS::project_id: a10de11a32df479d90df59dbadfb5433 | .. .. [stack@instack ~]$ openstack stack event list Stack02 2018-03-19 11:30:38Z [Stack02]: CREATE_IN_PROGRESS Stack CREATE started 2018-03-19 11:30:38Z [Stack02.lb]: CREATE_IN_PROGRESS state changed 2018-03-19 11:30:40Z [Stack02.lb]: CREATE_COMPLETE state changed .. .. 2018-03-19 11:31:29Z [Stack02]: CREATE_COMPLETE Stack CREATE completed successfully 2018-03-19 12:03:14Z [Stack02]: SUSPEND_IN_PROGRESS Stack SUSPEND started 2018-03-19 12:03:14Z [Stack02.monitor]: SUSPEND_IN_PROGRESS state changed 2018-03-19 12:03:14Z [Stack02.monitor]: SUSPEND_COMPLETE state changed 2018-03-19 12:03:14Z [Stack02.cpu_alarm_high]: SUSPEND_IN_PROGRESS state changed 2018-03-19 12:03:14Z [Stack02.cpu_alarm_high]: SUSPEND_FAILED BadRequest: resources.cpu_alarm_high: trust URL cannot contain a trust ID. (HTTP 400) (Request-ID: req-d8a1af95-6176-40e4-81f4-39455ca3476e) 2018-03-19 12:03:14Z [Stack02]: SUSPEND_FAILED Resource SUSPEND failed: BadRequest: resources.cpu_alarm_high: trust URL cannot contain a trust ID. (HTTP 400) (Request-ID: req-d8a1af95-6176-40e4-81f4-39455ca3476e) [root@overcloud-controller-0 ~]# tail /var/log/heat/heat-engine.log -n25 2018-03-19 12:03:14.050 402232 INFO heat.engine.resource [req-1b9c23b5-0ddf-42ed-96c5-e4ea78fb4821 ef7d6e1c5b2c49ae9b31e6976641472d a10de11a32df479d90df59dbadfb5433 - - -] suspending HealthMonitor "monitor" [364b819d-36ec-4566-928a-291e1c842ea0] Stack "Stack02" [eb15d973-09ce-4af8-8c74-9b86e8ba75df] 2018-03-19 12:03:14.101 402232 INFO heat.engine.resource [req-1b9c23b5-0ddf-42ed-96c5-e4ea78fb4821 ef7d6e1c5b2c49ae9b31e6976641472d a10de11a32df479d90df59dbadfb5433 - - -] suspending AodhGnocchiAggregationByResourcesAlarm "cpu_alarm_high" [497fce25-9179-4b21-a833-f735a1a093fc] Stack "Stack02" [eb15d973-09ce-4af8-8c74-9b86e8ba75df] 2018-03-19 12:03:14.938 402232 INFO heat.engine.resource [req-1b9c23b5-0ddf-42ed-96c5-e4ea78fb4821 ef7d6e1c5b2c49ae9b31e6976641472d a10de11a32df479d90df59dbadfb5433 - - -] SUSPEND: AodhGnocchiAggregationByResourcesAlarm "cpu_alarm_high" [497fce25-9179-4b21-a833-f735a1a093fc] Stack "Stack02" [eb15d973-09ce-4af8-8c74-9b86e8ba75df] 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource Traceback (most recent call last): 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 770, in _action_recorder 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource yield 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 872, in _do_action 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource yield self.action_handler_task(action, args=handler_args) 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/scheduler.py", line 336, in wrapper 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource step = next(subtask) 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 817, in action_handler_task 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource handler_data = handler(*args) 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/alarm_base.py", line 202, in handle_suspend 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource alarm_update) 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/aodhclient/v2/alarm.py", line 156, in update 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource data=jsonutils.dumps(alarm)).json() 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/aodhclient/v2/base.py", line 45, in _put 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource return self.client.api.put(*args, **kwargs) 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 196, in put 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource return self.request(url, 'PUT', **kwargs) 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/aodhclient/client.py", line 38, in request 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource raise exceptions.from_response(resp, url, method) 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource BadRequest: trust URL cannot contain a trust ID. (HTTP 400) (Request-ID: req-d8a1af95-6176-40e4-81f4-39455ca3476e) 2018-03-19 12:03:14.938 402232 ERROR heat.engine.resource 2018-03-19 12:03:14.993 402232 INFO heat.engine.stack [req-1b9c23b5-0ddf-42ed-96c5-e4ea78fb4821 ef7d6e1c5b2c49ae9b31e6976641472d a10de11a32df479d90df59dbadfb5433 - - -] Stack SUSPEND FAILED (Stack02): Resource SUSPEND failed: BadRequest: resources.cpu_alarm_high: trust URL cannot contain a trust ID. (HTTP 400) (Request-ID: req-d8a1af95-6176-40e4-81f4-39455ca3476e) Actual results: Suspend fails for stack with alarm all the time. Expected results: Suspend should be successful. --- Additional comment from Zane Bitter on 2018-03-22 10:06:56 EDT --- It looks a lot like this upstream bug: https://bugs.launchpad.net/aodh/+bug/1737186 --- Additional comment from Zane Bitter on 2018-04-24 16:20:53 EDT --- Fix is merged in upstream master (Rocky) and stable/queens.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3783