Bug 1562781

Summary: Accidentally deleted all projects
Product: OpenShift Container Platform Reporter: Juan Luis de Sousa-Valadas <jdesousa>
Component: RFEAssignee: Michal Fojtik <mfojtik>
Status: CLOSED WONTFIX QA Contact: Xiaoli Tian <xtian>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: aos-bugs, dmoessne, eparis, jliggitt, jokerman, maszulik, mfojtik, mmccomas, wmeng
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-04 13:59:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juan Luis de Sousa-Valadas 2018-04-02 13:30:47 UTC
Description of problem:
Customer accidentally deleted every project

How reproducible:
Always

Steps to Reproduce:
1. oc delete project  -n logging --all 

Actual results:
Every project got deleted

Expected results:
Deleting non namespaced resource with the -n flag should return an error


Additional info:
Watch private comments

Comment 3 Eric Paris 2018-04-02 15:35:12 UTC
Michal and master team:

Let's use this BZ to track a change to the CLI which will consider

oc delete ${cluster_scope_resource} -n $namespace --all

as a hard error.

Comment 9 Maciej Szulik 2018-04-05 14:06:30 UTC
I've opened https://github.com/kubernetes/kubernetes/pull/62167 will wait for upstream opinion on it.

Comment 10 Maciej Szulik 2018-04-10 12:51:44 UTC
The PR from the comment 9 was not approved. We'll need to pursuit a different approach on it.

Comment 11 Maciej Szulik 2018-04-10 12:54:20 UTC
We should pursuit an approach similar to https://github.com/kubernetes/kubernetes/pull/17740

Comment 12 Maciej Szulik 2018-04-10 14:08:26 UTC
Since this requires creating a new functionality and is not a bug per se I'm changing the component to RFE.

Comment 13 Maciej Szulik 2018-07-04 13:59:46 UTC
As stated elsewhere we are NOT going to implement any mechanism protecting users from accidentally removing projects, there are admission webhooks [1] that allow admins to create such protection. 

[1] https://docs.openshift.org/latest/architecture/additional_concepts/dynamic_admission_controllers.html

Comment 15 Red Hat Bugzilla 2023-09-15 00:07:17 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days