Bug 1275911 - formatted/spaced JSON data not correctly displayed in pod log view
Summary: formatted/spaced JSON data not correctly displayed in pod log view
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Website
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Steve Goodwin
QA Contact: Yanping Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-28 06:08 UTC by Erik M Jacobs
Modified: 2015-11-23 14:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 14:26:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
incorrectly spaced log view (159.27 KB, image/png)
2015-10-28 06:08 UTC, Erik M Jacobs
no flags Details
white-space (72.38 KB, image/png)
2015-10-30 06:38 UTC, Yanping Zhang
no flags Details

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.


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