Bug 1553696
| Summary: | "oc export" fails for deployment types | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Brian Dooley <bdooley> |
| Component: | oc | Assignee: | Juan Vallejo <jvallejo> |
| Status: | CLOSED DUPLICATE | QA Contact: | Xingxing Xia <xxia> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.7.1 | CC: | aos-bugs, jokerman, jrosenta, mmccomas, wmeng |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-03-09 15:15:20 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1552325 *** This bug has been marked as a duplicate of bug 1552325 *** *** Bug 1601875 has been marked as a duplicate of this bug. *** |
Description of problem: When exporting an object with "oc export", it should be able to use the output for creating new objects. And in general it does, but not for "deployments". Version-Release number of selected component (if applicable): 3.7.23 How reproducible: easy Steps to Reproduce: 1. Create a deployment file. E.g. apiVersion: extensions/v1beta1 kind: Deployment metadata: name: foo spec: selector: matchLabels: app: foo replicas: 1 template: metadata: name: foo labels: app: foo spec: containers: - name: pause image: pause:latest 2. Create the object oc create -f foo.yaml "deployment "foo" created" 3. Try and export it e.g. oc export deployment/foo | sed 's/foo/baz/g' | oc create -f - Actual results: $ oc export deployment/foo | sed 's/foo/baz/g' | oc create -f - error: unable to decode "STDIN": Object 'Kind' is missing in '{"Spec":{"MinReadySeconds":0,"Paused":false,"ProgressDeadlineSeconds":null,"Replicas":1,"RevisionHistoryLimit":null,"RollbackTo":null,"Selector":{"matchLabels":{"app":"baz"}},"Strategy":{"RollingUpdate":{"MaxSurge":1,"MaxUnavailable":1},"Type":"RollingUpdate"},"Template":{"Spec":{"ActiveDeadlineSeconds":null,"Affinity":null,"AutomountServiceAccountToken":null,"Containers":[{"Args":null,"Command":null,"Env":null,"EnvFrom":null,"Image":"docker-snapshots.artrepo.vegvesen.no/gcr/pause:latest","ImagePullPolicy":"Always","Lifecycle":null,"LivenessProbe":null,"Name":"pause","Ports":null,"ReadinessProbe":null,"Resources":{"Limits":null,"Requests":null},"SecurityContext":null,"Stdin":false,"StdinOnce":false,"TTY":false,"TerminationMessagePath":"/dev/termination-log","TerminationMessagePolicy":"File","VolumeMounts":null,"WorkingDir":""}],"DNSPolicy":"ClusterFirst","HostAliases":null,"Hostname":"","ImagePullSecrets":null,"InitContainers":null,"NodeName":"","NodeSelector":null,"RestartPolicy":"Always","SchedulerName":"default-scheduler","SecurityContext":{"FSGroup":null,"HostIPC":false,"HostNetwork":false,"HostPID":false,"RunAsNonRoot":null,"RunAsUser":null,"SELinuxOptions":null,"SupplementalGroups":null},"ServiceAccountName":"","Subdomain":"","TerminationGracePeriodSeconds":30,"Tolerations":null,"Volumes":null},"creationTimestamp":null,"labels":{"app":"baz"},"name":"baz"}},"Status":{"AvailableReplicas":1,"CollisionCount":null,"Conditions":[{"LastTransitionTime":"2018-03-08T11:12:27Z","LastUpdateTime":"2018-03-08T11:12:27Z","Message":"Deployment has minimum availability.","Reason":"MinimumReplicasAvailable","Status":"True","Type":"Available"}],"ObservedGeneration":1,"ReadyReplicas":1,"Replicas":1,"UnavailableReplicas":0,"UpdatedReplicas":1},"annotations":{"deployment.kubernetes.io/revision":"1"},"creationTimestamp":null,"generation":1,"labels":{"app":"baz"},"name":"baz"}' Expected results: "deployment "baz" created" Additional info: This may be unique to 3.7.23. This error does not occur on version 3.6 or v3.7.0-alpha.1+fdbd3dc Also, "oc get --export" works fine as a workaround