resource-list filtering doesn't manage dependencies properly

Bug #1585931 reported by Wenzhi Yu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Thomas Herve

Bug Description

Version
heatclient: 1.2.0
heat: master on 2969f0a49e830e307858ed3c29f44216e4aa780d

Procedure
1. I created a magnum bay with following cmds:
magnum baymodel-create --name k8sbaymodel --image-id fedora-atomic-latest --keypair-id default --external-network-id public --dns-nameserver 8.8.8.8 --flavor-id m1.small --docker-volume-size 5 --network-driver flannel --coe kubernetes

magnum bay-create --name fail_bay --baymodel k8sbaymodel --node-count 3

2. The bay creation failed and I tried to do list the failing resources of the bay with:
heat resource-list fail_bay -f status=FAILED

Expected:
The resources of stack 'fail_bay' will be returned
Actual:
Got an error "ERROR: The specified reference "extrouter_inside" (in kube_minions) is incorrect."

For the details of heat command output please see[1], heat logs are attached.

[1]http://paste.openstack.org/show/505578/

Revision history for this message
Wenzhi Yu (yuywz) wrote :
Revision history for this message
Wenzhi Yu (yuywz) wrote :
Revision history for this message
Thomas Herve (therve) wrote :

It's not clear what's going on exactly. The problem seems to be with the template here: https://github.com/openstack/magnum/blob/master/magnum/templates/kubernetes/kubecluster-fedora-ironic.yaml#L149

That said, Heat shouldn't (and doesn't in my tests) allow to create such a template. There is no reason to go in a FAILED state as it doesn't validate.

Changed in heat:
importance: Undecided → Medium
milestone: none → newton-2
Revision history for this message
Thomas Herve (therve) wrote :

OK I've found the problem.

Changed in heat:
assignee: nobody → Thomas Herve (therve)
milestone: newton-2 → newton-1
summary: - 'heat resource-list STACK -f status=FAILED' does NOT work well
+ resource-list filtering doesn't manage dependencies properly
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/321449

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit de96d030ff0530c906ba1f9525d5881edad605a0
Author: Thomas Herve <email address hidden>
Date: Thu May 26 11:32:20 2016 +0200

    Fix resource loading in resource filtering

    We try to be careful when filtering resources from stack, to not load
    all of them, but unfortunately it breaks as soon as you have
    dependencies with resources that are not returned. To be on the safe
    side we need to load them all and filter them afterwards.

    Change-Id: I399545a6a4fd77d9707505ec9c4058d384877dec
    Closes-Bug: #1585931

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/heat 7.0.0.0b1

This issue was fixed in the openstack/heat 7.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/328585

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Hongbin Lu (<email address hidden>) on branch: master
Review: https://review.openstack.org/328585

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.