resource-list filtering does NOT work when 'nested-depth' is specified

Bug #1588130 reported by Wenzhi Yu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Rabi Mishra

Bug Description

Version:
heatclient: 1.2.0
heat: master on 67e6f20967c67daae93d92096195fd2701af6e17

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:
If I don't speficy the 'nested-depth' option the cmd works fine:
heat resource-list fail_bay -f status=FAILED

But if 'nested-depth' option was specified, the filters would not work and all of the resources are returned:
heat resource-list fail_bay -n 2 -f status=FAILED

Expected:
Only the failed resources of stack 'fail_bay' will be returned
Actual:
All resources of stack 'fail_bay' returned.

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

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

Revision history for this message
Wenzhi Yu (yuywz) wrote :
description: updated
Revision history for this message
Wenzhi Yu (yuywz) wrote :
Revision history for this message
Rabi Mishra (rabi) wrote :

We don't seem to be passing filters to the iter_resources for nested stack.

https://github.com/openstack/heat/blob/master/heat/engine/stack.py#L338

Changed in heat:
assignee: nobody → Rabi Mishra (rabi)
importance: Undecided → Medium
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/324206

Changed in heat:
status: New → In Progress
Rabi Mishra (rabi)
Changed in heat:
milestone: none → newton-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit edfc99adbac7c899bb3acbce25846b4e3ca57d32
Author: rabi <email address hidden>
Date: Thu Jun 2 09:27:36 2016 +0530

    Pass filters to iter_resources for nested

    We don't seem to pass filters to the iter_resources recursive
    call.

    Change-Id: I54d63f70e93ec7b8dc6a444439bea10f78f58b5f
    Closes-Bug: #1588130

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.0b2

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

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.