Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1365711 - Can't delete replicationcontroller directly
Summary: Can't delete replicationcontroller directly
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michail Kargakis
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-10 02:19 UTC by XiuJuan Wang
Modified: 2016-09-02 14:40 UTC (History)
9 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-09-02 14:40:28 UTC


Attachments (Terms of Use)

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.


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