Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1365711

Summary: Can't delete replicationcontroller directly
Product: OpenShift Container Platform Reporter: XiuJuan Wang <xiuwang>
Component: ocAssignee: Michail Kargakis <mkargaki>
Status: CLOSED NOTABUG QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: akostadi, aos-bugs, ccoleman, ffranz, jokerman, mfojtik, mmccomas, wmeng, xtian
Target Milestone: ---Keywords: Reopened, UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Replication controllers owned by deployment configs should not be edited by users. Manipulating deployment configs should be enough. We need to call this out explicitly in docs.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-02 14:40:28 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 XiuJuan Wang 2016-08-10 02:19:22 UTC
Description of problem:
Delete rc directly, just clear the pod number to 0, this resource still exists, you can scale it up again.

If delete dc, dc and rc will be deleted together.

Version-Release number of selected component (if applicable):
oc v3.3.0.17
kubernetes v1.3.0+507d3a7

How reproducible:
always

Steps to Reproduce:
1.Delete rc directly
# oc  delete rc ruby-ex-1
replicationcontroller "ruby-ex-1" deleted
2.Check rc
3.

Actual results:
# oc  get  rc 
NAME        DESIRED   CURRENT   AGE
ruby-ex-1   0         0         <invalid>

Expected results:
Should delete rc or update the promption when delete rc.

Additional info:

Comment 1 Michail Kargakis 2016-08-17 08:50:02 UTC
This is working as expected. You are not supposed to manually delete deployments for a config.

Comment 2 Aleksandar Kostadinov 2016-08-17 09:22:26 UTC
If user is not supposed to do that, why is he/she allowed to perform the call? Why isn't there any error or warning that operation performed is not ok?

To ensure good/non-confusing user experience, I'd suggest at a minimum to issue a warning when performing that call.

btw doing a DELETE call and not having resource deleted IMO breaks REST principles and makes this part of the API inconsistent with the other parts of the API. I assume such change was discussed in dev team lengthy and was well considered. But without some documentation it looks like weak API design.

Comment 3 Michail Kargakis 2016-08-17 09:47:43 UTC
The resource is deleted but it's recreated by the deployment config controller so there are no REST principles violated or API inconsistencies. We have discussed warnings in the cli before in various places but we ended up agreeing that it's not optimal (maybe I misunderstood). Disallowing these calls is out of question I think. We should probably make it clearer in the docs that users shouldn't touch RCs owned by DCs. CCing Michal and Clayton for feedback.

Comment 4 Aleksandar Kostadinov 2016-08-17 11:19:52 UTC
Michail, what you write makes sense. I guess it is a documentation thing then.

Comment 5 Aleksandar Kostadinov 2016-08-18 16:07:48 UTC
Also IMO we should explain what happens if they are changed/deleted by user.

Comment 6 Michail Kargakis 2016-09-02 14:40:28 UTC
https://github.com/openshift/openshift-docs/pull/2694 merged in the docs repo with a mention to the underlying problem in this issue. For further clarification, please open a bug in the docs repo or assign a Bugzilla bug to the docs team.