Bug 1552325
| Summary: | oc export daemonset no longer includes important information | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Eric Jones <erjones> |
| Component: | oc | Assignee: | Juan Vallejo <jvallejo> |
| Status: | CLOSED WONTFIX | QA Contact: | Xingxing Xia <xxia> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.7.0 | CC: | aos-bugs, bdooley, decarr, erich, jokerman, maszulik, mfojtik, mmccomas, wmeng, xxia |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | 3.7.z | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
We switched to using unstructured objects for oc export in 3.7 as a way to avoid using hardcoded resource types in the client.
Consequence:
oc export fails for certain resources
Fix:
Add a fallback encoding to allow the command to behave correctly when dealing with these problematic resources.
Result:
oc export works just fine.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-26 15:39:30 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: | |||
|
Description
Eric Jones
2018-03-06 23:00:21 UTC
Agree with Maciej. *** Bug 1553696 has been marked as a duplicate of this bug. *** Checked in v3.7.44 env, oc export can work for ds, sts, deployment, hpa, etc, and the exported yaml files can work in `oc create -f`. However, deployment has one problem (ds, sts, hpa don't have): # oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/tc536600/hello-deployment-1.yaml While `oc export deploy`, `oc export deploy hello-openshift`, `oc export deployment/hello-openshift` work, with slash it has problem: # oc export deploy/hello-openshift error: apps/v1beta1, Kind=Deployment is unstructured and is not suitable for converting to "extensions/v1beta1" And with another flag --loglevel it can print yaml: round_trippers.go:405] GET https://localhost:8443/apis/extensions/v1beta1/namespaces/xxia-proj-2/deployments/hello-openshift 200 OK in 8 milliseconds I0417 05:03:20.100051 96586 exporter.go:249] No export strategy defined for objects of type *extensions.Deployment I0417 05:03:20.101835 96586 result.go:260] info: the output version specified is invalid. Defaulting to "v1beta1" apiVersion: extensions/v1beta1 kind: Deployment metadata: ...snipped.. I am unable to replicate the error seen in comment 9. I am using the 3.7.44 version of the client, against a 3.7 master. ``` $ oc version oc v3.7.44-1+6b061d4 kubernetes v1.7.6+a08f5eeb62 features: Basic-Auth Server https://127.0.0.1:8443 openshift v3.7.0+7ed6862 kubernetes v1.7.6+a08f5eeb62 ``` I am able to do `oc export deploy/hello-openshift`, `oc export deployment.extension/hello-openshift`, `oc export deploy hello-openshift`, `oc export deploy/hello-openshift`, etc. with no errors. What version of the server are you running against? Any chance you could provide access to a cluster that replicates the issue from comment 9? (or try with a newer / slightly older version of the client?) A workaround for the deployments issue is to specify the group along with the resource kind: ``` $ oc export deploy.apps/hello-openshift ``` |