Bug 1310878 - Heat is unable to delete stack's resources if a 'port' name is given to a resource and not a UUID.
Summary: Heat is unable to delete stack's resources if a 'port' name is given to a res...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ga
: 8.0 (Liberty)
Assignee: Zane Bitter
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On: 1288207
Blocks: 1309814
TreeView+ depends on / blocked
 
Reported: 2016-02-22 21:14 UTC by Zane Bitter
Modified: 2016-04-27 02:56 UTC (History)
12 users (show)

Fixed In Version: openstack-heat-5.0.1-2.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of: 1288207
Environment:
Last Closed: 2016-04-07 21:30:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1536515 0 None None None 2016-02-22 21:14:00 UTC
OpenStack gerrit 272372 0 None None None 2016-02-22 21:14:00 UTC
Red Hat Product Errata RHEA-2016:0603 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 8 Enhancement Advisory 2016-04-08 00:53:53 UTC

Description Zane Bitter 2016-02-22 21:14:00 UTC
+++ This bug was initially created as a clone of Bug #1288207 +++

Description of problem:

The error presents its self as: (curing a stack creation - that ends with a failure) 

BadRequest: Invalid input for port_id. Reason: 'test-stack-instance_port-kz2mdpj4wbpq-port-5etr6o77ho7f' is not a valid UUID.

...

  instance_port:
    type: ../foundations/network_port.yaml
    depends_on: [security_group, tennant_network]
    properties:
      network_name: {get_attr: [tennant_network, name]}
      subnet_id: {get_attr: [tennant_network, subnet_id]}
      security_group_name: {get_attr: [security_group, name]}

...
  instance_floating_ip:
    type: OS::Neutron::FloatingIP
    depends_on: [instance_port]
    properties:
      floating_network: { get_param: external_network }
      port_id: { get_attr: [instance_port, port_name]}  ## Here is where 
                                                         # the failure is

...

The template results in the error above however, upon stack delete the delete never processes. 

Version-Release number of selected component (if applicable): 7.0
How reproducible: 100% 

Additional info:

The only way, currently found to recover is to delete the resources, and then remove the entries in the database by hand, for the stack.

--- Additional comment from Rabi Mishra on 2016-01-14 02:40:18 EST ---

I had a look at the problem.

It seems the typo mentioned above in network_port.yaml is again the issue, when we're trying to show/delete the task.

Server resource uses it for the 'networks' property.

 test_instance:
    depends_on: [ssh_key, tennant_network, security_group, instance_port]
    type: OS::Nova::Server
    properties:
      name: {get_param: instance_name}
      key_name: { get_attr: [ssh_key, key_name] }
      image: {get_param: image_name}
      flavor: {get_param: image_flavor}
      networks:
        - port: {get_attr: [instance_port, port_resource]} >>> here
      availability_zone: {get_param: az}

As 'port_resource' is not resolved and returns a map, 'get_attr' fails, when finding dependencies[1] for the server during delete/show.

[1] https://github.com/openstack/heat/blob/master/heat/engine/resources/openstack/nova/server.py#L953

Comment 3 Amit Ugol 2016-03-22 07:27:27 UTC
managed to reproduce by mistake.
since it happens now when the templates were full of errors, I am reopening on a low severity as there is little chance we will see it later.

Comment 4 Amit Ugol 2016-03-22 07:55:26 UTC
thanks Rabi,
looked the same but not the same issue.

Comment 5 errata-xmlrpc 2016-04-07 21:30:31 UTC
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://rhn.redhat.com/errata/RHEA-2016-0603.html


Note You need to log in before you can comment on or make changes to this bug.