+++ This bug was initially created as a clone of Bug #1861683 +++ Description of problem: When deploy a pod with custom scheduler can't show the custom scheduler name correctly on the Event Version-Release number of selected component (if applicable): 4.6.0-0.nightly-2020-07-25-091217 How reproducible: always Steps to Reproduce: 1) Deploy custom scheduler named "my-scheduler" 2) Create a pod to use the custom scheduler with yaml : [root@dhcp-140-138 ~]# cat /tmp/annotation-second-scheduler.yaml apiVersion: v1 kind: Pod metadata: name: annotation-second-scheduler labels: name: multischeduler-example spec: schedulerName: my-scheduler containers: - name: pod-with-no-annotation-container image: "quay.io/openshifttest/pause@sha256:b31bfb4d0213f254d361e0079deaaebefa4f82ba7aa76ef82e90b4935ad5b105" 3) Check the name of the scheduler for the pod Actual results: 3) Show nothing for the scheduler name , and show <unknown> for the Age. [root@dhcp-140-138 ~]# oc describe po/annotation-second-scheduler Name: annotation-second-scheduler Namespace: zhouyt2 Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled <unknown> Successfully assigned zhouyt2/annotation-second-scheduler to ip-xxx Expected results: 3. Show the scheduler name and Age correctly Additional info: --- Additional comment from Jan Chaloupka on 2020-08-04 11:53:20 UTC --- Age is not properly set since FirstTimestamp, resp. LastTimestamp fields are not set due to the fact both fields are deprecated with 1.19 (core event type is replaced with event v1 type) and not properly set in 1.18 or less (core event type is replaced with event v1beta1 type). The way the Age is computed will need to change eventually. In 4.5 or less the solution is to set both DeprecatedLastTimestamp and DeprecatedFirstTimestamp when issuing v1beta1 event. Which, when converted to the core event type gets translated into LastTimestamp and FirstTimestamp. In 4.6 different approach is required since both fields are no longer set. --- Additional comment from Jan Chaloupka on 2020-08-04 11:55:54 UTC --- From field is read from core event's Source field which is deprecated as well. There's a DeprecatedSource field which can not be set in 1.19 as well. New v1 event has a ReportingController field which can be used instead. --- Additional comment from Jan Chaloupka on 2020-08-04 13:29:13 UTC --- Upstream PR addressing `Age` column in v1.18: https://github.com/kubernetes/kubernetes/pull/93663 --- Additional comment from Jan Chaloupka on 2020-08-04 16:05:13 UTC --- In 4.6 the Age column is properly set through https://github.com/openshift/oc/commit/bda51beaf869421bba0ce4eb32602d3af05497f2#diff-03ff3bfb36119113ef012cfe8771c5c6R3872-R3874 (oc rebase to 1.19.0-rc.1) so no need to address that anymore (tested locally). --- Additional comment from Jan Chaloupka on 2020-08-04 16:23:51 UTC --- Upstream PR addressing `From` column in master: https://github.com/kubernetes/kubernetes/pull/93687 --- Additional comment from RamaKasturi on 2020-08-06 16:09:26 UTC --- @jan chaloupka, i see that not only custom-scheduler but cannot see default-scheduler name as well. See the describe below. I see the bug is already in POST state, hopefully the PR fixes this issue as well. could you please confirm ? [15:42:00] INFO> Shell Commands: oc describe pods no-scheduler --kubeconfig=/home/ramakasturinarra/workdir/dhcp35-60-ramakasturinarra/ocp4_testuser-18.kubeconfig Name: no-scheduler Namespace: i8lqc Priority: 0 Node: ip-10-0-59-92.us-east-2.compute.internal/10.0.59.92 Start Time: Thu, 06 Aug 2020 21:11:54 +0530 Labels: <none> Annotations: k8s.v1.cni.cncf.io/network-status: [{ "name": "", "interface": "eth0", "ips": [ "10.131.0.189" ], "default": true, "dns": {} }] k8s.v1.cni.cncf.io/networks-status: [{ "name": "", "interface": "eth0", "ips": [ "10.131.0.189" ], "default": true, "dns": {} }] openshift.io/scc: restricted Status: Running IP: 10.131.0.189 IPs: IP: 10.131.0.189 Containers: hello: Container ID: cri-o://586d5e936cbb6001d4d8e1b186f5c84af77870dcaff9e7e57ab6518e28b0b12a Image: quay.io/openshifttest/hello-pod@sha256:04b6af86b03c1836211be2589db870dba09b7811c197c47c07fbbe33c7f80ef7 Image ID: quay.io/openshifttest/hello-pod@sha256:04b6af86b03c1836211be2589db870dba09b7811c197c47c07fbbe33c7f80ef7 Port: <none> Host Port: <none> State: Running Started: Thu, 06 Aug 2020 21:11:57 +0530 Ready: True Restart Count: 0 Environment: <none> Mounts: /var/run/secrets/kubernetes.io/serviceaccount from default-token-ldsc6 (ro) Conditions: Type Status Initialized True Ready True ContainersReady True PodScheduled True Volumes: default-token-ldsc6: Type: Secret (a volume populated by a Secret) SecretName: default-token-ldsc6 Optional: false QoS Class: BestEffort Node-Selectors: <none> Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 8s Successfully assigned i8lqc/no-scheduler to ip-10-0-59-92.us-east-2.compute.internal Normal AddedInterface 7s multus Add eth0 [10.131.0.189/23] Normal Pulled 6s kubelet, ip-10-0-59-92.us-east-2.compute.internal Container image "quay.io/openshifttest/hello-pod@sha256:04b6af86b03c1836211be2589db870dba09b7811c197c47c07fbbe33c7f80ef7" already present on machine Normal Created 6s kubelet, ip-10-0-59-92.us-east-2.compute.internal Created container hello Normal Started 6s kubelet, ip-10-0-59-92.us-east-2.compute.internal Started container hello --- Additional comment from Jan Chaloupka on 2020-08-18 08:51:35 UTC --- Yes, it does. --- Additional comment from RamaKasturi on 2020-08-18 08:52:55 UTC --- (In reply to Jan Chaloupka from comment #7) > Yes, it does. Thanks !! --- Additional comment from Jan Chaloupka on 2020-08-25 15:03:56 UTC --- Backporting https://github.com/kubernetes/kubernetes/pull/90227 to 1.18 as a replacement for https://github.com/kubernetes/kubernetes/pull/93663 (which got closed as not sufficient solution). --- Additional comment from Jan Chaloupka on 2020-08-26 12:34:37 UTC --- All the fixes are merged in upstream master branch. I will wait until 1.19 GA is rebased and underlying BZ is in MODIFIED state.
Putting UpcomingSprint just in case 4.5 backport PR does not get merged EOW
Adding UpcomingSprint just in case the fix does not get merged by EOW
verified in the payload below and i see that age and from column gets displayed fine. [knarra@knarra ~]$ oc version Client Version: 4.5.0-202010020056.p0-3f6a83f Server Version: 4.5.0-0.nightly-2020-10-05-204452 Kubernetes Version: v1.18.3+9cdca7b [knarra@knarra ~]$ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.5.0-0.nightly-2020-10-05-204452 True False 50m Cluster version is 4.5.0-0.nightly-2020-10-05-204452 Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 26s default-scheduler Successfully assigned ffy6f/no-scheduler to ip-10-0-130-30.us-east-2.compute.internal Normal AddedInterface 23s multus Add eth0 [10.128.2.12/23] Normal Pulling 23s kubelet Pulling image "quay.io/openshifttest/hello-pod@sha256:04b6af86b03c1836211be2589db870dba09b7811c197c47c07fbbe33c7f80ef7" Normal Pulled 8s kubelet Successfully pulled image "quay.io/openshifttest/hello-pod@sha256:04b6af86b03c1836211be2589db870dba09b7811c197c47c07fbbe33c7f80ef7" Normal Created 8s kubelet Created container hello Normal Started 7s kubelet Started container hello custom scheduler case: =========================== Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 8s my-scheduler Successfully assigned q8ofj/annotation-second-scheduler to ip-10-0-130-30.us-east-2.compute.internal Normal AddedInterface 7s multus Add eth0 [10.128.2.16/23] Normal Pulled 7s kubelet Container image "quay.io/openshifttest/pause@sha256:b31bfb4d0213f254d361e0079deaaebefa4f82ba7aa76ef82e90b4935ad5b105" already present on machine Normal Created 7s kubelet Created container pod-with-no-annotation-container Normal Started 7s kubelet Started container pod-with-no-annotation-container Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 8s default-scheduler Successfully assigned q8ofj/annotation-default-scheduler to ip-10-0-130-30.us-east-2.compute.internal Normal AddedInterface 7s multus Add eth0 [10.128.2.15/23] Normal Pulled 7s kubelet Container image "quay.io/openshifttest/pause@sha256:b31bfb4d0213f254d361e0079deaaebefa4f82ba7aa76ef82e90b4935ad5b105" already present on machine Normal Created 6s kubelet Created container pod-with-no-annotation-container Normal Started 6s kubelet Started container pod-with-no-annotation-container Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 10s default-scheduler Successfully assigned q8ofj/no-annotation to ip-10-0-130-30.us-east-2.compute.internal Normal AddedInterface 8s multus Add eth0 [10.128.2.14/23] Normal Pulling 8s kubelet Pulling image "quay.io/openshifttest/pause@sha256:b31bfb4d0213f254d361e0079deaaebefa4f82ba7aa76ef82e90b4935ad5b105" Normal Pulled 6s kubelet Successfully pulled image "quay.io/openshifttest/pause@sha256:b31bfb4d0213f254d361e0079deaaebefa4f82ba7aa76ef82e90b4935ad5b105" Normal Created 6s kubelet Created container pod-with-no-annotation-container Normal Started 6s kubelet Started container pod-with-no-annotation-container Based on the above moving bug to verified state.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Container Platform 4.5.15 bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4228