Devstack failed with tls-proxy enabled

Bug #1727613 reported by Wayne Chan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
yatin

Bug Description

When using devstack to install magnum, and with tls-proxy enabled. Installation will failed.

My devstack mainly configuration local.conf as follows:
[[local|localrc]]
HOST_IP=192.168.101.4
SERVICE_HOST=${HOST_IP}
MYSQL_HOST=${HOST_IP}
RABBIT_HOST=${HOST_IP}
GLANCE_HOSTPORT=${HOST_IP}
ADMIN_PASSWORD=123456
DATABASE_PASSWORD=${ADMIN_PASSWORD}
RABBIT_PASSWORD=${ADMIN_PASSWORD}
SERVICE_PASSWORD=${ADMIN_PASSWORD}

# Pre-requisite
ENABLED_SERVICES=rabbit,mysql,key
# Horizon
ENABLED_SERVICES+=,horizon
# Nova
ENABLED_SERVICES+=,n-api,n-cpu,n-cond,n-sch
# Glance
ENABLED_SERVICES+=,g-api,g-reg
# Neutron
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta
# Enable LBaaS v2
ENABLED_SERVICES+=,q-lbaasv2
ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api
# Cinder
ENABLED_SERVICES+=,c-api,c-vol,c-sch
# Heat
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-eng
# TLS
ENABLED_SERVICES+=,tls-proxy

disable_service tempest

enable_plugin magnum https://github.com/openstack/magnum stable/pike
MAGNUM_BRANCH=stable/pike
enable_plugin magnum-ui https://github.com/openstack/magnum-ui stable/pike
MAGNUMCLIENT_BRANCH=stable/pike

After wait for an installation time, in logs/stack.sh.log we can see following errors:

[13:17:14]2017-10-26 05:17:12.808 | ++ESC[3242m/opt/stack/magnum/devstack/lib/magnum:start_magnum_api:324 ESC[m^O start_tls_proxy '*' 9511 192.168.101.4 19511
[13:17:14]2017-10-26 05:17:12.808 | ++ESC[3242m/opt/stack/magnum/devstack/lib/magnum:start_magnum_api:329 ESC[m^O run_process magnum-api /usr/bin/magnum-api
[13:17:14]2017-10-26 05:17:12.809 | ++ESC[3242m/opt/stack/magnum/devstack/lib/magnum:start_magnum_api:325 ESC[m^O start_tls_proxy '*' 192.168.101.4
[13:17:14]2017-10-26 05:17:12.816 | ++ESC[3242mfunctions-common:run_process:1570
[13:17:14]ESC[m^O local service=magnum-api
[13:17:14]2017-10-26 05:17:12.816 | ++ESC[3242mlib/tls:start_tls_proxy:492
[13:17:14]ESC[m^O local 'b_service=*-tls-proxy'
...
[13:17:14]2017-10-26 05:17:12.969 | +++ESC[3242mlib/apache:apache_site_config_for:174
[13:17:14]ESC[m^O '[' -f /etc/httpd/conf.d/glance-registry-tls-proxy.conf /etc/httpd/conf.d/http-services-tls-proxy.conf /etc/httpd/conf.d/keystone-auth-tls-proxy.conf /etc/httpd/conf.d/keystone-service-tls-proxy.conf /etc/httpd/conf.d/neutron-tls-proxy.conf ']'
[13:17:14]2017-10-26 05:17:12.970 | /opt/stack/devstack/lib/apache: line 174: [: too many arguments
...
[13:18:15]ESC[m^O return 124
[13:18:15]2017-10-26 05:18:13.935 | ++ESC[3242m/opt/stack/magnum/devstack/lib/magnum:start_magnum_api:332 ESC[m^O die 332 'magnum-api did not start'
[13:18:15]2017-10-26 05:18:13.941 | ++ESC[3242mfunctions-common:die:186
[13:18:15]ESC[m^O local exitcode=0
[13:18:15]2017-10-26 05:18:13.948 | [Call Trace]
[13:18:15]2017-10-26 05:18:13.948 | stack.sh:1411:run_phase
[13:18:15]2017-10-26 05:18:13.948 | /opt/stack/devstack/functions-common:2007:run_plugins
[13:18:15]2017-10-26 05:18:13.948 | /opt/stack/devstack/functions-common:1974:source
[13:18:15]2017-10-26 05:18:13.948 | /opt/stack/magnum/devstack/plugin.sh:41:start_magnum
[13:18:15]2017-10-26 05:18:13.948 | /opt/stack/magnum/devstack/lib/magnum:356:start_magnum_api
[13:18:15]2017-10-26 05:18:13.948 | /opt/stack/magnum/devstack/lib/magnum:332:die
[13:18:15]2017-10-26 05:18:13.952 | [ERROR] /opt/stack/magnum/devstack/lib/magnum:332 magnum-api did not start
[13:18:16]2017-10-26 05:18:14.955 | exit_trap: cleaning up child processes
[13:18:16]2017-10-26 05:18:14.955 | stack.sh: line 527: kill: (949) - No such process

I found there are two mistakes in magnum/devstack/lib/magnum.
https://github.com/openstack/magnum/blob/master/devstack/lib/magnum#L323
1. start_tls_proxy should run before run_process magnum-api
2. start_tls_proxy missing parameter "magnum"

Wayne Chan (wayne.chan)
Changed in magnum:
status: New → In Progress
assignee: nobody → Wayne Chan (wayne.chan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/515285

Changed in magnum:
assignee: Wayne Chan (wayne.chan) → yatin (yatinkarel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to magnum (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/518700

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by yatin (<email address hidden>) on branch: master
Review: https://review.openstack.org/518700
Reason: Being handled here:- https://review.openstack.org/#/c/447687/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/515285
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=c6095246279025603e974e75a984ff86e3f07e2a
Submitter: Zuul
Branch: master

commit c6095246279025603e974e75a984ff86e3f07e2a
Author: chenlx <email address hidden>
Date: Thu Oct 26 14:12:50 2017 +0800

    Fix: magnum devstack installation with tls-proxy

    Fix wrongly used start_tls_proxy function and correctly set api port
    when tls-proxy is enabled.

    Also remove start_tls_proxy for ec2 which is not required.

    Co-Authored-By: yatin <email address hidden>
    Change-Id: I71b85b5cb018dd790e13aaa1eeefcbb8ac0b3b85
    Closes-Bug: #1727613

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 6.0.0

This issue was fixed in the openstack/magnum 6.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.