Bug 1275911

Summary: formatted/spaced JSON data not correctly displayed in pod log view
Product: OpenShift Container Platform Reporter: Erik M Jacobs <ejacobs>
Component: WebsiteAssignee: Steve Goodwin <sgoodwin>
Status: CLOSED CURRENTRELEASE QA Contact: Yanping Zhang <yanpzhan>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-23 14:26:50 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:
Attachments:
Description Flags
incorrectly spaced log view
none
white-space none

Description Erik M Jacobs 2015-10-28 06:08:59 UTC
Created attachment 1087146 [details]
incorrectly spaced log view

atomic-openshift-3.0.2.903-0.git.73.16a78c7.el7aos.x86_64
atomic-openshift-clients-3.0.2.903-0.git.73.16a78c7.el7aos.x86_64
atomic-openshift-master-3.0.2.903-0.git.73.16a78c7.el7aos.x86_64
atomic-openshift-node-3.0.2.903-0.git.73.16a78c7.el7aos.x86_64
atomic-openshift-sdn-ovs-3.0.2.903-0.git.73.16a78c7.el7aos.x86_64
tuned-profiles-atomic-openshift-node-3.0.2.903-0.git.73.16a78c7.el7aos.x86_64

Actual data from download below:
npm info it worked if it ends with ok
npm info using npm.28
npm info using node.35
npm info prestart hexboard.1

> hexboard.1 start /opt/app-root/src
> node server/server.js

npm info start hexboard.1
SERVER Listening on 0.0.0.0:8080
POD list options https://172.30.0.1/api/v1beta3/namespaces/foo/pods
POD Wed Oct 28 2015 02:01:14 GMT-0400 (EDT)
POD Connection error: { code: 404,
  options: 
   { url: 'https://172.30.0.1/api/v1beta3/namespaces/foo/pods',
     auth: { bearer: 'cRJecFYEpmqkYUncLB5Vqhl-taKi2feSfpzkBo5hf7s' },
     pool: 
      { domain: null,
        _events: [Object],
        _maxListeners: 10,
        options: [Object],
        requests: {},
        sockets: {},
        maxSockets: 8,
        createConnection: [Function],
        'https:false': [Object] },
     method: 'get',
     qs: {},
     rejectUnauthorized: false,
     strictSSL: false },
  msg: '{\n  "kind": "Status",\n  "apiVersion": "v1",\n  "metadata": {},\n  "status": "Failure",\n  "message": "the server could not find the requested resource",\n  "reason": "NotFound",\n  "details": {},\n  "code": 404\n}\n' }

Attachment has view of log, note lack of spacing.

Comment 2 Jessica Forrester 2015-10-28 13:10:44 UTC
Steve I'm guessing this is because we need to add white-space: pre to the styles for the log lines.

Comment 3 Steve Goodwin 2015-10-29 12:23:22 UTC
Fix merged
https://github.com/openshift/origin/pull/5473
white-space should be preserved

Comment 4 Yanping Zhang 2015-10-30 06:37:31 UTC
Tested on devenv-fedora_2595.
openshift v1.0.7-32-gd17e473
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2

View logs on web console, when there is white-space in the head of the line, it will be preserved, and shown in the log box.

The bug has been fixed, so move it to verified.

Comment 5 Yanping Zhang 2015-10-30 06:38:09 UTC
Created attachment 1087820 [details]
white-space

Comment 6 Brenton Leanhardt 2015-11-23 14:26:50 UTC
This fix is available in OpenShift Enterprise 3.1.