Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1503601 - `oc apply view-last-applied` shows confusing "MISSING" in yaml/json output
`oc apply view-last-applied` shows confusing "MISSING" in yaml/json output
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.7.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.8.0
Assigned To: Juan Vallejo
Xingxing Xia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-18 09:09 EDT by Xingxing Xia
Modified: 2018-03-28 10:08 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-28 10:08:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 None None None 2018-03-28 10:08 EDT

  None (edit)
Description Xingxing Xia 2017-10-18 09:09:25 EDT
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:
Comment 1 Juan Vallejo 2017-10-20 15:19:49 EDT
Fabiano, I can take this bug, if that's okay

Origin PR: https://github.com/openshift/origin/pull/16983
Comment 2 Xingxing Xia 2017-10-24 05:33:17 EDT
Verified in oc v3.7.0-0.176.0, now no confusing "Missing" and "25%!" in step 4
Comment 5 errata-xmlrpc 2018-03-28 10:08:09 EDT
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

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