Bug 1574884 - unable to delete buildconfig post upgrade to 3.6
Summary: unable to delete buildconfig post upgrade to 3.6
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: 3.6.z
Assignee: Michal Fojtik
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-04 09:20 UTC by Rajnikant
Modified: 2019-03-07 11:21 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-07 11:21:40 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Rajnikant 2018-05-04 09:20:10 UTC
Description of problem:
Unable to delete buildconfig

Version-Release number of selected component (if applicable):
OpenShift Container Platform 3.6

How reproducible:
Post upgrade to 3.6 it's not possible to delete a buildconfig:
Tried with admin, cluster-admin as well, bot no luck

- while deleteing BC finalizers: orphan, where original BC does not contain finalizer.

<snip from BC>
  deletionGracePeriodSeconds: 0
  deletionTimestamp: 2018-04-24T08:32:24Z
  finalizers:
  - orphan
</snip>

Tried using cascade=false without success.

# oc delete bc BC-NAME --cascade=false

After removing finalizers definition bc disappeared immediately.

Build contains ownerReferences, suggested to delete build first and check,tried but did not work.

<snip from build file>
- apiVersion: v1
  kind: Build
...
    ownerReferences:
    - apiVersion: build.openshift.io/v1
      controller: true
      kind: BuildConfig
</snip>


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Michal Fojtik 2018-05-07 09:41:55 UTC
I think the BuildConfig might also depend on secrets/etc. I'm not sure what changed in 3.6 regarding to ownerRefs and GC for BuildConfigs, Ben do you know?

If the Builds have ownerRefs to BuildConfig and the GC is running, I don't think you need a finalizer and the builds should be removed automatically with the GC. This might be a migration issue, where we should make sure no finalizers are present?

Comment 3 Ben Parees 2018-05-07 11:45:10 UTC
I believe the only ownerrefs we added were from builds to buildconfigs.  The buildconfig may have refs to secrets but there shouldn't be any ownership relation between them (at least not one *we* setup, obviously a user could create them).

But the orphan finalizer isn't ours, we never had a finalizer for builds/buildconfigs, so I don't know where the finalizer is coming from?


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