Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-6083

parent-foreign-source is not working anymore

    XMLWordPrintable

    Details

      Description

      I'm trying to configure "Path Outages" with Provisiond on the following scenario:

      The core routers are defined on one requisition, and the remote routers/switches are defined on different requisitions, so I've used parent-foreign-source/parent-foreignid to configure the path-outages for the remote devices.

      That was working fine before (I can't remember the exact version of OpenNMS), but now I'm seeing the following exception using the latest snapshot of 1.10.13 and 1.12.1, and OpenNMS won't start if the parent-foreign-source attribute exist on a requisition, and the ReST API will reject changes if you try to apply it:

      Caused by: org.opennms.core.xml.MarshallingResourceFailureException: Failed to marshal/unmarshal XML file while unmarshalling an object (Requisition): javax.xml.bind.UnmarshalException

      • with linked exception:
        [org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'parent-foreign-source' is not allowed to appear in element 'node'.]; nested exception is javax.xml.bind.UnmarshalException
      • with linked exception:
        [org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'parent-foreign-source' is not allowed to appear in element 'node'.]

      In 1.10, after the exception, the XML file on the pending directory will be broken (in the case of 1.10), and you must remove it manually and start over.

      In terms of the source code, I can see that parent-foreign-source is defined in opennms-provision/opennms-provision-persistence/src/main/java/org/opennms/netmgt/provision/persist/requisition/RequisitionNode.java, but the generated XSD (i.e. model-importer.xsd) doesn't have it.

      If I update the model-importer.xsd from share/xsds to have parent-foreign-source and restart OpenNMS. Everything is working as expected, so it is clear that the XSD is not being generated correctly or something like that.

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: