Bug 1275911 - formatted/spaced JSON data not correctly displayed in pod log view
formatted/spaced JSON data not correctly displayed in pod log view
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Website (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Steve Goodwin
Yanping Zhang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-28 02:08 EDT by Erik M Jacobs
Modified: 2015-11-23 09:26 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 09:26:50 EST
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)
incorrectly spaced log view (159.27 KB, image/png)
2015-10-28 02:08 EDT, Erik M Jacobs
no flags Details
white-space (72.38 KB, image/png)
2015-10-30 02:38 EDT, Yanping Zhang
no flags Details

  None (edit)
Description Erik M Jacobs 2015-10-28 02:08:59 EDT
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@1.4.28
npm info using node@v0.10.35
npm info prestart hexboard@0.0.1

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

npm info start hexboard@0.0.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 09:10:44 EDT
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 08:23:22 EDT
Fix merged
https://github.com/openshift/origin/pull/5473
white-space should be preserved
Comment 4 Yanping Zhang 2015-10-30 02:37:31 EDT
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 02:38 EDT
Created attachment 1087820 [details]
white-space
Comment 6 Brenton Leanhardt 2015-11-23 09:26:50 EST
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.