Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1370104 - oc get/describe/new-app not display/indent well when template description contains newlines
oc get/describe/new-app not display/indent well when template description con...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.3.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Juan Vallejo
Xingxing Xia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-25 06:36 EDT by Xingxing Xia
Modified: 2017-07-24 10 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Multi-line output for a template description did not display all lines with correct indentation under `oc new-app` Consequence: Output for template descriptions was hard to read Fix: Added a new helper function `formatString` that indents all lines for a multi-line template description. Result: Template description for `oc new-app <my_template>` is easier to read.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-12 15:06:32 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-2017:0884 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 18:50:07 EDT

  None (edit)
Description Xingxing Xia 2016-08-25 06:36:12 EDT
Description of problem:
oc get/describe/new-app not display newlines well when template description contains newlines.

Version-Release number of selected component (if applicable):
oc v3.3.0.25+d2ac65e-dirty
kubernetes v1.3.0+507d3a7
features: Basic-Auth GSSAPI Kerberos SPNEGO

How reproducible:
Always

Steps to Reproduce:
1. Create a template which contains newline(s) in description
$ oc create -f https://raw.githubusercontent.com/openshift/origin/b1983988/examples/jenkins/jenkins-ephemeral-template.json

Download the file, will see it has newline in description:
$ cat jenkins-ephemeral-template.json
    "annotations": {
      "description": "Jenkins service, without persistent storage.\nWARNING: Any data stored will be lost upon pod destruction ...

2.
$ oc get template jenkins-ephemeral
NAME                                  DESCRIPTION   PARAMETERS   OBJECTS
jenkins-ephemeral                     Jenkins service, without persistent storage.
WARNING: Any data stored will be...   6 (1 generated)   6

3.
$ oc describe template jenkins-ephemeral
Name:		jenkins-ephemeral
Namespace:	xxia-proj
Created:	27 seconds ago
Labels:		<none>
Description:	Jenkins service, without persistent storage.
WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing
...

4.
$ oc new-app jenkins-ephemeral
--> Deploying template "jenkins-ephemeral" in project "openshift"

     jenkins-ephemeral
     ---------
     Jenkins service, without persistent storage.
WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing ...

     A Jenkins service has been created in your project.  The username/password are admin/0Sbiw6SF45Paksnv.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.

     * With parameters:
        * Jenkins Service Name=jenkins
        ...
Comment 1 XiaochuanWang 2016-11-15 00:59:05 EST
Tested on OCP oc v3.4.0.26:

Step 2 'oc get template jenkins-ephemeral' is fixed and merged in PR: https://github.com/openshift/ose/pull/462/commits/8df9d32cacc37c7e52c88ab3cf85f07f56a32cdc

Step 3 and Step 4 is still reproduced, waiting for fix.
Comment 2 Juan Vallejo 2017-01-30 18:29:27 EST
Related PR: https://github.com/openshift/origin/pull/12724
Comment 3 Xingxing Xia 2017-02-16 20:43:04 EST
Verified in v3.5.0.26. Based on comment 0 steps, now step 3 shows:
$ oc describe template jenkins-ephemeral
...
Description:	Jenkins service, without persistent storage.
		WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing
...

Step 4 shows:
$ oc new-app jenkins-ephemeral
...
     jenkins-ephemeral
     ---------
     Jenkins service, without persistent storage.
     WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing
...

So oc get/describe/new-app now display newlines well when template description contains newlines.
Comment 5 errata-xmlrpc 2017-04-12 15:06:32 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-2017:0884

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