Bug 1313688 - [RFE] Project deletion is asynchronous
Summary: [RFE] Project deletion is asynchronous
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jordan Liggitt
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-02 08:45 UTC by Alexander Koksharov
Modified: 2019-10-10 11:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-24 15:29:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Alexander Koksharov 2016-03-02 09:00:05 UTC
Description of problem:
Whenever project is deleted via the CLI, system instantaneously returns a message stating that the project has been deleted.
However, the project has only started being deleted. This will make any scripts that delete/remake projects very unreliable.

Version-Release number of selected component (if applicable):
OSE 3.1.1

How reproducible:
execute twice the next command:
oc new-project trash;oc delete project trash;oc new-project trash

Steps to Reproduce:
1.
2.
3.

Actual results:

root@master # oc new-project trash;oc delete project trash;oc new-project trash
Now using project "trash" on server "https://master.ose3.test:8443".

You can add applications to this project with the 'new-app' command. For example, try:

    $ oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-hello-world.git

to build a new hello-world application in Ruby.
project "trash" deleted
Now using project "trash" on server "https://master.ose3.test:8443".

You can add applications to this project with the 'new-app' command. For example, try:

    $ oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-hello-world.git

to build a new hello-world application in Ruby.

[02/03 09:41:11][~]
root@master # oc new-project trash;oc delete project trash;oc new-project trash
Error from server: project "trash" already exists
project "trash" deleted
Error from server: project "trash" already exists

[02/03 09:41:26][~]
root@master # 


Expected results:


Additional info:

Comment 3 Jordan Liggitt 2016-04-13 22:21:07 UTC
API calls are not designed to be long running. Processes that need to wait until project cleanup is complete can watch or poll until the project no longer is in the Terminating state and is deleted.

Comment 4 Jordan Liggitt 2016-04-13 22:22:24 UTC
All deletion is potentially asynchronous (for example, by default, pod deletion waits for nodes to send kill signals to pod processes and for them to exit gracefully)

Comment 5 weiwei jiang 2016-04-14 01:53:26 UTC
(In reply to Jordan Liggitt from comment #4)
> All deletion is potentially asynchronous (for example, by default, pod
> deletion waits for nodes to send kill signals to pod processes and for them
> to exit gracefully)

Or can we delete the kubernetes related resources firstly?

I saw we first delete our openshift resources(policy bindings), and this will make project invisible for users to let user think the project have already been deleted, maybe the project will be deleted after several seconds actually.

We have report a bug about this https://bugzilla.redhat.com/show_bug.cgi?id=1324465, but the solution still can not make user create the same name project after the project is invisible.

Comment 6 Jordan Liggitt 2016-04-14 02:22:19 UTC
Deletion order should not be counted on. Multiple workers can be spawned to delete resources in parallel.


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