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:
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
We should at least throw an ERROR if templates contain non-breaking whitespace.
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.
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
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days