Bug 1743759 - machineconfig showing wrong ownerReferences kind for kubeletconfig
Summary: machineconfig showing wrong ownerReferences kind for kubeletconfig
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 4.2.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 4.2.0
Assignee: Ryan Phillips
QA Contact: Sunil Choudhary
URL:
Whiteboard:
Depends On: 1743160 1743771
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-20 15:50 UTC by Ryan Phillips
Modified: 2019-08-20 15:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1743160
Environment:
Last Closed: 2019-08-20 15:52:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ryan Phillips 2019-08-20 15:50:09 UTC
+++ This bug was initially created as a clone of Bug #1743160 +++

Description of problem:
when create a kubeletconfig, there will generate a relevant machineconfig whose ownerReferences kind should be "KubeletConfig". But now ownerReferences kind shows "ContainerRuntimeConfig"


Version-Release number of selected component (if applicable):
# oc version 
oc v4.0.0-alpha.0+1cdd4a1-781
kubernetes v1.11.0+1cdd4a1
Server https://api.qe-aws-411.qe.devcluster.openshift.com:6443
kubernetes v1.13.4+4715f6e

#oc get clusterversion 
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.1.11    True        True          64m       Working towards quay.io/openshift-release-dev/ocp-release:4.1.12: downloading update

How reproducible:
always

Steps to Reproduce:
1.$ oc label machineconfigpool worker custom-kubelet=sysctl

2.$ cat custom-kubelet.yaml 
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
  name: custom-kubelet
spec:
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: sysctl
  kubeletConfig:
    allowedUnsafeSysctls:
      - "kernel.msg*"
      - "net.ipv4.route.min_pmtu"

$ oc create -f custom-kubelet.yaml

3.$ oc get kubeletconfig  custom-kubelet -o yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
  creationTimestamp: 2019-08-19T06:57:46Z
  finalizers:
  - 99-worker-e1e937c6-c232-11e9-92cb-02f5e47f12aa-kubelet
  generation: 1
  name: custom-kubelet
  resourceVersion: "88078"
  selfLink: /apis/machineconfiguration.openshift.io/v1/kubeletconfigs/custom-kubelet
  uid: a660fab5-c24e-11e9-a7bb-02b883e5dd18
spec:
  kubeletConfig:
    allowedUnsafeSysctls:
    - kernel.msg*
    - net.ipv4.route.min_pmtu
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: sysctl
status:
  conditions:
  - lastTransitionTime: 2019-08-19T06:57:46Z
    message: Success
    status: "True"
    type: Success

4. $ oc get machineconfig 99-worker-e1e937c6-c232-11e9-92cb-02f5e47f12aa-kubelet -o yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  annotations:
    machineconfiguration.openshift.io/generated-by-controller-version: 83392b13a5c17e56656acf3f7b0031e3303fb5c0
  creationTimestamp: 2019-08-19T05:33:15Z
  generation: 2
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 99-worker-e1e937c6-c232-11e9-92cb-02f5e47f12aa-kubelet
  ownerReferences:
  - apiVersion: machineconfiguration.openshift.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: ContainerRuntimeConfig  // this line is wrong
    name: custom-kubelet
    uid: a660fab5-c24e-11e9-a7bb-02b883e5dd18
  resourceVersion: "88076"
  selfLink: /apis/machineconfiguration.openshift.io/v1/machineconfigs/99-worker-e1e937c6-c232-11e9-92cb-02f5e47f12aa-kubelet
  uid: d78d2f97-c242-11e9-8c59-06f827e8a358
...


Actual results:
in step 4, metadata-->ownerReferences-->kind show "ContainerRuntimeConfig"

Expected results:
in step 4, metadata-->ownerReferences-->kind show "KubeletConfig"

Additional info:

--- Additional comment from Ryan Phillips on 2019-08-20 01:09:17 UTC ---

I've been testing this on 4.2 and can't reproduce the issue. Is this reproducible with 4.2 or above?

--- Additional comment from Ryan Phillips on 2019-08-20 01:54:20 UTC ---

Found the issue

Comment 1 Ryan Phillips 2019-08-20 15:52:14 UTC
Closing this bug and will clone from the original to 4.1


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