Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-34418

Router pods use hostnetwork SCC even when not using host network

XMLWordPrintable

    • Moderate
    • Yes
    • 2
    • Sprint 254, NE Sprint 255, NE Sprint 256, NE Sprint 257, NE Sprint 258
    • 5
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Cause: Router pods were missing permission to use the "restricted" SCC. The permission is required since OpenShift 4.11 in order to use this SCC.

      Consequence: Router pods used the "hostnetwork" SCC even when they did not use the host network, giving router pods permissions that they did not require.

      Fix: Permission to use the "restricted" SCC was added for router pods.

      Result: Router pods now use the "restricted" SCC if they do not use the host network.
      Show
      Cause: Router pods were missing permission to use the "restricted" SCC. The permission is required since OpenShift 4.11 in order to use this SCC. Consequence: Router pods used the "hostnetwork" SCC even when they did not use the host network, giving router pods permissions that they did not require. Fix: Permission to use the "restricted" SCC was added for router pods. Result: Router pods now use the "restricted" SCC if they do not use the host network.
    • Bug Fix
    • In Progress

      Description of problem

      Router pods use the "hostnetwork" SCC even when they do not use the host network.

      Version-Release number of selected component (if applicable)

      All versions of OpenShift from 4.11 through 4.17.

      How reproducible

      100%.

      Steps to Reproduce

      1. Install a new cluster with OpenShift 4.11 or later on a cloud platform.

      Actual results

      The router-default pods do not use the host network, yet they use the "hostnetwork" SCC:

      % oc -n openshift-ingress get pods -l ingresscontroller.operator.openshift.io/deployment-ingresscontroller=default -o go-template --template='{{range .items}}{{.metadata.name}} {{with .metadata.annotations}}{{index . "openshift.io/scc"}}{{end}} {{.spec.hostNetwork}}{{"\n"}}{{end}}'
      router-default-5ffd4ff7cd-mhhv6 hostnetwork <no value>
      router-default-5ffd4ff7cd-wmqnj hostnetwork <no value>
      % 
      

      Expected results

      The router-default pods should use the "restricted" SCC.

      Additional info

      We missed this change from the OCP 4.11 release notes:

      The restricted SCC is no longer available to users of new clusters, unless the access is explicitly granted. In clusters originally installed in OpenShift Container Platform 4.10 or earlier, all authenticated users can use the restricted SCC when upgrading to OpenShift Container Platform 4.11 and later.

      Artifacts from CI jobs confirm that router pods used "restricted" for new 4.10 clusters and for 4.10→4.11 upgraded clusters, and "hostnetwork" for new 4.11 clusters:

      % curl -s 'https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/periodic-ci-openshift-release-master-ci-4.10-upgrade-from-stable-4.9-e2e-aws-ovn-upgrade/1790552355406614528/artifacts/e2e-aws-ovn-upgrade/gather-extra/artifacts/pods.json' | jq '.items|.[]|select(.metadata.name|startswith("router-default-"))|.metadata.annotations["openshift.io/scc"]'
      "restricted"
      "restricted"
      % curl -s 'https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/periodic-ci-openshift-release-master-ci-4.10-e2e-aws-serial/1790422949342220288/artifacts/e2e-aws-serial/gather-extra/artifacts/pods.json' | jq '.items|.[]|select(.metadata.name|startswith("router-default-"))|.metadata.annotations["openshift.io/scc"]'
      "restricted"
      "restricted"
      % curl -s 'https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/periodic-ci-openshift-release-master-ci-4.11-upgrade-from-stable-4.10-e2e-aws-ovn-upgrade/1793013806733987840/artifacts/e2e-aws-ovn-upgrade/gather-extra/artifacts/pods.json' | jq '.items|.[]|select(.metadata.name|startswith("router-default-"))|.metadata.annotations["openshift.io/scc"]'
      "restricted"
      "restricted"
      % curl -s 'https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/periodic-ci-openshift-release-master-ci-4.11-e2e-aws-serial/1793013781534609408/artifacts/e2e-aws-serial/gather-extra/artifacts/pods.json' | jq '.items|.[]|select(.metadata.name|startswith("router-default-"))|.metadata.annotations["openshift.io/scc"]'
      "hostnetwork"
      "hostnetwork"
      % curl -s 'https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/periodic-ci-openshift-release-master-ci-4.12-upgrade-from-stable-4.11-e2e-aws-ovn-upgrade/1793670820518694912/artifacts/e2e-aws-ovn-upgrade/gather-extra/artifacts/pods.json' | jq '.items|.[]|select(.metadata.name|startswith("router-default-"))|.metadata.annotations["openshift.io/scc"]'
      "hostnetwork"
      "hostnetwork"
      % curl -s 'https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/periodic-ci-openshift-release-master-ci-4.12-e2e-aws-sdn-serial/1793670819998601216/artifacts/e2e-aws-sdn-serial/gather-extra/artifacts/pods.json' | jq '.items|.[]|select(.metadata.name|startswith("router-default-"))|.metadata.annotations["openshift.io/scc"]'
      "hostnetwork"
      "hostnetwork"
      % curl -s 'https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/periodic-ci-openshift-release-master-nightly-4.17-e2e-aws-ovn-serial/1793062832263139328/artifacts/e2e-aws-ovn-serial/gather-extra/artifacts/pods.json' | jq '.items|.[]|select(.metadata.name|startswith("router-default-"))|.metadata.annotations["openshift.io/scc"]'
      "hostnetwork"
      "hostnetwork"
      % 
      

              mmasters1@redhat.com Miciah Masters
              mmasters1@redhat.com Miciah Masters
              Shudi Li Shudi Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: