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

Error when creating privileged pod with /host mount

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • 4.14
    • Node / CRI-O
    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      While trying to create a privileged pod with /host mount, it fails with below error
      
      Error from server (NotFound): error when creating "proapagate-pod.yaml": the server could not find the requested resource
      
      This is for testing below 4.14 epic
      Enable privileged containers to view  rootfs of other containers https://issues.redhat.com/browse/OCPNODE-1713

      Version-Release number of selected component (if applicable):

      4.14.0-0.nightly-2023-09-19-201452

      How reproducible:

      Always

      Steps to Reproduce:

      
      
      
      

      Actual results:

      % oc get clusterversion
      NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.14.0-0.nightly-2023-09-19-201452   True        False         10h     Cluster version is 4.14.0-0.nightly-2023-09-19-201452
      
      % oc get nodes
      NAME                                        STATUS   ROLES                  AGE   VERSION
      ip-10-0-19-206.us-east-2.compute.internal   Ready    worker                 87m   v1.27.4+2c287eb
      ip-10-0-32-117.us-east-2.compute.internal   Ready    worker                 32m   v1.27.4+2c287eb
      ip-10-0-38-191.us-east-2.compute.internal   Ready    control-plane,master   10h   v1.27.4+2c287eb
      ip-10-0-6-61.us-east-2.compute.internal     Ready    control-plane,master   10h   v1.27.4+2c287eb
      ip-10-0-77-11.us-east-2.compute.internal    Ready    worker                 10h   v1.27.4+2c287eb
      ip-10-0-85-210.us-east-2.compute.internal   Ready    control-plane,master   10h   v1.27.4+2c287eb
      
      % oc debug node/ip-10-0-19-206.us-east-2.compute.internal
      Temporary namespace openshift-debug-9c5vm is created for debugging node...
      Starting pod/ip-10-0-19-206us-east-2computeinternal-debug ...
      
      sh-4.4# chroot /host
      
      sh-5.1# cat /etc/containers/storage.conf | grep -i skip_mount_home
      skip_mount_home = "true"
      
      % cat proapagate-pod.yaml 
      kind: Pod
      metadata:
        name: proapagate-pod
      spec:
        containers:
          - name: propagate-pod
            image: nginx
            securityContext:
              privileged: true
            volumeMounts:
             - name: host
               mountPath: /host
               mountPropagation: HostToContainer
      
      % oc apply -f proapagate-pod.yaml 
      Error from server (NotFound): error when creating "proapagate-pod.yaml": the server could not find the requested resource

      Expected results:

       

      Additional info:

       

              pehunt@redhat.com Peter Hunt
              schoudha Sunil Choudhary
              Sunil Choudhary Sunil Choudhary
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: