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

Using the provision.pl script to add new interfaces to requistioned nodes doesn't seem to work since upgrade to version 19

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 19.1.0
    • Fix Version/s: None
    • Component/s: REST
    • Security Level: Default (Default Security Scheme)
    • Labels:

      Description

      I think I've an issue with the requisition interface since I upgraded to version 19.1.0 (from 18):

      Using the usr/share/opennms/bin/provision.pl script to add new interfaces to a requistioned node doesn't work.

      Specificaly, this doesn't do anything:

      /usr/share/opennms/bin/provision.pl --username admin --password xxxxxxxxxxx --url https://opennms.my.company.be/opennms/rest interface add belnet-oob-devices 1475573328917 <addr_ip>

      while it used to work perfectly before my upgrade to 19

      I've confirmed the "generic" rest interface enpoint is working by issuing the following command which works perfectly well:

      /usr/share/opennms/bin/provision.pl --username admin --password xxxxxxxxxxxx --url https://opennms.my.company.be/opennms/rest requisition list belnet-oob-devices

      I've also confirmed that the node with foreignid 1475573328917 does exist in the belnet-oob-devices requisition.

      Also, I can find the following in the web.log (redacted excerpts):

      2017-06-07 11:03:56,507 DEBUG [qtp577482638-1914906] o.a.c.j.u.JAXRSUtils: Resource class org.opennms.web.rest.v1.RequisitionRestService may get selected, request path : org.opennms.web. rest.v1.RequisitionRestService, resource class @Path : /requisitions/belnet-oob-devices/nodes/%201475573328917/interfaces
      2017-06-07 11:03:56,508 DEBUG [qtp577482638-1914906] o.a.c.j.u.JAXRSUtils: No resource class match for org.opennms.web.rest.v1.AvailabilityRestService, request path : /requisitions/belne t-oob-devices/nodes/%201475573328917/interfaces
      2017-06-07 11:03:56,508 DEBUG [qtp577482638-1914906] o.a.c.j.u.JAXRSUtils: No resource class match for org.opennms.web.rest.v1.RemotePollerAvailabilityService, request path : /requisitio ns/belnet-oob-devices/nodes/%201475573328917/interfaces
      2017-06-07 11:03:56,508 DEBUG [qtp577482638-1914906] o.a.c.j.u.JAXRSUtils: No resource class match for org.opennms.web.rest.v1.HeatMapRestService, request path : /requisitions/belnet-oob -devices/nodes/%201475573328917/interfaces
      2017-06-07 11:03:56,509 DEBUG [qtp577482638-1914906] o.a.c.j.u.JAXRSUtils: No resource class match for org.opennms.web.rest.v1.AlarmRestService, request path : /requisitions/belnet-oob-d evices/nodes/%201475573328917/interfaces
      2017-06-07 11:03:56,509 DEBUG [qtp577482638-1914906] o.a.c.j.u.JAXRSUtils: Resource class org.opennms.web.rest.v1.RequisitionRestService has been selected, request path : org.opennms.web .rest.v1.RequisitionRestService, resource class @Path : /requisitions/belnet-oob-devices/nodes/%201475573328917/interfaces

      2017-06-07 11:03:56,519 DEBUG [qtp577482638-1914906] o.a.c.j.u.JAXRSUtils: Resource operation addOrReplaceInterface on the resource class org.opennms.web.rest.v1.RequisitionRestService h as been selected
      2017-06-07 11:03:56,520 DEBUG [qtp577482638-1914906] o.a.c.j.i.JAXRSInInterceptor: Request path is: /requisitions/belnet-oob-devices/nodes/%201475573328917/interfaces
      2017-06-07 11:03:56,520 DEBUG [qtp577482638-1914906] o.a.c.j.i.JAXRSInInterceptor: Request HTTP method is: POST
      2017-06-07 11:03:56,520 DEBUG [qtp577482638-1914906] o.a.c.j.i.JAXRSInInterceptor: Request contentType is: application/xml
      2017-06-07 11:03:56,520 DEBUG [qtp577482638-1914906] o.a.c.j.i.JAXRSInInterceptor: Accept contentType is: /
      2017-06-07 11:03:56,521 DEBUG [qtp577482638-1914906] o.a.c.j.i.JAXRSInInterceptor: Found operation: addOrReplaceInterface

      2017-06-07 11:03:56,842 DEBUG [qtp577482638-1914906] o.a.c.s.i.AbstractInvoker: Invoking method public javax.ws.rs.core.Response org.opennms.web.rest.v1.RequisitionRestService.addOrRepla ceInterface(javax.ws.rs.core.UriInfo,java.lang.String,java.lang.String,org.opennms.netmgt.provision.persist.requisition.RequisitionInterface) on object org.opennms.web.rest.v1.Requisitio nRestService@6a2bced4 with params [org.apache.cxf.jaxrs.impl.UriInfoImpl@76e4e2cb, belnet-oob-devices, 1475573328917, RequisitionInterface [monitoredServices=[], categories=[], descript ion=null, ipAddress=80.201.93.226, isManaged=null, snmpPrimary=null, status=null]].
      2017-06-07 11:03:56,843 DEBUG [qtp577482638-1914906] o.o.w.r.v.RequisitionRestService: addOrReplaceInterface: Adding interface %s to node %s/%s
      allback=Blocker@42d7d646

      Unknown macro: {null}

      2017-06-07 11:03:56,848 DEBUG [qtp577482638-1914906] o.e.j.s.HttpChannel: COMMIT for /opennms/rest/requisitions/belnet-oob-devices/nodes/%201475573328917/interfaces on HttpChannelOverHtt p@25fb8026

      Unknown macro: {r=1,c=true,a=DISPATCHED,uri=https}

      202 null HTTP/1.1
      Connection: close
      Date: Wed, 07 Jun 2017 09:03:56 GMT
      Set-Cookie: JSESSIONID=node019zlcp1w445gg1k2a8h6osnt0i62705.node0;Path=/opennms;Secure
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Location: https://opennms.my.company.be/opennms/rest/requisitions/belnet-oob-devices/nodes/%201475573328917/interfaces/a.b.c.d
      Content-Length: 0

      2017-06-07 11:03:56,848 DEBUG [qtp577482638-1914906] o.e.j.s.HttpConnection: org.eclipse.jetty.server.HttpConnection$SendCallback@78c4e71b[PROCESSING][i=HTTP/1.1

      Unknown macro: {s=202,h=6,cl=0}

      ,cb=org.e clipse.jetty.server.HttpChannel$CommitCallback@2967b072] generate: NEED_HEADER (null,[p=0,l=0,c=0,r=0],true)@START
      2017-06-07 11:03:56,848 DEBUG [qtp577482638-1914906] o.e.j.h.HttpGenerator: generateHeaders HTTP/1.1

      last=true content=HeapByteBuffer@5f8722fd[p=0,l=0,c=0,r=0]=

      Unknown macro: {<<<>>>}

      2017-06-07 11:03:56,848 DEBUG [qtp577482638-1914906] o.e.j.h.HttpGenerator: Connection: close
      Date: Wed, 07 Jun 2017 09:03:56 GMT
      Set-Cookie: JSESSIONID=node019zlcp1w445gg1k2a8h6osnt0i62705.node0;Path=/opennms;Secure
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Location: https://opennms.fw.belnet.be/opennms/rest/requisitions/belnet-oob-devices/nodes/%201475573328917/interfaces/a.b.c.d
      Content-Length: 0

      Any idea how I should continue debugging?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              stcyr Cyrille Bollu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration