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

Bug 1905327

Summary: openshift-kube-scheduler initContainer wait-for-host-port is not requesting required resources: cpu, memory
Product: OpenShift Container Platform Reporter: W. Trevor King <wking>
Component: kube-schedulerAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: RamaKasturi <knarra>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, mfojtik
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:40:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description W. Trevor King 2020-12-08 03:30:54 UTC
This bug was initially created as a copy of Bug #1905298, but for the kube-scheduler.  Per Clayton, both containers and initContainers must set both of these going forward [1], while [2] is showing:

openshift-kube-scheduler-operator/openshift-kube-scheduler-operator-7d54958489-lzj4d container containers[0] (kube-scheduler-operator-container) is not requesting required resources: cpu
openshift-kube-scheduler/openshift-kube-scheduler-ci-op-sdpv1krm-2a78c-r94vn-master-0 container initContainers[0] (wait-for-host-port) is not requesting required resources: cpu, memory
openshift-kube-scheduler/openshift-kube-scheduler-ci-op-sdpv1krm-2a78c-r94vn-master-1 container initContainers[0] (wait-for-host-port) is not requesting required resources: cpu, memory
openshift-kube-scheduler/openshift-kube-scheduler-ci-op-sdpv1krm-2a78c-r94vn-master-2 container initContainers[0] (wait-for-host-port) is not requesting required resources: cpu, memory
as part of failing:

  [sig-arch] Managed cluster should ensure control plane containers have requests set for cpu and memory [Suite:openshift/conformance/parallel]

origin/25747 is in flight to transition an existing, but overly relaxed, test-case to explicitly require both requests on all containers.  Any components which have not been fixed after an initial pass will have temporary exceptions linked to their tracking bugs when the stricter test lands.

[1]: https://github.com/openshift/enhancements/blob/master/CONVENTIONS.md#resources-and-limits
[2]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/25747/pull-ci-openshift-origin-master-e2e-gcp/1336048716389289984

Comment 2 RamaKasturi 2020-12-15 07:24:22 UTC
Verified bug with payload below and i see that it has been fixed.

[knarra@knarra openshift-client-linux-4.7.0-0.nightly-2020-12-11-135127]$ ./oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2020-12-14-165231   True        False         59m     Cluster version is 4.7.0-0.nightly-2020-12-14-165231

Tested on 4.6 and below is the output i see:
=================================================
oc get <kube-scheduler-po> -n openshift-kube-scheduler -o yaml

  initContainers:
  - args:
    - |
      echo -n "Waiting for port :10259 and :10251 to be released."
      while [ -n "$(lsof -ni :10251)" -o -n "$(lsof -i :10259)" ]; do
        echo -n "."
        sleep 1
      done
    command:
    - /usr/bin/timeout
    - "30"
    - /bin/bash
    - -c
    image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:cb17aded6ac46ca6b4828c2bd7d1fe79e6efcfa57a74bdcafec05aa32963a97b
    imagePullPolicy: IfNotPresent
    name: wait-for-host-port
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: FallbackToLogsOnError
  nodeName: ip-10-0-130-166.ap-northeast-2.compute.internal


Tested with 4.7 and i could see resources added to initContainers:
====================================================================
  initContainers:
  - args:
    - |
      echo -n "Waiting for port :10259 and :10251 to be released."
      while [ -n "$(lsof -ni :10251)" -o -n "$(lsof -i :10259)" ]; do
        echo -n "."
        sleep 1
      done
    command:
    - /usr/bin/timeout
    - "30"
    - /bin/bash
    - -c
    image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9f88a4fa795fe20902527bcbd53a4857ceed10c7dcd6d5d59d4f156a1118dac5
    imagePullPolicy: IfNotPresent
    name: wait-for-host-port
    resources:
      requests:
        cpu: 15m
        memory: 50Mi
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: FallbackToLogsOnError
  nodeName: ip-10-0-130-94.us-east-2.compute.internal

Based on the above moving bug to verified state.

Comment 5 errata-xmlrpc 2021-02-24 15:40:33 UTC
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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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/RHSA-2020:5633