Bug 1493974 - Special characters in the output message does not work
Summary: Special characters in the output message does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 3.10.0
Assignee: Jan Safranek
QA Contact: Chao Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-21 09:04 UTC by Chao Yang
Modified: 2018-07-30 19:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-07-30 19:08:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:09:27 UTC

Description Chao Yang 2017-09-21 09:04:18 UTC
Description of problem:
Special characters in the output message does not work 

Version-Release number of selected component (if applicable):
oc v3.7.0-0.126.6
kubernetes v1.7.0+80709908fd
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-12-10.ec2.internal:443
openshift v3.7.0-0.126.6
kubernetes v1.7.0+80709908fd

How reproducible:
Always
Steps to Reproduce:
1.Input not existed volumeID in pv.yaml
kind: PersistentVolume
apiVersion: v1
metadata:
  name: ebs1
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  awsElasticBlockStore:
    volumeID: "aws://us-east-1d/vol-08b303e28fb08a014"
    fsType: "ext4"

2.oc create -f pv.yaml
3.Output is as below:
Error from server (Forbidden): error when creating "pv.yaml": persistentvolumes "ebs1" is forbidden: error querying AWS EBS volume aws://us-east-1d/vol-08b303e28fb08a014: error querying ec2 for volume "vol-08b303e28fb08a014": "error listing AWS volumes: \"InvalidVolume.NotFound: The volume 'vol-08b303e28fb08a014' does not exist.\\n\\tstatus code: 400, request id: 22270d4c-88b3-416e-b1c4-fef461904cbd\""


Actual results:
Special character in output message does not work

Expected results:
Special character in output message should work. No \ or \n displayed 
Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

StorageClass Dump (if StorageClass used by PV/PVC):

Additional info:

Comment 1 Jan Safranek 2018-03-02 13:46:57 UTC
This is going to be fixed as side effect of bug #60490 /  https://bugzilla.redhat.com/show_bug.cgi?id=1548628. It removes fmt.Errorf("error listing AWS volumes: %q", awserror) and thus it won't escape weird characters by %q.

Example:

$ oc create -f pv.yaml 

Error from server (Forbidden): error when creating "pv.yaml": persistentvolumes "ebs1" is forbidden: error querying AWS EBS volume aws://us-east-1d/vol-08b303e28fb08a014: InvalidVolume.NotFound: The volume 'vol-08b303e28fb08a014' does not exist.
        status code: 400, request id: b5986f7b-c3ac-430d-8866-f313f82c933c

Comment 2 Jan Safranek 2018-03-02 13:59:06 UTC
(In reply to Jan Safranek from comment #1)
> This is going to be fixed as side effect of bug #60490 

Sorry, bug #1548628, not sure where 60490 came from :-(

Comment 3 Jan Safranek 2018-03-06 15:45:06 UTC
1.10 PR: https://github.com/openshift/origin/pull/18856

Comment 4 Jan Safranek 2018-03-09 15:55:40 UTC
1.9 PR: https://github.com/openshift/origin/pull/18878

Comment 6 Chao Yang 2018-05-16 06:25:48 UTC
It is passed on 
openshift v3.10.0-0.46.0
kubernetes v1.10.0+b81c8f8

The error message is as below:
Error from server (Forbidden): error when creating "pv.yaml": persistentvolumes "ebs1" is forbidden: error querying AWS EBS volume aws://us-east-1d/vol-08b303e28fb08a014: InvalidVolume.NotFound: The volume 'vol-08b303e28fb08a014' does not exist.
	status code: 400, request id: 424c8ab2-e909-4071-82a9-396d0cf99ff1

Comment 8 errata-xmlrpc 2018-07-30 19:08:59 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-2018:1816


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