diff options
author | Ilya Etingof <etingof@gmail.com> | 2019-03-19 18:58:35 +0100 |
---|---|---|
committer | Iury Gregory Melo Ferreira <iurygregory@gmail.com> | 2019-03-27 09:04:18 +0000 |
commit | 7c2f2c30ea03fcd13ca449f5bd6f82b2b95a6924 (patch) | |
tree | 4d25c3678f5fc8e6c8a74411d7b2d3e1ce9d1177 /devstack | |
parent | fafe90ce89a389f61ef28843fd6d2f9e98a0a39b (diff) | |
download | ironic-7c2f2c30ea03fcd13ca449f5bd6f82b2b95a6924.tar.gz |
Respect $USE_PYTHON3 settings for gunicorn
When devstack is configured to use Py3, install and run gunicorn3
to make sure sushy-tools emulator is running under Py3.
Change-Id: If38ef523a8616084f8f715fe247d8a3c8142bf62
(cherry picked from commit f25a83b575e1d5a452fd4ca4bde2917f1e95eb4a)
Diffstat (limited to 'devstack')
-rw-r--r-- | devstack/lib/ironic | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 5f2ea5ee3..21939b9ba 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -813,14 +813,7 @@ function _generate_pdu_ports { } function start_redfish_emulator { - # TODO(lucasagomes): Use Apache WSGI instead of gunicorn - if is_ubuntu; then - install_package gunicorn - else - pip_install_gr "gunicorn" - fi - - sudo gunicorn sushy_tools.emulator.main:app --bind "${HOST_IP}:${IRONIC_REDFISH_EMULATOR_PORT}" \ + sudo $gunicorn sushy_tools.emulator.main:app --bind "${HOST_IP}:${IRONIC_REDFISH_EMULATOR_PORT}" \ --pid "$IRONIC_REDFISH_EMULATOR_PID_FILE" --daemon } @@ -839,6 +832,20 @@ function setup_redfish { fi if [[ "$IRONIC_IS_HARDWARE" == "False" ]]; then + + # TODO(lucasagomes): Use Apache WSGI instead of gunicorn + gunicorn=gunicorn + + if python3_enabled; then + gunicorn=${gunicorn}3 + fi + + if is_ubuntu; then + install_package $gunicorn + else + pip_install_gr "gunicorn" + fi + if use_library_from_git "sushy-tools"; then git_clone_by_name "sushy-tools" setup_dev_lib "sushy-tools" |