Bug 1905327 - openshift-kube-scheduler initContainer wait-for-host-port is not requesting required resources: cpu, memory
Summary: openshift-kube-scheduler initContainer wait-for-host-port is not requesting r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-scheduler
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Maciej Szulik
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-08 03:30 UTC by W. Trevor King
Modified: 2021-02-24 15:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:40:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-kube-scheduler-operator pull 310 0 None closed Bug 1905327: specify cpu and memory resources for initContainers 2021-01-08 15:43:04 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:40:50 UTC

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


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