Comment 1 for bug 1355429

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

This is similar to https://bugs.launchpad.net/devstack/+bug/1310858.

lib/neutron is a bit of a mess and the dependencies between the functions that start services and those that configure them is very unclear. Many of the files default config paths as well as the arguments that get passed to service binaries get set within configuration functions and later re-used by those that start functions. With grenade importing lib/neutron and only calling the latter start functions on the far side of the upgrade, it loses some required context. Ie, in the case of this bug the vpn agent must be passed '-$L3_CONF_FILES':

function start_neutron_agents {
    ...
    if is_service_enabled q-fwaas; then
        L3_CONF_FILES="$L3_CONF_FILES --config-file $Q_FWAAS_CONF_FILE"
        VPN_CONF_FILES="$VPN_CONF_FILES --config-file $Q_FWAAS_CONF_FILE"
    fi
    if is_service_enabled q-vpn; then
        screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $VPN_CONF_FILES"
    else
        screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY $L3_CONF_FILES"
    fi
   ....
}

function _configure_neutron_l3_agent {
     ...
      if is_service_enabled q-vpn; then
        Q_VPN_CONF_FILE=$NEUTRON_CONF_DIR/vpn_agent.ini
        cp $NEUTRON_DIR/etc/vpn_agent.ini $Q_VPN_CONF_FILE
        VPN_CONF_FILES="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE --config-file=$Q_VPN_CONF_FILE"
        for cfg_file in ${Q_VPN_EXTRA_CONF_FILES[@]}; do
            VPN_CONF_FILES+=" --config-file $cfg_file"
        done
}

grenade does not call the configure code as part of the upgrade, and hence the agent never receives proper arguments on post-upgrade restart.