Overcloud stack create fails when disabling heat_api_cfn and heat_api_cloudwatch

Bug #1715083 reported by Jose Luis Franco on 2017-09-05
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
In Progress
Medium
Jose Luis Franco
tripleo
Medium
Jose Luis Franco

Bug Description

Description
===========

While adapting the tripleo-ci environment file worker-config.yaml to properly disable the heat services heat_api_cfn and heat_api_cloudwatch in the resource_registry instead of disabling them via puppet config: https://review.openstack.org/#/c/499182/ it has been found a bug that impacts the overcloud stack creation.

When deploying the stack, one of these disable services is being used and it is not being taken into account if the service is enabled or not. As a result, the following traceback is returned:

http://logs.openstack.org/82/499182/2/check/gate-tripleo-ci-centos-7-3nodes-multinode-nv/d6e674d/logs/subnode-2/var/log/heat/heat-engine.log.txt.gz#_2017-09-04_15_38_09_559

2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource Traceback (most recent call last):
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 831, in _action_recorder
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource yield
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 939, in _do_action
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/scheduler.py", line 334, in wrapper
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource step = next(subtask)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 884, in action_handler_task
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource handler_data = handler(*args)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/nova/server.py", line 803, in handle_create
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource user_data_format=user_data_format)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/clients/os/nova.py", line 399, in build_userdata
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource watch_url = heat_client_plugin.get_watch_server_url()
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/clients/os/heat_plugin.py", line 93, in get_watch_server_url
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource cfn_url = self.get_heat_cfn_url()
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/clients/os/heat_plugin.py", line 71, in get_heat_cfn_url
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource endpoint_type=endpoint_type)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/clients/client_plugin.py", line 111, in url_for
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource url = get_endpoint()
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/clients/client_plugin.py", line 97, in get_endpoint
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource return keystone_session.get_endpoint(**kwargs)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 947, in get_endpoint
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource return auth.get_endpoint(self, **kwargs)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 378, in get_endpoint
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource allow_version_hack=allow_version_hack, **kwargs)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 277, in get_endpoint_data
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource service_name=service_name)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource return wrapped(*args, **kwargs)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/keystoneauth1/access/service_catalog.py", line 407, in endpoint_data_for
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource raise exceptions.EndpointNotFound(msg)
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource EndpointNotFound: publicURL endpoint for cloudformation service not found
2017-09-04 15:38:09.559 27272 ERROR heat.engine.resource

Following the traceback, the source of the issue seems to be at this point:
https://github.com/openstack/heat/blob/master/heat/engine/clients/os/nova.py#L399

Steps to reproduce
==================

1. Deploy the undercloud
2. Deploy the overcloud appending the worker-config.yaml environment file from this patch (cherry-pick it) https://review.openstack.org/#/c/499182/ [-e /home/stack/tripleo-ci/test-environments/worker-config.yaml]
3. Wait for the deployment to finish and run a pingtest:
3.1. Execute the script /home/stack/tripleo-ci/scritps/tripleo.sh --overcloud-pingtest
3.2. Or try to deploy a stack from your own

Changed in tripleo:
status: New → In Progress
assignee: nobody → Jose Luis Franco (jfrancoa)
tags: added: tripleo-heat-templates
Changed in heat:
assignee: nobody → Jose Luis Franco (jfrancoa)
status: New → In Progress
Changed in tripleo:
milestone: none → queens-1
importance: Undecided → Medium
Rico Lin (rico-lin) on 2017-09-28
Changed in heat:
importance: Undecided → Low
importance: Low → Medium
milestone: none → queens-1

Reviewed: https://review.openstack.org/502957
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=d14d9202e3a0d7ce4547d69a6857c8b9f1874a65
Submitter: Jenkins
Branch: master

commit d14d9202e3a0d7ce4547d69a6857c8b9f1874a65
Author: Jose Luis Franco Arza <email address hidden>
Date: Tue Sep 12 13:17:04 2017 +0200

    Avoid cloudwatch endpoint retrieve when disabled

    If openstack-api-cloudwatch service is disabled in a
    deployment these lines of code will provoke a
    traceback when trying to get the cloudwatch
    end-point.

    Change-Id: I7257f79af764cddc16423826143b0d8babfe54e7
    Partial-Bug: #1715083

Changed in tripleo:
milestone: queens-1 → queens-2
Rico Lin (rico-lin) on 2017-10-25
Changed in heat:
milestone: queens-1 → queens-2
Changed in tripleo:
milestone: queens-2 → queens-3
Rico Lin (rico-lin) on 2017-12-06
Changed in heat:
milestone: queens-2 → queens-3
Zane Bitter (zaneb) wrote :

Why was https://review.openstack.org/#/c/514761/ only a partial fix? What is there left to do?

Changed in tripleo:
milestone: queens-3 → queens-rc1
Rico Lin (rico-lin) on 2018-01-29
Changed in heat:
milestone: queens-3 → queens-rc1
Rico Lin (rico-lin) on 2018-02-09
Changed in heat:
milestone: queens-rc1 → rocky-1
Changed in tripleo:
milestone: queens-rc1 → rocky-1
Rico Lin (rico-lin) on 2018-04-20
Changed in heat:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-1 → rocky-2
Jose Luis Franco (jfrancoa) wrote :

So, I rechecked this issue and it seems it has been solved in queens, but it's still happening in pike and ocata's jobs:

https://review.openstack.org/#/c/499182/

Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Changed in tripleo:
milestone: stein-2 → stein-3
Changed in tripleo:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers