*** This bug is a duplicate of bug 1799135 ***
    https://bugs.launchpad.net/bugs/1799135

** This bug has been marked a duplicate of bug 1799135
   [l3][port_forwarding] update floating IP (has binding port_forwarding) with 
empty {} input will lose router_id

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

Title:
  router_id None is invalid in port forwarding

Status in neutron:
  Incomplete

Bug description:
  we use portforwarding in rocky (and it's very nice!), but we ran into an 
issue: 
  one of our users does something with heat, and after that we can't list the 
portforwardings on a floating ip anymore.

  the ony way out is to create a new forwarding, which adds the
  router_id again and all is well then.

  
  the server reports a "ValueError: Field `router_id' cannot be None".

  
  it looks (well, from my pov) like some inconsistency between the plugin code 
that actually sets the router_id to None (on removal of last pf?) and the 
object that doesn't allow router_id to be None. (or that the removal of the 
(last?) forward failed somehow).

  some details:

  
  floating ip show reports:
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | created_at          | 2019-01-10T16:00:34Z                 |
  | description         |                                      |
  | dns_domain          | None                                 |
  | dns_name            | None                                 |
  | fixed_ip_address    | None                                 |
  | floating_ip_address | 1.2.3.4                       |
  | floating_network_id | fc06776a-02df-4962-8513-aea8b8177fd2 |
  | id                  | 6e61da15-d150-4c53-8a3f-914c36380459 |
  | name                | 1.2.3.4                        |
  | port_details        | None                                 |
  | port_id             | None                                 |
  | project_id          | 676a889223804b8fb4ddf55319530e91     |
  | qos_policy_id       | None                                 |
  | revision_number     | 304                                  |
  | router_id           | None                                 |
  | status              | ACTIVE                               |
  | subnet_id           | None                                 |
  | tags                | []                                   |
  | updated_at          | 2019-03-07T13:22:36Z                 |
  +---------------------+--------------------------------------+


  (partial) json repsonse for that floating ip (from openstack -vv
  output):

   {"router_id": null, "status": "ACTIVE", "description": "", "tags":
  [], "port_id": null, "created_at": "2019-01-10T16:00:34Z",
  "updated_at": "2019-03-07T13:22:36Z", "floating_network_id":
  "fc06776a-02df-4962-8513-aea8b8177fd2", "port_details": null,
  "fixed_ip_address": null, "floating_ip_address": "1.2.3.4",
  "revision_number": 304, "tenant_id":
  "676a889223804b8fb4ddf55319530e91", "project_id":
  "676a889223804b8fb4ddf55319530e91", "port_forwardings": [{"protocol":
  "tcp", "internal_ip_address": "10.10.2.4", "internal_port": 22,
  "external_port": 50023}], "id": "6e61da15-d150-4c53-8a3f-
  914c36380459"}


  stack trace below

  
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource 
[req-de8e42f9-1469-4ee6-a73a-1a06b172edb5 bb762ad156de46f6888bf2ae1001cade 
676a889223804b8f
  b4ddf55319530e91 - abc44e40a0df46c2a444400bb5f6109f 
abc44e40a0df46c2a444400bb5f6109f] index failed: No details.: ValueError: Field 
`router_id' cannot 
  be None
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource Traceback (most 
recent call last):
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 98, in 
resource
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     result = 
method(request=request, **args)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 140, in wrapped
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     setattr(e, 
'_RETRY_EXCEEDED', True)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
self.force_reraise()
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in 
force_reraise
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
six.reraise(self.type_, self.value, self.tb)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 136, in wrapped
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     return 
f(*args, **kwargs)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_db/api.py", line 154, in wrapper
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     ectxt.value = 
e.inner_exc
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
self.force_reraise()
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in 
force_reraise
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
six.reraise(self.type_, self.value, self.tb)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_db/api.py", line 142, in wrapper
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     return 
f(*args, **kwargs)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 183, in wrapped
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
LOG.debug("Retry wrapper got retriable exception: %s", e)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
self.force_reraise()
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in 
force_reraise
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
six.reraise(self.type_, self.value, self.tb)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 179, in wrapped
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     return 
f(*dup_args, **dup_kwargs)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 370, in index
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     return 
self._items(request, True, parent_id)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 305, in _items
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     obj_list = 
obj_getter(request.context, **kwargs)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/services/portforwarding/pf_plugin.py",
 line 54, in inner
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     result = 
f(*args, **kwargs)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/db/db_base_plugin_common.py", line 
49, in inner
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     result = 
f(*args, **kwargs)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/services/portforwarding/pf_plugin.py",
 line 450, in get_floatingip_port_forwardings
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     context, 
_pager=pager, floatingip_id=floatingip_id, **filters)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/objects/base.py", line 579, in 
get_objects
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     return 
[cls._load_object(context, db_obj) for db_obj in db_objs]
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/objects/base.py", line 497, in 
_load_object
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
obj.from_db_object(db_obj)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/objects/port_forwarding.py", line 92, 
in from_db_object
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     
self._load_attr_from_fip(attrname='router_id')
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/objects/port_forwarding.py", line 87, 
in _load_attr_from_fip
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     setattr(self, 
attrname, value)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 72, in 
setter
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     field_value = 
field.coerce(self, name, value)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_versionedobjects/fields.py", line 199, 
in coerce
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     return 
self._null(obj, attr)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_versionedobjects/fields.py", line 177, 
in _null
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource     raise 
ValueError(_("Field `%s' cannot be None") % attr)
  2019-03-12 14:58:03.357 4108 ERROR neutron.api.v2.resource ValueError: Field 
`router_id' cannot be None

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to