Bug 1455115
Summary: | oc run valid image by dry run flag raises mess error | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | XiaochuanWang <xiaocwan> |
Component: | oc | Assignee: | Juan Vallejo <jvallejo> |
Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.6.0 | CC: | agoldste, aos-bugs, jokerman, jvallejo, mfojtik, mmccomas, pweil, wmeng |
Target Milestone: | --- | ||
Target Release: | 3.7.0 | ||
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: | 2017-11-28 21:56:17 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
XiaochuanWang
2017-05-24 10:02:21 UTC
[@dev] .../openshift/origin # oc run mysql --image=mysql --dry-run NAME REVISION DESIRED CURRENT TRIGGERED BY mysql 0 1 0 What is the server version? I can reproduce it and also with kubectl. There is a bug when selecting a printer with dry-run. It select a wrong printer and that doesn't have a handler for generated types. I am working on a fix. As it showed this is because printers have real issues with objects in multiple versions (v1, v1beta, ...). This was caused by last rebase to upstream. Waiting for upstream decision here: https://github.com/kubernetes/kubernetes/issues/47180 As this is a problem with HumanReadablPrinter the easiest workaround is to use '-o yaml' oc run mysql --image=mysql --dry-run -o yaml Origin PR: https://github.com/openshift/origin/pull/16020 Upstream PR: https://github.com/kubernetes/kubernetes/pull/51477 It appears that there are already changes in the upstream humanreadable printer to handle the case seen in this bug without outputting a lengthy error [1]. These changes will be brought in with the next rebase. Closing PRs from comment 6, and tagging this bug as UpcomginRelease 1. https://github.com/kubernetes/kubernetes/blob/master/pkg/printers/humanreadable.go#L331 Picked patch from upstream [1] that adds the changes mentioned in comment 7 [2] 1. https://github.com/kubernetes/kubernetes/commit/6bd0c38908daed2d4e59a3b2540d3f0564f87068 2. https://github.com/kubernetes/kubernetes/blob/master/pkg/printers/humanreadable.go#L331 This patch should fix the output of any resource without a custom printer handler by adding a default printer handler that prints object metadata as a fallback. Example: ``` $ oc run mysql --image=mysql --dry-run -o yaml NAME AGE mysql <unknown> ``` $ oc run mysql --image=mysql --dry-run NAME AGE mysql <unknown> Verified on OCP: oc v3.7.0-0.174.0 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/RHSA-2017:3188 |