Bug 1313688 - [RFE] Project deletion is asynchronous
[RFE] Project deletion is asynchronous
Status: CLOSED WONTFIX
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master (Show other bugs)
3.1.0
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Jordan Liggitt
weiwei jiang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-02 03:45 EST by Alexander Koksharov
Modified: 2016-10-30 18:55 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-24 11:29:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 Alexander Koksharov 2016-03-02 04:00:05 EST
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 18:21:07 EDT
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 18:22:24 EDT
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-13 21:53:26 EDT
(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-13 22:22:19 EDT
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.