openstack project delete should notify about it behaviour

Bug #2118900 reported by Nikita Koltsov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

It's not obvious for new users that openstack project delete is not checking if there are any resources assigned to this project. And it is inconsistent with other openstack commands like network delete is not working when there are ports/routers assigned to this network.

It would be better to remove such behavior, resources without a proper project are hard to find and fix after such removal. But it could be complex, so as a minimal safeguard it would be nice to notify user about such behavior and ask for additional confirmation as dialog option or as an additional flag

Revision history for this message
Alexey Stupnikov (astupnikov) wrote :

I don't like the idea of changing default behavior (so people's scripts will be broken with new release because we will ask for approval unconditionally). It is possible to calculate list of resources from project to be deleted and then take decision if project can be deleted, or extra approval is needed, but this is expensive.

I will add better command description as a first step and let others work on the rest (if they would want to).

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

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/python-openstackclient/+/961821

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-openstackclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-openstackclient/+/961821
Committed: https://opendev.org/openstack/python-openstackclient/commit/c0ada2d6ab3cf9caa1cc879f05ac89d4948e741d
Submitter: "Zuul (22348)"
Branch: master

commit c0ada2d6ab3cf9caa1cc879f05ac89d4948e741d
Author: Alexey Stupnikov <email address hidden>
Date: Fri Sep 19 19:37:28 2025 +0200

    Extend project delete command description

    "openstack project delete" command doesn't try to figure out if
    other services are using specified project somehow before trying
    to delete it. This patch extends command description to ensure
    that this is clearly communicated to users.

    Related-bug: #2118900
    Change-Id: I3ae0b2a8f04d4f791cab46ccd89f400549d24ecd
    Signed-off-by: Alexey Stupnikov <email address hidden>

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.