[ovs-dev] [PATCH] bridge: Tolerate missing Port and Interface records for local port.

Ethan Jackson ethan at nicira.com
Thu Apr 21 20:31:42 UTC 2011


Sounds good.  Thanks for the explanation.



On Thu, Apr 21, 2011 at 1:29 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Thu, Apr 21, 2011 at 01:16:51PM -0700, Ethan Jackson wrote:
>> This patch looks good to me.
>
> Thanks.
>
>> Out of curiosity, why not just create the bridge port record manually
>> ourselves when it doesn't exist?
>
> That could be a reasonable solution too, or at least part of one.  The
> main reason I didn't choose to do it that way is that, currently,
> ovs-vswitchd only writes to columns that are reserved for it to write
> to.  ovs-vswitchd never creates or deletes records and never
> overwrites columns that are not reserved for it.  Creating a record
> and adding it to a bridge would be a change in this policy.  That's
> not necessarily bad, but I didn't feel sufficiently motivated by this
> corner case to change it.
>
> Another (fairly minor) reason is that a change to the database
> actually *disappears* as soon as you call ovsdb_idl_txn_commit().[*]
> So we'd still have to deal with the missing record at least until the
> next time we poll the database.
>
> [*] That's because "commit" just ships the transaction off to the
>    database.  It doesn't ensure that the updated state is exactly the
>    set of changes that the database will make--it might abort the
>    transaction, for example--and so the updates have to be rolled
>    back until the database notifies us of the actual new state.
>



More information about the dev mailing list