Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-7920

NETCONF connection creation called reentrantly can lead to multiple stream threads for a single device

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.14.0, 1.15.0
    • Fix Version/s: 1.14.0, 1.15.0, 2.0.0
    • Component/s: None
    • Labels:
    • Environment:

      any

    • Story Points:
      1

      Description

      The netconf provider maintains a concurrent map of devices to which it has opened sessions. This map is checked for the presence of a device ID before attempting to create a connection to a device.

       

      The issue is that after checking the concurrent map the provider then continues to create a connection and while this connection is being created, but before the concurrent map is updated a mastership event may come in another attempt to create a connection is invoked.

       

      The concurrent map is check, but since the first call is not complete the device is not yet in the map and so the second call proceeds to also create a connection.

       

      the proposed solution is to place a Lock (based on device ID) around the code so that only one create per deviceID can proceed at a time, thus the second call will be blocked until the first completes and at that time the concurrent map will have the existing session.

        Attachments

        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            dbainbri David Bainbridge
            Reporter:
            dbainbri David Bainbridge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: