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

Error while creating port in ovs using ovsdb due to bug in addPort method of OvsdbBridgeConfig

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      2
    • Epic Link:
    • Sprint:
      Falcon Sprint #2 (1/25 - 2/12)

      Description

      adding port using ovsdb BridgeConfig.addPort(); gives log:Error

      2016-01-19 19:26:08,901 | ERROR | qtp265194160-45 | DefaultOvsdbClient | 175 - org.onosproject.onos-ovsdb-api - 1.4.0.SNAPSHOT | Could not find Bridge OvsdbBridgeName

      {value=s1}

      in ovsdb:192.168.56.101

      In the method addport of OvsdbBridgeConfig.java

      public void addPort(PortDescription port) {
      String was = null;
      DriverHandler handler = handler();
      OvsdbClientService clientService = getOvsdbClientService(handler);
      Set<OvsdbBridge> ovsdbSet = clientService.getBridges();
      if (ovsdbSet != null && ovsdbSet.size() > 0)

      { OvsdbBridge bridge = ovsdbSet.iterator().next(); clientService.createPort(bridge.bridgeName().toString(), port.portNumber().toString()); }

      in the last line the "bridge.bridgeName().toString()" generates string "value=s1", which is wrong because ovsbd-server recognises "s1". It should be "bridge.bridgeName().value()".

      Same problem might face "deletePort(BridgeName bridgeName, String portName)" method;

        Attachments

          Activity

            People

            Assignee:
            andrea Andrea Campanella
            Reporter:
            mwasim Muhammad Wasim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: