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

MOSB is in updating state even though build pod is successful.

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

          When verifying OCPBUGS-38869 or in 4.18, the MOSB is still in updating state even though build pod is successfully removed and seeing error in machine-os build pod

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

          

      How reproducible:

          

      Steps to Reproduce:

          1.Apply any MOSC  
          2.see build pod is successful
          3.But MOSB is still in updating state   
          4.And can see error in machine-os build pod
       

      Actual results:
      I have applied below MOSC

      oc create -f - << EOF
      apiVersion: machineconfiguration.openshift.io/v1alpha1
      kind: MachineOSConfig
      metadata:
        name: abc   
      spec:
        machineConfigPool:
          name: worker
        buildOutputs:
          currentImagePullSecret:
            name: $(oc get -n openshift-machine-config-operator sa default -ojsonpath='{.secrets[0].name}')
        buildInputs:
          imageBuilder:
            imageBuilderType: PodImageBuilder
          baseImagePullSecret:
            name: $(oc get secret -n openshift-config pull-secret -o json | jq "del(.metadata.namespace, .metadata.creationTimestamp, .metadata.resourceVersion, .metadata.uid, .metadata.name)" | jq '.metadata.name="pull-copy"' | oc -n openshift-machine-config-operator create -f - &> /dev/null; echo -n "pull-copy")
          renderedImagePushSecret:
            name: $(oc get -n openshift-machine-config-operator sa builder -ojsonpath='{.secrets[0].name}')
          renderedImagePushspec: "image-registry.openshift-image-registry.svc:5000/openshift-machine-config-operator/ocb-image:latest"
          containerFile:
          - containerfileArch: noarch
            content: |-
              # Pull the centos base image and enable the EPEL repository.
              FROM quay.io/centos/centos:stream9 AS centos
              RUN dnf install -y epel-release        # Pull an image containing the yq utility.
              FROM docker.io/mikefarah/yq:latest AS yq        # Build the final OS image for this MachineConfigPool.
              FROM configs AS final        # Copy the EPEL configs into the final image.
              COPY --from=yq /usr/bin/yq /usr/bin/yq
              COPY --from=centos /etc/yum.repos.d /etc/yum.repos.d
              COPY --from=centos /etc/pki/rpm-gpg/RPM-GPG-KEY-* /etc/pki/rpm-gpg/        # Install cowsay and ripgrep from the EPEL repository into the final image,
              # along with a custom cow file.
              RUN sed -i 's/\$stream/9-stream/g' /etc/yum.repos.d/centos*.repo && \
                  rpm-ostree install cowsay ripgrep
      EOF
       
      $ oc get machineosconfig
      NAME   AGE
      abc    45m
      
      $  oc logs build-rendered-worker-c67571b26a7e0d94dc2bf01dca97bbe5 -f
        ...
      Copying blob sha256:a8157ed01dfc7fe15c8f2a86a3a5e30f7fcb7f3e50f8626b32425aaf821ae23d
      Copying config sha256:4b15e94c47f72b6c082272cf1547fdd074bd3539b327305285d46926f295a71b
      Writing manifest to image destination
      + return 0 
      
      $  oc get machineosbuild
      NAME                                                              PREPARED   BUILDING   SUCCEEDED   INTERRUPTED   FAILED
      worker-rendered-worker-c67571b26a7e0d94dc2bf01dca97bbe5-builder   False      True       False       False         False
      
      $  oc logs machine-os-builder-654fc664bb-qvjkn  | grep -i error
      I1003 16:12:52.463155       1 pod_build_controller.go:296] Error syncing pod openshift-machine-config-operator/build-rendered-worker-c67571b26a7e0d94dc2bf01dca97bbe5: unable to update with build pod status: could not update MachineOSConfig"abc": MachineOSConfig.machineconfiguration.openshift.io "abc" is invalid: [observedGeneration: Required value, <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]
      

       

      Expected results:

      MOSB should be successful    

      Additional info:

          

            team-mco Team MCO
            rh-ee-ptalgulk Prachiti Talgulkar
            Sergio Regidor de la Rosa Sergio Regidor de la Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: