failure of port create,which needs to update before

Asked by Taoyunxiang on 2019-01-02

Actually,i do not have a port first,but when i creating a new port, which needs to update port information(i do not have any port now ). In this case, an error is reported.

the cmd of neutron is "neutron port-create net-id"

when troubleshooting with logs,i find the code logic is to update before create,just as fellows.

            if port.get('fixed_ips') and sg_ids:
                addresses = ovn_acl.acl_port_ips(port)
                # NOTE(rtheis): Fail port creation if the address set doesn't
                # exist. This prevents ports from being created on any security
                # groups out-of-sync between neutron and OVN.
                for sg_id in sg_ids:
                    for ip_version in addresses:
                        if addresses[ip_version]:
                            txn.add(self._nb_idl.update_address_set(
                                name=utils.ovn_addrset_name(sg_id,
                                                            ip_version),
                                addrs_add=addresses[ip_version],
                                addrs_remove=None,
                                if_exists=False))

the path of code is /usr/lib/python2.7/site-packages/networking_ovn/common/ovn_clinet.py

when i change the value of 'if_exists' to True , all will fine .

the error just like this

File "/usr/lib/python2.7/site-packages/ovsdbapp/backend/ovs_idl/connection.py", line 97, in run
    txn.results.put(txn.do_commit())
  File "/usr/lib/python2.7/site-packages/ovsdbapp/backend/ovs_idl/transaction.py", line 86, in do_commit
    command.run_idl(txn)
  File "/usr/lib/python2.7/site-packages/networking_ovn/ovsdb/commands.py", line 725, in run_idl
    raise RuntimeError(msg)
RuntimeError: Address set as_ip4_b5dbdfe6_bcd3_4e39_b43a_0c37c66ccb54 does not exist. Can't update addresses

Question information

Language:
English Edit question
Status:
Expired
For:
networking-ovn Edit question
Assignee:
No assignee Edit question
Last query:
2019-01-02
Last reply:
2019-01-17
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.