Fix bifrost install in kolla image

It appears that the recent fix [1] for installing a correct pyopenssl
dependency may have broken the kolla bifrost container image [2]. The
error message is as follows:

"stderr_lines": [
"  File \"<stdin>\", line 1",
"    import sys\\nprint(':'.join(sys.path))",
"                                        ^",
"SyntaxError: unexpected character after line continuation character"
],

This change attempts to address the issue by passing the '-e' argument
to echo which enables the use of escape characters. Without this, the
newline escape sequence is passed through to python unmodified, which
interprets the backslash as a line continuation.

[1] https://review.openstack.org/#/c/591646
[2]
http://logs.openstack.org/44/606644/1/gate/kolla-build-centos-source/7ff6e67/logs/build/000_FAILED_bifrost-base.txt.gz

Change-Id: Ief4a81b595eb141ce5a5192d7e6ebc50a366afac
This commit is contained in:
Mark Goddard 2018-10-02 12:08:48 +01:00
parent 1e19c45199
commit 6ed567abc0
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@
when: lookup('env', 'VENV') | length > 0
- name: "Retrieve venv python path"
shell: "echo \"import sys\\nprint(':'.join(sys.path))\" | {{ ansible_python.get('executable', '/usr/bin/python').split('/')[-1] }}"
shell: "echo -e \"import sys\\nprint(':'.join(sys.path))\" | {{ ansible_python.get('executable', '/usr/bin/python').split('/')[-1] }}"
environment: "{{ bifrost_venv_env | default({}) }}"
register: venv_pythonpath_result
when: enable_venv