Bug 1318737 - What to do when you delete one of the default projects
Summary: What to do when you delete one of the default projects
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Ashley Hardin
QA Contact: weiwei jiang
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-17 15:58 UTC by Eric Jones
Modified: 2019-10-10 11:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-27 17:43:00 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Eric Jones 2016-03-17 15:58:47 UTC
Document URL: 
N/A

Section Number and Name: 
N/A

Describe the issue: 
If a cluster admin deletes any of the default projects, like `default`, `openshift`, or `openshift-infra` there are repercussions that impact the whole environment. And we do not have any documentation on how to correct these problems.

Suggestions for improvement: 
Talk with engineering to determine the various steps that need to be done to correct the problems created from deleting each default project.

Comment 1 Ashley Hardin 2016-03-21 18:41:39 UTC
@David, can you please offer some guidance as to what should be included on this topic? If it's easier to meet up for a brain dump session, please let me know. Thanks!

Comment 2 David Eads 2016-03-21 19:36:06 UTC
I've never gone through recovery steps before and I don't think they'd remain stable between versions.

Jordan: Would expect stability?  Do you have suggestions for dealing with unstable directions?  I also wouldn't expect auto-recreation for some of these.  Any idea if we do that?

Comment 3 Jordan Liggitt 2016-03-21 19:40:51 UTC
Looks like the master creates the namespaces and bindings on startup if they are missing.

Content (templates, image streams, registry, router, etc) does not get recreated automatically.

Comment 4 Ashley Hardin 2016-03-29 17:03:31 UTC
Work in progress: https://github.com/openshift/openshift-docs/pull/1832

Comment 5 Ashley Hardin 2016-03-30 20:23:32 UTC
@ Jordan, Please review this PR and let me know if any edits are needed: https://github.com/openshift/openshift-docs/pull/1832

Comment 6 weiwei jiang 2016-04-05 07:49:17 UTC
Checked with devenv-rhel7_3898, and the restarted openshift should be exit with error
"F0405 01:37:48.525307   26396 start_master.go:539] Could not get client for replication controller: Could not get token for openshift-infra/replication-controller" 
after I delete all projects via `oc delete projects --all`.

And the status of openshift-infra project is in "Terminating" status.

Comment 7 David Eads 2016-04-11 11:35:29 UTC
@jliggitt  The fix for that bug merged, right?

Comment 8 Ashley Hardin 2016-04-15 17:29:55 UTC
This is now a KB article per discussion with Jordan: https://access.redhat.com/solutions/2260211

Comment 9 weiwei jiang 2016-04-19 08:00:51 UTC
Checked with devenv-rhel7_3984, and the infra project can not be deleted now.

# oc delete project --all 
Error from server: namespaces "default" is forbidden: this namespace may not be deleted
Error from server: namespaces "openshift" is forbidden: this namespace may not be deleted
Error from server: namespaces "openshift-infra" is forbidden: this namespace may not be deleted

And checked with:
# openshift version
openshift v3.2.0.17
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5

# oc delete projects --all
Error from server: namespaces "openshift-infra" is forbidden: this namespace may not be deleted
Error from server: namespaces "default" is forbidden: this namespace may not be deleted
Error from server: namespaces "openshift" is forbidden: this namespace may not be deleted

Comment 10 Ashley Hardin 2016-04-27 17:43:00 UTC
Solution published: https://access.redhat.com/solutions/2260211


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