lbaas-poolmember: subnet is optional according to docs, but actually required

Bug #1585100 reported by Dmitriy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Opinion
Low
Unassigned

Bug Description

I have devstack master with neutron lbaas with octavia.
And I tried to create poolmember with this Heat template:
heat_template_version: 2013-05-23

resources:
  port:
    type: OS::Neutron::LBaaS::PoolMember
    properties:
      pool: 7abe4251-c643-414a-8776-7346b9c09e71
      address: 5.5.5.5
      protocol_port: 5555

And then I got an error:
2016-05-24 11:20:26.239 INFO heat.engine.resource [req-3734d004-fe1d-4e55-8978-15c9251d5f30 None demo] CREATE: PoolMember "port" Stack "test_pool" [0ae40413-9d58-4840-8915-67dbc43f9035]
2016-05-24 11:20:26.239 TRACE heat.engine.resource Traceback (most recent call last):
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 715, in _action_recorder
2016-05-24 11:20:26.239 TRACE heat.engine.resource yield
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 795, in _do_action
2016-05-24 11:20:26.239 TRACE heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/scheduler.py", line 329, in wrapper
2016-05-24 11:20:26.239 TRACE heat.engine.resource step = next(subtask)
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 763, in action_handler_task
2016-05-24 11:20:26.239 TRACE heat.engine.resource done = check(handler_data)
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/openstack/neutron/lbaas/pool_member.py", line 168, in check_create_complete
2016-05-24 11:20:26.239 TRACE heat.engine.resource self.pool_id, {'member': properties})['member']
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1110, in create_lbaas_member
2016-05-24 11:20:26.239 TRACE heat.engine.resource return self.post(self.lbaas_members_path % lbaas_pool, body=body)
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 347, in post
2016-05-24 11:20:26.239 TRACE heat.engine.resource headers=headers, params=params)
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 282, in do_request
2016-05-24 11:20:26.239 TRACE heat.engine.resource self._handle_fault_response(status_code, replybody, resp)
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 257, in _handle_fault_response
2016-05-24 11:20:26.239 TRACE heat.engine.resource exception_handler_v20(status_code, error_body)
2016-05-24 11:20:26.239 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 84, in exception_handler_v20
2016-05-24 11:20:26.239 TRACE heat.engine.resource request_ids=request_ids)
2016-05-24 11:20:26.239 TRACE heat.engine.resource BadRequest: Failed to parse request. Required attribute 'subnet_id' not specified
2016-05-24 11:20:26.239 TRACE heat.engine.resource Neutron server returns request_ids: ['req-307da359-cccb-4b57-a9cb-0a29186e62cb']

I also tried to create poolmember with cli, and got a message that subnet is required to create poolmember.

But according to docs http://developer.openstack.org/api-ref-networking-v2-ext.html#createMemberv2 subnet is optional.

Tags: lbaas
Revision history for this message
Atsushi SAKAI (sakaia) wrote :

Thank you for reporting, Currently Api-ref is developed by each component.
Would you wait to add api-ref-jobs for neutron?
Then you can see new manual like follows.
  http://developer.openstack.org/api-ref/orchestration/

Currently neutron setup is not finished yet.
https://github.com/openstack-infra/project-config/blob/0fa1f6abdcba1afd943ed830d9fab5eb80aa250a/jenkins/jobs/projects.yaml#L3838

Revision history for this message
cat lookabaugh (cat-lookabaugh) wrote :

The add member to pool operation does indeed specify that subnet is optional, however it also says "If you omit the subnet_id parameter, LBaaS uses the vip_subnet_id parameter value for the subnet UUID. ".

Perhaps there should be additional clarification around what the vip_subnet_id is, and where it is set?

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

It does not seem to me like there is anything to fix on neutron-lbaas side. The wording quoted by 'cat' seems fine to me.

tags: added: lbaas
Changed in neutron:
importance: Undecided → Wishlist
status: New → Opinion
importance: Wishlist → Low
Anne Gentle (annegentle)
no longer affects: openstack-api-site
Revision history for this message
Rabi Mishra (rabi) wrote :

"If you omit the subnet_id parameter, LBaaS uses the vip_subnet_id parameter value for the subnet UUID. "

This statement does not seem to be valid for lbaasv2(Was true for lbaasv1). API extension(request validation) does not allow it to be optional[1]. Also cli mentions this as required[2].

[1] https://github.com/openstack/neutron-lbaas/blob/master/neutron_lbaas/extensions/loadbalancerv2.py#L392-L394
[2] https://github.com/openstack/python-neutronclient/blob/master/neutronclient/neutron/v2_0/lb/v2/member.py#L93

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.