Comment 4 for bug 1789434

Revision history for this message
Manjeet Singh Bhatia (manjeet-s-bhatia) wrote :

def _update_ports(self, context, router_id):
    objs = l3_obj.RouterPort.get_objects(
         context, router_id=[router_id])
    for obj in objs:
        port_id = obj.port_id
        self._core_plugin.update_port(
            context, port_id, {'port': {'status': 'DOWN'}})

not sure if this would this be a good solution or not but that's what I think may fix the issue if we add this helper and call it in method at https://github.com/openstack/neutron/blob/master/neutron/db/l3_db.py#L277

if r['admin_state_up'] == False:
   self._update_ports(context, id)