← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1547678] [NEW] Service plugins loaded on startup don't extend API resources

 

Public bug reported:

As part of [1] and [2], support was added to load service plugins at
start-up.

Specifically [1] added the 'auto-allocated-topology' (aka 'get me a
network') as a default service plugin for neutron.

However, this auto-allocated-topology when loaded as a default service
plugin does not appear to extend the network resource it defines [3];
adding a 'is_default' attribute to networks.

Therefore there's currently no way to set a network as default:
---
neutron --debug net-create default-ext-net --router:external=True --is-default True
...
DEBUG: keystoneauth.session REQ: curl -g -i -X POST http://10.34.232.114:9696/v2.0/networks.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}8020291c3aa0de969eddc411f24d1cc47749e3af" -d '{"network": {"is_default": "True", "router:external": "True", "name": "default-ext-net", "admin_state_up": true}}'
DEBUG: keystoneauth.session RESP: [400] Date: Fri, 19 Feb 2016 21:35:26 GMT Connection: keep-alive Content-Type: application/json; charset=UTF-8 Content-Length: 111 X-Openstack-Request-Id: req-f4cf54a0-a0d0-4d8d-88d5-a050f897678e
RESP BODY: {"NeutronError": {"message": "Unrecognized attribute(s) 'is_default'", "type": "HTTPBadRequest", "detail": ""}}

DEBUG: neutronclient.v2_0.client Error message: {"NeutronError": {"message": "Unrecognized attribute(s) 'is_default'", "type": "HTTPBadRequest", "detail": ""}}
ERROR: neutronclient.shell Unrecognized attribute(s) 'is_default'
...
---

Note -- that from my logs I can see the extension being loaded:

2016-02-19 13:08:41.848 8202 DEBUG neutron.manager [-] Successfully
loaded auto-allocated-topology plugin. Description: Auto Allocated
Topology - aka get me a network. _load_service_plugins
/opt/stack/neutron/neutron/manager.py:207


Perhaps the extension manager extend_resources() is not called in the call-flow of loading default service plugins?


[1] https://review.openstack.org/#/c/273439/10
[2] https://bugs.launchpad.net/neutron/+bug/1544383
[3] https://github.com/openstack/neutron/blob/master/neutron/extensions/auto_allocated_topology.py#L36

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1547678

Title:
  Service plugins loaded on startup don't extend API resources

Status in neutron:
  New

Bug description:
  As part of [1] and [2], support was added to load service plugins at
  start-up.

  Specifically [1] added the 'auto-allocated-topology' (aka 'get me a
  network') as a default service plugin for neutron.

  However, this auto-allocated-topology when loaded as a default service
  plugin does not appear to extend the network resource it defines [3];
  adding a 'is_default' attribute to networks.

  Therefore there's currently no way to set a network as default:
  ---
  neutron --debug net-create default-ext-net --router:external=True --is-default True
  ...
  DEBUG: keystoneauth.session REQ: curl -g -i -X POST http://10.34.232.114:9696/v2.0/networks.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}8020291c3aa0de969eddc411f24d1cc47749e3af" -d '{"network": {"is_default": "True", "router:external": "True", "name": "default-ext-net", "admin_state_up": true}}'
  DEBUG: keystoneauth.session RESP: [400] Date: Fri, 19 Feb 2016 21:35:26 GMT Connection: keep-alive Content-Type: application/json; charset=UTF-8 Content-Length: 111 X-Openstack-Request-Id: req-f4cf54a0-a0d0-4d8d-88d5-a050f897678e
  RESP BODY: {"NeutronError": {"message": "Unrecognized attribute(s) 'is_default'", "type": "HTTPBadRequest", "detail": ""}}

  DEBUG: neutronclient.v2_0.client Error message: {"NeutronError": {"message": "Unrecognized attribute(s) 'is_default'", "type": "HTTPBadRequest", "detail": ""}}
  ERROR: neutronclient.shell Unrecognized attribute(s) 'is_default'
  ...
  ---

  Note -- that from my logs I can see the extension being loaded:

  2016-02-19 13:08:41.848 8202 DEBUG neutron.manager [-] Successfully
  loaded auto-allocated-topology plugin. Description: Auto Allocated
  Topology - aka get me a network. _load_service_plugins
  /opt/stack/neutron/neutron/manager.py:207

  
  Perhaps the extension manager extend_resources() is not called in the call-flow of loading default service plugins?


  [1] https://review.openstack.org/#/c/273439/10
  [2] https://bugs.launchpad.net/neutron/+bug/1544383
  [3] https://github.com/openstack/neutron/blob/master/neutron/extensions/auto_allocated_topology.py#L36

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1547678/+subscriptions


Follow ups