Updating OS::Neutron::NetworkGateway failed when devices property changed

Bug #1291901 reported by Mitsuru Kanabuchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Mitsuru Kanabuchi

Bug Description

[Summary]

Updating OS::Neutron::NetworkGateway failed when devices property changed.

[How to reproduce]

  1) Create stack with template: gws.template .
  2) Update stack with template: gws-up.template . This template only changed devices property.
  3) UPDATE_FAILED occured with following log.

==========
Traceback (most recent call last):
  File "/opt/stack/heat/heat/engine/resource.py", line 411, in _do_action
    handle_data = handle()
  File "/opt/stack/heat/heat/engine/resources/neutron/network_gateway.py", line 160, in handle_create
    {'network_gateway': props})['network_gateway']
  File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 112, in with_params
    ret = self.function(instance, *args, **kwargs)
  File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 806, in create_network_gateway
    return self.post(self.network_gateways_path, body=body)
  File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 1242, in post
    headers=headers, params=params)
  File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 1165, in do_request
    self._handle_fault_response(status_code, replybody)
  File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 1135, in _handle_fault_response
    exception_handler_v20(status_code, des_error_body)
  File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 97, in exception_handler_v20message=msg)
NeutronClientException: 409-{u'NeutronError': {u'message': u'Gateway Service gws is already in use', u'type': u'NvpL2GatewayAlreadyInUse', u'detail': u''}}
==========

[Cause]

Currently, NetworkGateway's devices property doesn't have update_allowed=True.
So, UpdateReplace have used when updating devices property.
However, Neutron doesn't allow that same Gateway Services ID exist at a time.
Eventually, 409 error occured by Neutron.

Revision history for this message
Mitsuru Kanabuchi (kanabuchi) wrote :
Revision history for this message
Mitsuru Kanabuchi (kanabuchi) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
assignee: nobody → Mitsuru Kanabuchi (kanabuchi)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/80243
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=fde6cd0a8af77e87577dd3feed1f4483fc7f101c
Submitter: Jenkins
Branch: master

commit fde6cd0a8af77e87577dd3feed1f4483fc7f101c
Author: Mitsuru Kanabuchi <email address hidden>
Date: Thu Mar 13 19:45:36 2014 +0900

    Replacing NetworkGateway when devices updated

    Updating OS::Neutron::NetworkGateway failed when devices property changed.

    Currently, NetworkGateway's devices property doesn't have update_allowed=True.
    So, UpdateReplace have used when updating devices property.
    However, Neutron doesn't allow that same Gateway Services ID exist at a time.
    Eventually, 409 error occured by Neutron.

    For avoiding above error, I implemented replacing NetworkGateway in handle_update.
    The processing order is delete -> create. It can avoid the 409 error.

    Change-Id: I4021610355d03eb6ca07272cb1e44ff2b31dfff9
    Closes-bug: #1291901

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-rc1 → 2014.1
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.