Bug 1459355

Summary: Non-breaking white space in NodeUserData makes upload of templates into mistral timeout
Product: Red Hat OpenStack Reporter: Andreas Karis <akaris>
Component: openstack-tripleo-commonAssignee: Thomas Hervé <therve>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: low Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: aschultz, bdobreli, brad, emacchi, gfidente, jjoyce, johfulto, jrouleau, jschluet, mariel, mburns, rbrady, rhel-osp-director-maint, slinaber, therve, tvignaud
Target Milestone: z4Keywords: Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-common-8.6.6-8.el7ost.noarch.rpm Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1655886 (view as bug list) Environment:
Last Closed: 2019-01-16 17:55:03 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:
Bug Depends On:    
Bug Blocks: 1655886    
Attachments:
Description Flags
mistral logs none

Description Andreas Karis 2017-06-06 22:58:08 UTC
Created attachment 1285621 [details]
non-breaking whitespace in templates

Description of problem:
Non-breaking white space (0xa0  / 160 dec) in NodeUserData makes upload of templates into mistral timeout.

~~~
(...)
Processing environment files /home/stack/templates/ldap-environment.yaml
Adding files {u'file:///home/stack/templates/ldap-first-boot.sh': "#!/bin/bash\n\nmkdir -p /opt/stack/puppet-modules/tripleoldap/manifests/\n\ncat <<'EOF' >> /opt/stack/puppet-modules/tripleoldap/manifests/init.pp \nclass tripleoldap ($ldap = undef){\n  if $ldap {\n    create_resources('::keystone::ldap_backend', $ldap)\n  }\n}\nEOF\n\nsetsebool -P authlogin_nsswitch_use_ldap=on 2>/dev/null\n\n", u'file:///home/stack/templates/node_user_data_multiple.yaml': '{"\\u00a0\\u00a0\\u00a0 type": "OS::Heat::SoftwareConfig", "\\u00a0\\u00a0\\u00a0 value": {"get_resource": "userdata"}, "\\u00a0 userdata": null, "\\u00a0 OS::stack_id": null, "description": "Node User Data multiple", "\\u00a0 tripleoldap-config": null, "outputs": null, "\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0 parts": null, "\\u00a0 wipe_disk": null, "\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0 - config": {"get_resource": "tripleoldap-config"}, "heat_template_version": "2014-10-16", "\\u00a0\\u00a0\\u00a0 properties": null, "\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0 config": {"get_file": "file:///home/stack/templates/ldap-first-boot.sh"}, "resources": null}'} for /home/stack/templates/ldap-environment.yaml
Getting template contents from plan overcloud
"GET /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/overcloud.yaml HTTP/1.1" 200 61999
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-files/home/stack/templates/nic-configs/cinder-storage.yaml HTTP/1.1" 201 0
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-files/home/stack/templates/nic-configs/swift-storage.yaml HTTP/1.1" 201 0
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-files/home/stack/templates/nic-configs/controller.yaml HTTP/1.1" 201 0
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-files/home/stack/templates/nic-configs/compute.yaml HTTP/1.1" 201 0
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-files/home/stack/templates/swap.yaml HTTP/1.1" 201 0
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-files/home/stack/templates/nic-configs/ceph-storage.yaml HTTP/1.1" 201 0
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-files/home/stack/templates/node_user_data_multiple.yaml HTTP/1.1" 201 0
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-files/home/stack/templates/ldap-first-boot.sh HTTP/1.1" 201 0
Starting new HTTP connection (1): 192.0.2.1
"POST /v2/action_executions HTTP/1.1" 201 25747
HTTP POST http://192.0.2.1:8989/v2/action_executions 201
"PUT /v1/AUTH_0a1148eb3a7b43ea9f99f0e57bbdb39e/overcloud/user-environment.yaml HTTP/1.1" 201 0
Starting new HTTP connection (1): 192.0.2.1
"GET /v2/environments/overcloud HTTP/1.1" 200 12474
HTTP GET http://192.0.2.1:8989/v2/environments/overcloud 200
Starting new HTTP connection (1): 192.0.2.1
"PUT /v2/environments HTTP/1.1" 200 12520
HTTP PUT http://192.0.2.1:8989/v2/environments 200
Starting new HTTP connection (1): 192.0.2.1
"POST /v2/executions HTTP/1.1" 201 480
HTTP POST http://192.0.2.1:8989/v2/executions 201
Started Mistral Workflow. Execution ID: 39433255-933e-4d63-95fe-c7a8ec9b7f60
Instantiating messaging websocket client: ws://192.0.2.1:9000
(...)
~~~

Templates attached.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Andreas Karis 2017-06-06 22:59:58 UTC
This can be fixed by replacing non-breaking whitespace:

[stack@undercloud-1 templates]$ sed -i 's/\xA0/ /g' node_user_data_multiple.yaml
[stack@undercloud-1 templates]$ sed -i 's/\xC2//g' node_user_data_multiple.yaml

Comment 2 Andreas Karis 2017-06-06 23:01:36 UTC
We should at least throw an ERROR if templates contain non-breaking whitespace.

Comment 3 Alex Schultz 2017-06-07 19:37:43 UTC
Created attachment 1285893 [details]
mistral logs

It appears to be dying in mistral but the response is also not being properly processed so the end user just gets the deploy command exiting with no information.  Attached are my mistral logs from when I was able to reproduce it on an Ocata install.

Comment 21 errata-xmlrpc 2019-01-16 17:55:03 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-2019:0068

Comment 22 Red Hat Bugzilla 2023-09-14 03:58:52 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days