Bug 1418021 - oc create route dry-run -o yaml does not output a route object
Summary: oc create route dry-run -o yaml does not output a route object
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 3.11.z
Assignee: Jacob Tanenbaum
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-31 15:54 UTC by Jacob Tanenbaum
Modified: 2022-08-04 22:20 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Outputing the route object was not implemented for for "oc create route dry-run -o yaml" Consequence: the above command worked differently then similar commands for other openshift objects Fix: Implement the printing of the route object similar to other openshift objects Result: the route object is printed to the command line when the command is issued
Clone Of:
Environment:
Last Closed: 2019-06-26 09:07:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 19867 0 None None None 2018-05-29 15:16:45 UTC
Red Hat Product Errata RHBA-2019:1605 0 None None None 2019-06-26 09:07:59 UTC

Description Jacob Tanenbaum 2017-01-31 15:54:02 UTC
Description of problem:
The help text for oc create route ( edge | passthrough | reedirect) includes this entry 

`--dry-run=false: If true, only print the object that would be sent,
without sending it` 

this does not happen. 

Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1. oc create route edge --service=(valid service) --dry-run -o yaml

Actual results:

route "hello-openshift" created (dry run)
printed to stdout

Expected results:
the yaml file representing the route printed to stdout

Additional info:

Comment 1 openshift-github-bot 2018-06-07 00:39:03 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/c42f1f7bf4a45e62b38d33dd1511cecc24efc03c
support the --output flag in 'oc create route'

currently using the --output flag with 'oc create route does not show the resulting object. I changed
that so the the file is printed reflecting the information provided in the help text

bug 1418021
https://bugzilla.redhat.com/show_bug.cgi?id=1418021

Comment 2 Weibin Liang 2018-12-06 21:37:10 UTC
Tested and passed in v3.11.51

[root@qe-weliang-311-2-master-etcd-nfs-1 tmp]# oc create route edge --service=blue-service --dry-run -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  creationTimestamp: null
  name: blue-service
spec:
  host: ""
  tls:
    termination: edge
  to:
    kind: ""
    name: blue-service
    weight: null
status:
  ingress: null
[root@qe-weliang-311-2-master-etcd-nfs-1 tmp]# oc version
oc v3.11.51
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://qe-weliang-311-2-master-etcd-nfs-1.int.1207-zea.qe.rhcloud.com:8443
openshift v3.11.51
kubernetes v1.11.0+d4cacc0
[root@qe-weliang-311-2-master-etcd-nfs-1 tmp]#

Comment 4 errata-xmlrpc 2019-06-26 09:07:51 UTC
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-2019:1605


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