Can't declare service providers both in neutron.conf and in neutron_*aas.conf

Bug #1473110 reported by Thomas Morin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Armando Migliaccio

Bug Description

Neutron server behavior is to load service providers from neutron.conf or neutron_*aas.conf but not both. [1]

If we have a case of a service provider that does not belong to any of neutron_(lbaas|fwaas|vpnaas).conf (e.g. bgpvpn from networking-bgpvpn project) we would enable it through neutron.conf. But of course we want to be able to enable both bgpvpn and other services defined through neutron_*aas.conf at the same time.

Example error where both neutron.conf and neutron_lbaas.conf are used:

root@devstack-juno-compute02:/etc/neutron# grep service_provider neutron*.conf |grep -v :#
neutron.conf:[service_providers]
neutron.conf:service_provider=BGPVPN:BaGPipe:networking_bgpvpn.neutron.services.bgpvpn.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver:default
neutron_lbaas.conf:[service_providers]
neutron_lbaas.conf:service_provider=LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default

2015-07-09 16:56:39.778 INFO neutron.manager [req-0d5c679c-d9de-42eb-8aa3-c889869486d4 None None] Loading Plugin: networking_bgpvpn.neutron.services.bgpvpn.plugin.BGPVPNPlugin
2015-07-09 16:56:39.992 WARNING neutron.services.provider_configuration [req-0d5c679c-d9de-42eb-8aa3-c889869486d4 None None] Reading service_providers from legacy location in neutron.conf, and ignoring values in neutron_*aas.conf files; this override will be going away soon.
2015-07-09 16:56:39.993 DEBUG neutron.services.provider_configuration [req-0d5c679c-d9de-42eb-8aa3-c889869486d4 None None] Service providers = ['BGPVPN:BaGPipe:networking_bgpvpn.neutron.services.bgpvpn.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver:default'] parse_service_provider_opt /opt/stack/neutron/neutron/services/provider_configuration.py:93
2015-07-09 16:56:39.998 DEBUG neutron.services.service_base [req-0d5c679c-d9de-42eb-8aa3-c889869486d4 None None] Loaded 'networking_bgpvpn.neutron.services.bgpvpn.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver' provider for service BGPVPN load_drivers /opt/stack/neutron/neutron/services/service_base.py:85
2015-07-09 16:56:39.999 INFO networking_bgpvpn.neutron.services.bgpvpn.plugin [req-0d5c679c-d9de-42eb-8aa3-c889869486d4 None None] BGP VPN Service Plugin using Service Driver: bagpipe
2015-07-09 16:56:40.000 DEBUG neutron.manager [req-0d5c679c-d9de-42eb-8aa3-c889869486d4 None None] Successfully loaded BGPVPN plugin. Description: Neutron BGP VPN connection Service Plugin _load_service_plugins /opt/stack/neutron/neutron/manager.py:196
2015-07-09 16:56:40.001 INFO neutron.manager [req-0d5c679c-d9de-42eb-8aa3-c889869486d4 None None] Loading Plugin: neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin
2015-07-09 16:56:40.536 ERROR neutron.services.service_base [req-0d5c679c-d9de-42eb-8aa3-c889869486d4 None None] No providers specified for 'LOADBALANCER' service, exiting

The solution could consist in extending the harcoded list of neutron_*.conf files that neutron reads to load service_providers [2], but this may or may not be the most sensible approach.

[1] https://review.openstack.org/gitweb?p=openstack%2Fneutron.git;a=commitdiff;h=fb3138c8d718be67505f247ca776abf15ba1504a
[2] https://github.com/openstack/neutron/blob/master/neutron/common/repos.py#L80

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

I vote for killing repos.py and provider_configuration.py and the whole idea that neutron should reimplement INI parser (the job that oslo.config does better) and allow interested parties to meld in their service_provider values by passing additional configuration files with --config-file.

The repos.py mechanism could be a temporary measure for the time of split, but since Kilo is there and has all services split, I don't think we should maitain the hack indefinitely.

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

IRC discussion at http://eavesdrop.openstack.org/irclogs/%23openstack-neutron/latest.log.html#t2015-07-09T15:16:53

A proposal from ihrachyshka is to get rid of the hardcoded list and rely only on passed --config-file .

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Incidentally I was talking to Doug about this yesterday. Let me devise a plan!

Changed in neutron:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

@Ihar: I think the rationale for having the INI parser is because of we have the same config option redefined in multiple files/services. Doesn't the oslo parser barf with ArgsAlreadyParsedError? And if it doesn't, how do you envision collating multiple values of the same MultiStr option into a single cfg.CONF.<bla>?

I'll poke at this a bit.

Revision history for this message
Doug Wiegley (dougwig) wrote :

Well, the intent was to remove service_providers from neutron entirely, and for separate repos to have separate configurations, which would include bgpvpn. The separate INI parser thing is a red herring in that discussion, and not why we're having issues.

Revision history for this message
Doug Wiegley (dougwig) wrote :

Another note, I had talked to Doug H. about how best to deal with this, and what we discussed was to have different projects use not only different configuration files, but also different directories in /etc, which gets around the auto-magic loading issue. We talked about that too late in Kilo, but nuking repos.py likely needs to happen in conjunction with that kind of separation work.

Revision history for this message
Doug Wiegley (dougwig) wrote :

Sorry for piecemeal commenting, but I just read the IRC scrollback. The plan of just using --config-file will NOT work at present, because sections are overwritten, not merged in oslo.config. The above mentioned splitting of dirs, or the separate INI parse (as today), is required to merge them together.

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

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

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

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

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

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/202212

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lbaas (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-vpnaas (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lbaas (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-vpnaas (master)

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

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

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

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

Reviewed: https://review.openstack.org/202406
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=d7ec1005a4a3a9f057941f164cd3a39182de9dd9
Submitter: Jenkins
Branch: master

commit d7ec1005a4a3a9f057941f164cd3a39182de9dd9
Author: armando-migliaccio <email address hidden>
Date: Wed Jul 15 23:55:49 2015 -0700

    Register provider configuration with ServiceTypeManager

    Instead of hard-coding advanced services, like lbaas, with the ServiceTypeManager,
    this change makes the registration explicit by leveraging the newly introduced API
    add_provider_configuration.

    Some unit testing refactoring was required to reduce code duplication and to deal
    with the new way service providers are processed.

    Related-bug: #1473110

    Change-Id: I44edcceba37ac58efcc0a53c9d1f835d9530344a

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

I was able to successfully use the registration mechanism to have Neutron read neutron_bgpvpn.conf to get service providers.

( https://review.openstack.org/#/c/208527/ )

Thanks, this fixes it for me.

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

Reviewed: https://review.openstack.org/203878
Committed: https://git.openstack.org/cgit/openstack/neutron-vpnaas/commit/?id=3b42ff35f7241bf1d3e239c094fc9604af7fb0a1
Submitter: Jenkins
Branch: master

commit 3b42ff35f7241bf1d3e239c094fc9604af7fb0a1
Author: armando-migliaccio <email address hidden>
Date: Mon Jul 20 16:46:17 2015 -0700

    Register provider configuration with ServiceTypeManager

    Instead of hard-coding advanced services, like vpnaas, with the ServiceTypeManager,
    this change makes the registration explicit by leveraging the newly introduced API
    add_provider_configuration.
    Some unit testing refactoring was required to reduce code duplication and to deal
    with the new way service providers are processed.

    Related-bug: #1473110

    Change-Id: I8924234aadf786801ffc100d7daa27acc145a195

Changed in neutron:
milestone: none → liberty-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 61121c5f2af27e31092db7ac6947f796198410a8
Author: armando-migliaccio <email address hidden>
Date: Wed Jul 8 13:48:11 2015 -0700

    Decentralize the managemement of service providers

    After the service split, some of the configuration, parsing and
    validation was kept in the neutron core; ultimately this needs to
    get closer to the services where it belongs.

    This patch starts from ProviderConfiguration and ServiceTypeManager
    classes, and aims at removing the hard-coded elements, like the list
    of known advanced services, so that in the long run we can make
    Neutron easier to plug with external services.

    Partial-bug: #1473110

    Depends-on: I44edcceba37ac58efcc0a53c9d1f835d9530344a
    Depends-on: I8924234aadf786801ffc100d7daa27acc145a195
    Change-Id: Ia4cad678e6c722ca05821dbdbf05d61523246a86

Changed in neutron:
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-vpnaas (master)

Reviewed: https://review.openstack.org/206225
Committed: https://git.openstack.org/cgit/openstack/neutron-vpnaas/commit/?id=8037e8b4c6c153fb104498827424f3bd687d8c8b
Submitter: Jenkins
Branch: master

commit 8037e8b4c6c153fb104498827424f3bd687d8c8b
Author: armando-migliaccio <email address hidden>
Date: Mon Jul 27 14:08:57 2015 -0700

    Remove fall-back logic to service provider registration

    Once [1] merges, we no longer need to catch the AttributeError
    exception, so clean this up.

    [1] https://review.openstack.org/#/c/202207

    Change-Id: I59eaf1dfd67751fdb4026407ea29e9f39fcbc2f9
    Related-bug: #1473110

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

The bulk is in, the last outstanding fix is cosmetic.

Changed in neutron:
milestone: liberty-3 → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (feature/pecan)

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/219887

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (feature/pecan)
Download full text (12.9 KiB)

Reviewed: https://review.openstack.org/219887
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=6f2849c91691a551447c2977ff0a1bead5d5d744
Submitter: Jenkins
Branch: feature/pecan

commit afd1983680aea739ef0e4b0ff2c07ab09c4a86fb
Author: armando-migliaccio <email address hidden>
Date: Tue Sep 1 15:45:50 2015 -0700

    Catch errors on 'port not found' while deleting subnet

    In some circumstances (like the one triggered by the test_dhcp_ipv6 testcase)
    calls to deleting a port and calls to deleting subnets can happen in straight
    sequence.

    If this happens the execution of the operations can interleave leading
    to the subnet deletion to fail because the port has already gone. This patch
    ensures a missing port is handled correctly.

    The method delete_subnet is ginormous and hence impossible to test at a unit
    level without proper refactoring. That can happen with a follow-up patch.

    Closes-bug: #1490832

    Change-Id: I80c3733c93b2b66c2a1c4bc3bc24272afdd88b1f

commit e27299c124d89145bf1bc23f057e1b124204235e
Author: Ihar Hrachyshka <email address hidden>
Date: Tue Sep 1 11:22:39 2015 +0200

    [rpc] pull: removed a hack to avoid object backport triggered

    Since oslo.versionedobjects 0.8.0, the object is not backported if the
    requested version is the same as the latest known.

    Change-Id: Ia1e9aa77b75261e4b2d2b24f31250ce2a2f028a7

commit 7ea38a14bd32a3697b2cd72be4c947aa19378185
Author: Pavel Bondar <email address hidden>
Date: Fri Jul 24 11:50:26 2015 +0300

    Enable py34 tests for pluggable ipam backend

    Enable neutron.tests.unit.db.test_ipam_pluggable_backend.
    It was disabled after extending ipam tests to run db_base_plugin tests,
    which are not py34 compatible yet.

    Change-Id: I3ae491fa79d4c3311a86e98db3fb2f7d5926a0ba

commit a9b72392a14a114a364785cd268f0f50615f43b0
Author: OpenStack Proposal Bot <email address hidden>
Date: Tue Sep 1 04:25:00 2015 +0000

    Updated from global requirements

    Change-Id: Ie5ad70b0afbeb5502cc41f585f6a3f2942203369

commit 28e54ef089e8b3eca8e86992340530948aec12b7
Author: sridhargaddam <email address hidden>
Date: Thu Aug 27 09:49:28 2015 +0000

    Fix import path in neutron-sanity-check for ml2_sriov opts

    neutron-sanity-check fails while importing ml2_sriov
    configuration. This patch fixes the import path and
    also includes a unit test to avoid such issues.

    Closes-Bug: #1489374
    Change-Id: I4265ee78be9e7f83e35c94187d4577b32005bef9

commit 61121c5f2af27e31092db7ac6947f796198410a8
Author: armando-migliaccio <email address hidden>
Date: Wed Jul 8 13:48:11 2015 -0700

    Decentralize the managemement of service providers

    After the service split, some of the configuration, parsing and
    validation was kept in the neutron core; ultimately this needs to
    get closer to the services where it belongs.

    This patch starts from ProviderConfiguration and ServiceTypeManager
    classes, and aims at removing the hard-coded elements, like the list
    of known advanced services, so that in the long run we can make
    Neutron ea...

tags: added: in-feature-pecan
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 9022fb1ae8f90df59c4da64450eb96de8c011715
Author: armando-migliaccio <email address hidden>
Date: Mon Jul 27 14:11:46 2015 -0700

    Remove implicit registration of *-aas service providers

    Implicit registration can be dropped when explicit registration
    for load balancer and vpn is implemented. Firewall does not
    use service providers and the ServiceTypeManager, so the
    precautionary step can be dropped altogether.

    Support for configuring providers via the service_providers section
    in neutron.conf, is no longer available, hence clear the stale
    entry points.

    DocImpact

    Closes-bug: #1473110

    Change-Id: I5e1d254b9a3a24121d9e9d3cb82f877d44079296

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lbaas (master)

Reviewed: https://review.openstack.org/206221
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=4e934ada6bb38de8512143807bcfc29362204b82
Submitter: Jenkins
Branch: master

commit 4e934ada6bb38de8512143807bcfc29362204b82
Author: armando-migliaccio <email address hidden>
Date: Mon Jul 27 13:57:09 2015 -0700

    Remove fall-back logic to service provider registration

    Once [1] merges, we no longer need to catch the AttributeError
    exception, so clean this up.

    [1] https://review.openstack.org/#/c/202207

    Related-bug: #1473110

    Change-Id: I7f3f084acfae67eaf82a959178565a05149254f4

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (feature/pecan)

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/224334

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/224357

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (feature/pecan)
Download full text (73.6 KiB)

Reviewed: https://review.openstack.org/224357
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fdc3431ccd219accf6a795079d9b67b8656eed8e
Submitter: Jenkins
Branch: feature/pecan

commit fe236bdaadb949661a0bfb9b62ddbe432b4cf5f1
Author: Miguel Angel Ajo <email address hidden>
Date: Thu Sep 3 15:40:12 2015 +0200

    No network devices on network attached qos policies

    Network devices, like internal router legs, or dhcp ports
    should not be affected by bandwidth limiting rules.

    This patch disables application of network attached policies
    to network/neutron owned ports.

    Closes-bug: #1486039
    DocImpact

    Change-Id: I75d80227f1e6c4b3f5fa7762b8dc3b0c0f1abd46

commit db4a06f7caa20a4c7879b58b20e95b223ed8eeaf
Author: Ken'ichi Ohmichi <email address hidden>
Date: Wed Sep 16 10:04:32 2015 +0000

    Use tempest-lib's token_client

    Now tempest-lib provides token_client modules as library and the
    interface is stable. So neutron repogitory doesn't need to contain
    these modules.
    This patch makes neutron use tempest-lib's token_client and removes
    the own modules for the maintenance.

    Change-Id: Ieff7eb003f6e8257d83368dbc80e332aa66a156c

commit 78aed58edbe6eb8a71339c7add491fe9de9a0546
Author: Jakub Libosvar <email address hidden>
Date: Thu Aug 13 09:08:20 2015 +0000

    Fix establishing UDP connection

    Previously, in establish_connection() for UDP protocol data were sent
    but never read on peer socket. That lead to successful read on peer side
    if this connection was filtered. Having constant testing string masked
    this issue as we can't distinguish to which test of connectivity data
    belong.

    This patch makes unique data string per test_connectivity() and
    also makes establish_connection() to create an ASSURED entry in
    conntrack table. Finally, in last test after firewall filter was
    removed, connection is re-established in order to avoid troubles with
    terminated processes or TCP continuing sending packets which weren't
    successfully delivered.

    Closes-Bug: 1478847
    Change-Id: I2920d587d8df8d96dc1c752c28f48ba495f3cf0f

commit e6292fcdd6262434a7b713ad8802db6bc8a6d3dc
Author: YAMAMOTO Takashi <email address hidden>
Date: Wed Sep 16 13:20:51 2015 +0900

    ovsdb: Fix a few docstring

    Change-Id: I53e1e21655b28fe5da60e58aeeb7cbbd103ae014

commit c22949a4449d96a67caa616290cf76b67b182917
Author: fumihiko kakuma <email address hidden>
Date: Wed Sep 16 11:52:59 2015 +0900

    Remove requirements.txt for the ofagent mechanism driver

    It is no longer used.

    Related-Blueprint: core-vendor-decomposition
    https://blueprints.launchpad.net/neutron/+spec/core-vendor-decomposition

    Change-Id: Ib31fb3febf8968e50d86dd66e1e6e1ea2313f8ac

commit d1d4de19d85f961d388c91e70f31b3bafec418c5
Author: Kevin Benton <email address hidden>
Date: Thu Sep 3 20:25:57 2015 -0700

    Always return iterables in L3 get_candidates

    The caller of this function expects iterables.

    Closes-Bug: #1494996
    Change-Id: I3d103e63f4e127a77268502415c0ddb0d804b54a

commit 1ad6ac448067306...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (feature/pecan)

Change abandoned by Doug Wiegley (<email address hidden>) on branch: feature/pecan
Review: https://review.openstack.org/224334

Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-rc1 → 7.0.0
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.