Comment 2 for bug 1587359

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

Reviewed: https://review.openstack.org/323428
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a8da782051fc085fcb417c6d277a5e27586e2380
Submitter: Jenkins
Branch: master

commit a8da782051fc085fcb417c6d277a5e27586e2380
Author: Ihar Hrachyshka <email address hidden>
Date: Tue May 31 16:51:30 2016 +0200

    Guard against config_dirs not defined on ConfigOpts

    Turned out that if the code extracts config_dirs value from ConfigOpts
    objects before config files are parsed, then oslo.config will raise
    NoSuchOptError exception.

    This is not a usual mode of operation for the code, since main()
    function of the process using it is expected to parse CLI and config
    files before using it, it may nevertheless happen in some test code.

    This patch guards against those exceptions, falling back to
    /etc/neutron, as we already do when --config-dir is not specified.

    Change-Id: I00cf824baa8580b7aa7ec4518a4741e49c998364
    Closes-Bug: #1587359