Description of problem: `oc apply view-last-applied` shows confusing "MISSING" in yaml/json output Version-Release number of selected component (if applicable): First found in oc/openshift v3.7.0-0.159.0 Double confirmed occurrence in oc/openshift v3.6.173.0.52 How reproducible: Always Steps to Reproduce: 1. Create DC $ oc run hello --image=openshift/hello-openshift 2. Wait app pod becomes Running, then prepare DC yaml for following `oc apply` $ oc export dc hello > mydc.yaml $ vi mydc.yaml # do some edit and save, e.g. add one label key/value pair metadata: ... labels: run: hello label1: value1 # this is the edit name: hello ... 3. Run `oc apply` $ oc apply -f mydc.yaml 4. Then run $ oc apply view-last-applied dc/hello Actual results: 3. Cmd succeeds with message '... deploymentconfig "hello" configured' 4. It shows confusing 2 "MISSING"s and 2 '25%!'s in the yaml output (in `-o json` output, too). This output is invalid yaml. Save it in a file, the file cannot be used in `oc create -f` $ oc apply view-last-applied dc/hello apiVersion: v1 kind: DeploymentConfig metadata: annotations: {} creationTimestamp: null generation: 1 labels: label1: value1 run: hello name: hello namespace: xxia-proj spec: replicas: 1 selector: run: hello strategy: activeDeadlineSeconds: 21600 resources: {} rollingParams: intervalSeconds: 1 maxSurge: 25%! (MISSING) maxUnavailable: 25%! (MISSING) timeoutSeconds: 600 updatePeriodSeconds: 1 type: Rolling template: metadata: creationTimestamp: null labels: run: hello spec: containers: - image: openshift/hello-openshift imagePullPolicy: Always name: hello resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 test: false triggers: - type: ConfigChange status: availableReplicas: 0 latestVersion: 0 observedGeneration: 0 replicas: 0 unavailableReplicas: 0 updatedReplicas: 0 Expected results: 4. The output should be valid yaml without confusing "Missing" and "25%!" Additional info:
Fabiano, I can take this bug, if that's okay Origin PR: https://github.com/openshift/origin/pull/16983
Verified in oc v3.7.0-0.176.0, now no confusing "Missing" and "25%!" in step 4
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, 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/RHBA-2018:0489