Re: Pointers on the ovsdb bug -

Madhava Bangera, Raksha <raksha.madhava.bangera@...>

Sure, Thanks Anil.


From: Anil Vishnoi [mailto:vishnoianil@...]
Sent: Wednesday, August 19, 2015 4:26 AM
To: Madhava Bangera, Raksha
Cc: ovsdb-dev@...
Subject: Re: [ovsdb-dev] Pointers on the ovsdb bug -


Hi Raksha,


I added comment on the gerrit, lets discuss it over the gerrit, to keep track of the discussion for others reference.





On Tue, Aug 18, 2015 at 11:58 PM, Madhava Bangera, Raksha <raksha.madhava.bangera@...> wrote:

Hi All,


I am working on the bug and the fix is based on the approach 1 suggested in the description. I submitted patch. This patch prevents the duplicate node( having same connection info) from being added to operational datastore. But the duplicate node is present in the config store. As per the review comments, the duplicate node should be prevented from being added to config DS too.


I have made the below highlighted changes to the patch. But with this logic, the duplicate node is not completely removed from the config. The {remote IP, port} tuple gets deleted but the node ID stills floats in the config. Could anyone give me pointers on how I can delete the duplicate node completely from the config? Or, is there a way to block the entry of duplicate node to config somewhere?


public void onDataChanged(

           AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> changes) {

       LOG.trace("onDataChanged: {}", changes);

       for (Entry<InstanceIdentifier<?>, DataObject> created : changes.getCreatedData().entrySet()) {

           // TODO validate we have the correct kind of InstanceIdentifier

           if (created.getValue() instanceof OvsdbNodeAugmentation) {

               OvsdbNodeAugmentation ovsdbNode = (OvsdbNodeAugmentation)created.getValue();

               ConnectionInfo key = ovsdbNode.getConnectionInfo();

               InstanceIdentifier<Node> iid = cm.getInstanceIdentifier(key);

               if ( iid != null) {

                   InstanceIdentifier<Node> dupiid = (InstanceIdentifier<Node>) created.getKey();

                   ReadWriteTransaction transaction = db.newReadWriteTransaction();

                   transaction.delete(LogicalDatastoreType.CONFIGURATION, dupiid);

                   CheckedFuture<Void, TransactionCommitFailedException> future = transaction.submit();

                   try {


                   } catch (TransactionCommitFailedException

                           e) {

                       LOG.warn("Failed to delete {} ", dupiid, e);






       // Connect first if we have to:


       rest of the code



Thanks & Regards,



ovsdb-dev mailing list





Join to automatically receive all group messages.