Bug 1459355 - Non-breaking white space in NodeUserData makes upload of templates into mistral timeout
Non-breaking white space in NodeUserData makes upload of templates into mistr...
Status: NEW
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: James Slagle
Arik Chernetsky
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-06 18:58 EDT by Andreas Karis
Modified: 2017-06-23 22:03 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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)
mistral logs (163.82 KB, application/x-gzip)
2017-06-07 15:37 EDT, Alex Schultz
no flags Details

  None (edit)
Description Andreas Karis 2017-06-06 18:58:08 EDT
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 18:59:58 EDT
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 19:01:36 EDT
We should at least throw an ERROR if templates contain non-breaking whitespace.
Comment 3 Alex Schultz 2017-06-07 15:37 EDT
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.

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