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:
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
(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 :-(
1.10 PR: https://github.com/openshift/origin/pull/18856
1.9 PR: https://github.com/openshift/origin/pull/18878
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
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