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

Race condition in NetworkConfigRegistry when new config appears

    XMLWordPrintable

    Details

    • Sprint:
      N Sprint #3 - Platform & ISSU

      Description

      This error can be observed in RestDeviceProvider with ONOS in the cluster (in this example 3 nodes: OC1, OC2, OC3).
      When new REST device config (netcfg) is added to OC1, it is propagated to OC2 and OC3 with distributed store. Then for example in OC2, InternalNetworkConfigListener receives new event "CONFIG_ADDED". It causes creating new thread to add new REST devices.
      In that thread provider tries to obtain config subjects:
      Set<DeviceId> deviceSubjects = cfgService.getSubjects(DeviceId.class, RestDeviceConfig.class);
      But sometimes (approx. 30% chance) this Set is empty. I can observe it only on nodes to which the config was propagated, not on the node where config was directly added using REST API.

      The fast workaround was to add "sleep 200ms" in the code before obtaining subjects and it fixed that problem.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kuujo Jordan Halterman
            Reporter:
            rszalecki Rafal Szalecki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: