deployment-delete doesn't delete the corresponding config

Bug #1504384 reported by Yingzhe Zeng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
Fix Committed
Medium
Yingzhe Zeng

Bug Description

When use deployment-create command to create a software deployment,
heatclient will create a corresponding software config at first,
then create the deployment with the previously created config ID.
So there'll be a config and a deployment created in DB at once by deployment-create command.

But deployment-delete command only deletes the deployment, leave the config in DB.
This makes the software_config table in DB more and more bigger, unless use config-delete command manually.

Changed in python-heatclient:
assignee: nobody → Yingzhe Zeng (zengyingzhe)
Revision history for this message
Rabi Mishra (rabi) wrote :

I think this is expected behaviour and not a bug . We create an empty config, if a config id is not provided when creating a deployment. This is only for usecases where user wants to pass input_values to config baked into images. Most of the cases user would specify a config already created.

Revision history for this message
Yingzhe Zeng (zengyingzhe) wrote :

Thanks for your reply, rabi.

You said the scenario of no config id provided.
If a config id already created is provided, a new config'll still be created, based on the existed config.
Is this also the expected behaviour?

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

do_deployment_create does create a derived config[1], so do_deployment_delete is leaking config resources currently.

I think deleting the config during do_deployment_delete, even though its possible to use the REST API directly to create a deployment that refers to an existing config resource rather than creating a derived one, I don't believe there would be anyone affected by do_deployment_delete always deleting the config associated with the deployment.

[1] https://github.com/openstack/python-heatclient/blob/master/heatclient/v1/shell.py#L1304

Changed in python-heatclient:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

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

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

Reviewed: https://review.openstack.org/238744
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=0a42fb8412c35eb4455144e54ead5d13bd623ae0
Submitter: Jenkins
Branch: master

commit 0a42fb8412c35eb4455144e54ead5d13bd623ae0
Author: zengyingzhe <email address hidden>
Date: Fri Oct 23 09:38:41 2015 +0800

    Delete the corresponding config when deleting a deployment

    Change-Id: I26049a60f8bb5702ede69d46e3a989bd09a2b3af
    Closes-Bug: #1504384

Changed in python-heatclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/266651

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-heatclient (stable/liberty)

Change abandoned by Steve Baker (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/266651

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-heatclient 0.9.0

This issue was fixed in the openstack/python-heatclient 0.9.0 release.

Changed in python-heatclient:
milestone: none → 1.3.0
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.