Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-773

brmsgw failure pushing notification when executing update-vfw-op-policy.sh

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Beijing Release
    • Beijing Release
    • None

      This is the PUT section of the script.

      curl -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{

              "policyConfigType": "BRMS_PARAM",

              "policyName": "com.BRMSParamvFirewall",

              "policyDescription": "BRMS Param vFirewall policy",

              "policyScope": "com",

              "attributes": {

                      "MATCHING": {

                      "controller" : "amsterdam"

                  },

                      "RULE": {

                              "templateName": "ClosedLoopControlName",

                              "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",

                              "controlLoopYaml": "controlLoop%3A%0D%0A+version%3A+2.0.0%0D%0AcontrolLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0Atrigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0Atimeout%3A+1200%0D%0Aabatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++id%3A+unique-policy-id-1-modifyConfig%0D%0A++name%3A+modify+packet+gen+config%0D%0A++description%3A%0D%0A++actor%3A+APPC%0D%0A++recipe%3A+ModifyConfig%0D%0A++target%3A%0D%0A++++%23+TBDCannot+be+known+until+instantiation+is+done%0D%0A++++resourceID%3A'${RESOURCE_ID}'%0D%0A+++++type%3A+VNF%0D%0A++retry%3A+0%0D%0A++timeout%3A+300%0D%0A++success%3A+final_success%0D%0A++failure%3A+final_failure%0D%0A++failure_timeout%3A+final_failure_timeout%0D%0A++failure_retries%3A+final_failure_retries%0D%0A++failure_exception%3A+final_failure_exception%0D%0A+++failure_guard%3A+final_failure_guard"

                      }

              }

      }' http://${POLICY_HOST}:8081/pdp/api/updatePolicy

       

       

      HERE is the stdout:

       

      ./update-vfw-op-policy.sh 10.12.5.157 63d62772-d133-4237-85c9-3fe0bb9d1e3d /var/opt/OpenECOMP_ETE/robot/assets/keys/onap_dev.pvt

       

      Removing the vFW Policy from PDP..

       

       

      *   Trying 10.12.5.157...

      • TCP_NODELAY set
      • Connected to 10.12.5.157 (10.12.5.157) port 8081 (#0)

      > DELETE /pdp/api/deletePolicy HTTP/1.1

      > Host: 10.12.5.157:8081

      > User-Agent: curl/7.58.0

      > Content-Type: application/json

      > Accept: text/plain

      > ClientAuth: cHl0aG9uOnRlc3Q=

      > Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==

      > Environment: TEST

      > Content-Length: 133

      >

      • upload completely sent off: 133 out of 133 bytes

      < HTTP/1.1 400 Bad Request

      < Server: Apache-Coyote/1.1

      < Content-Type: text/plain;charset=ISO-8859-1

      < Content-Length: 87

      < Date: Wed, 02 May 2018 00:15:33 GMT

      < Connection: close

      <

      • Closing connection 0

      PE300 - Data Issue: org.onap.policy.api.PolicyException: java.lang.NullPointerException

       

      Updating vFW Operational Policy ..

       

      *   Trying 10.12.5.157...

      • TCP_NODELAY set
      • Connected to 10.12.5.157 (10.12.5.157) port 8081 (#0)

      > PUT /pdp/api/updatePolicy HTTP/1.1

      > Host: 10.12.5.157:8081

      > User-Agent: curl/7.58.0

      > Content-Type: application/json

      > Accept: text/plain

      > ClientAuth: cHl0aG9uOnRlc3Q=

      > Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==

      > Environment: TEST

      > Content-Length: 1309

      > Expect: 100-continue

      >

      < HTTP/1.1 100 Continue

      • We are completely uploaded and fine

      < HTTP/1.1 200 OK

      < Server: Apache-Coyote/1.1

      < Content-Type: text/plain;charset=ISO-8859-1

      < Content-Length: 149

      < Date: Wed, 02 May 2018 00:15:53 GMT

      <

      • Connection #0 to host 10.12.5.157 left intact

      Transaction ID: f1170827-ed23-49bb-948b-54c269b7c442 --Policy with the name com.Config_BRMS_Param_BRMSParamvFirewall.4.xml was successfully updated.

       

      Pushing the vFW Policy ..

       

       

      *   Trying 10.12.5.157...

      • TCP_NODELAY set
      • Connected to 10.12.5.157 (10.12.5.157) port 8081 (#0)

      > PUT /pdp/api/pushPolicy HTTP/1.1

      > Host: 10.12.5.157:8081

      > User-Agent: curl/7.58.0

      > Content-Type: application/json

      > Accept: text/plain

      > ClientAuth: cHl0aG9uOnRlc3Q=

      > Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==

      > Environment: TEST

      > Content-Length: 99

      >

      • upload completely sent off: 99 out of 99 bytes

      < HTTP/1.1 200 OK

      < Server: Apache-Coyote/1.1

      < Content-Type: text/plain;charset=ISO-8859-1

      < Content-Length: 162

      < Date: Wed, 02 May 2018 00:15:58 GMT

      <

      • Connection #0 to host 10.12.5.157 left intact

      Transaction ID: 91ca15ab-5bd9-46a4-8248-a16596db8488 --Policy 'com.Config_BRMS_Param_BRMSParamvFirewall.4.xml' was successfully pushed to the PDP group 'default'.

       

      Restarting PDP-D ..

       

       

      [drools-pdp-controllers]

      L []: Stopping Policy Management... Policy Management (pid=3664) is stopping... Policy Management has stopped.

      [drools-pdp-controllers]

      L []: Policy Management (pid 4378) is running

       

       

      PDP-D amsterdam maven coordinates ..

       

       

      *   Trying 10.12.5.157...

      • TCP_NODELAY set
      • Connected to 10.12.5.157 (10.12.5.157) port 9696 (#0)
      • Server auth using Basic with user '@1b3rt'

      > GET /policy/pdp/engine/controllers/amsterdam/drools HTTP/1.1

      > Host: 10.12.5.157:9696

      > Authorization: Basic QDFiM3J0OjMxbnN0MzFu

      > User-Agent: curl/7.58.0

      > Accept: /

      >

      < HTTP/1.1 200 OK

      < Date: Wed, 02 May 2018 00:16:59 GMT

      < Content-Type: application/json

      < Content-Length: 383

      < Server: Jetty(9.3.20.v20170531)

      <

      { [383 bytes data]

      • Connection #0 to host 10.12.5.157 left intact

      {

          "alive": true,

          "artifactId": "policy-amsterdam-rules",

          "brained": true,

          "groupId": "org.onap.policy-engine.drools.amsterdam",

          "locked": false,

          "modelClassLoaderHash": 1768142988,

          "recentSinkEvents": [],

          "recentSourceEvents": [],

          "sessionCoordinates": [

              "org.onap.policy-engine.drools.amsterdam:policy-amsterdam-rules:0.4.0:closedloop-amsterdam"

          ],

          "sessions": [

              "closedloop-amsterdam"

          ],

          "version": "0.4.0"

      }

       

       

      PDP-D control loop updated ..

       

       

      *   Trying 10.12.5.157...

      • TCP_NODELAY set
      • Connected to 10.12.5.157 (10.12.5.157) port 9696 (#0)
      • Server auth using Basic with user '@1b3rt'

      > GET /policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params HTTP/1.1

      > Host: 10.12.5.157:9696

      > Authorization: Basic QDFiM3J0OjMxbnN0MzFu

      > User-Agent: curl/7.58.0

      > Accept: /

      >

      < HTTP/1.1 200 OK

      < Date: Wed, 02 May 2018 00:17:00 GMT

      < Content-Type: application/json

      < Content-Length: 3565

      < Server: Jetty(9.3.20.v20170531)

      <

      { [3565 bytes data]

      • Connection #0 to host 10.12.5.157 left intact

      [

          {

              "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",

              "controlLoopYaml": "controlLoop%3A%0D%0A+version%3A+2.0.0%0D%0AcontrolLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0Atrigger_policy%3A+unique-policy-id-1-restart%0D%0Atimeout%3A+3600%0D%0Aabatement%3A+true%0D%0A%0D%0Apolicies%3A%0D%0A++-id%3A+unique-policy-id-1-restart%0D%0A++name%3A+Restart+the+VM%0D%0A++description%3A%0D%0A++actor%3A+APPC%0D%0A++recipe%3A+Restart%0D%0A++target%3A%0D%0A++++type%3A+VM%0D%0A++retry%3A+3%0D%0A++timeout%3A+1200%0D%0A++success%3A+final_success%0D%0A++failure%3A+final_failure%0D%0A++failure_timeout%3A+final_failure_timeout%0D%0A++failure_retries%3A+final_failure_retries%0D%0A++failure_exception%3A+final_failure_exception%0D%0A+++failure_guard%3A+final_failure_guard"

          },

          {

              "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",

              "controlLoopYaml": "controlLoop%3A%0D%0A+version%3A+2.0.0%0D%0AcontrolLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0Atrigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0Atimeout%3A+1200%0D%0Aabatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++id%3A+unique-policy-id-1-modifyConfig%0D%0A++name%3A+modify+packet+gen+config%0D%0A++description%3A%0D%0A++actor%3A+APPC%0D%0A++recipe%3A+ModifyConfig%0D%0A++target%3A%0D%0A++++%23+TBDCannot+be+known+until+instantiation+is+done%0D%0A++++resourceID%3A+Eace933104d443b496b8.nodes.heat.vpg%0D%0A++++type%3A+VNF%0D%0A++retry%3A+0%0D%0A++timeout%3A+300%0D%0A++success%3A+final_success%0D%0A++failure%3A+final_failure%0D%0A++failure_timeout%3A+final_failure_timeout%0D%0A++failure_retries%3A+final_failure_retries%0D%0A++failure_exception%3A+final_failure_exception%0D%0A+++failure_guard%3A+final_failure_guard"

          },

          {

              "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",

              "controlLoopYaml": "controlLoop%3A%0D%0A+version%3A+2.0.0%0D%0AcontrolLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0Atrigger_policy%3A+unique-policy-id-1-restart%0D%0Atimeout%3A+3600%0D%0Aabatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++-id%3A+unique-policy-id-1-restart%0D%0A++name%3A+Restart+the+VM%0D%0A++description%3A%0D%0A++actor%3A+VFC%0D%0A++recipe%3A+Restart%0D%0A++target%3A%0D%0A++++type%3A+VM%0D%0A++retry%3A+3%0D%0A++timeout%3A+1200%0D%0A++success%3A+final_success%0D%0A++failure%3A+final_failure%0D%0A++failure_timeout%3A+final_failure_timeout%0D%0A++failure_retries%3A+final_failure_retries%0D%0A++failure_exception%3A+final_failure_exception%0D%0A+++failure_guard%3A+final_failure_guard"

          },

          {

              "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",

              "controlLoopYaml": "controlLoop%3A%0D%0A+version%3A+2.0.0%0D%0AcontrolLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0Atrigger_policy%3A+unique-policy-id-1-scale-up%0D%0Atimeout%3A+1200%0D%0Aabatement%3A+false%0D%0Apolicies%3A%0D%0A+-id%3A+unique-policy-id-1-scale-up%0D%0A++name%3A+Create+a+new+VF+Module%0D%0A++description%3A%0D%0A++actor%3A+SO%0D%0A++recipe%3A+VF+Module+Create%0D%0A++target%3A%0D%0A++++type%3A+VNF%0D%0A++retry%3A+0%0D%0A++timeout%3A+1200%0D%0A++success%3A+final_success%0D%0A++failure%3A+final_failure%0D%0A++failure_timeout%3A+final_failure_timeout%0D%0A++failure_retries%3A+final_failure_retries%0D%0A++failure_exception%3A+final_failure_exception%0D%0A+++failure_guard%3A+final_failure_guard"

          }

      ]

       

      This shows in the error.log:

      2018-05-02T00:15:59.270+00:00||WebSocketConnectReadThread-22|||||ERROR|POLICY-519E||POLICY-519E ERROR: Error in Clients Handler Object : :java.lang.IllegalStateException:  - Exception Description: Transaction is currently active -  at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.begin(EntityTransactionImpl.java:89) -        at org.onap.policy.brms.api.BrmsPush.syncGroupInfo(BrmsPush.java:484) -         at org.onap.policy.brms.api.BrmsPush.initiate(BrmsPush.java:386) -      at org.onap.policy.brms.api.BrmsHandler.notificationReceived(BrmsHandler.java:72) -     at org.onap.policy.std.AutoClientEnd.callHandler(AutoClientEnd.java:235) -      at org.onap.policy.std.AutoClientEnd.onMessage(AutoClientEnd.java:70) -         at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:462) -     at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:696) -     at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:367) -      at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:212) -    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:389) -    at java.lang.Thread.run(Thread.java:748) -

      2018-05-02T00:23:43.975+00:00||WebSocketConnectReadThread-22|||||ERROR|POLICY-519E||POLICY-519E ERROR: Error in Clients Handler Object : :java.lang.IllegalStateException:  - Exception Description: Transaction is currently active -  at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.begin(EntityTransactionImpl.java:89) -        at org.onap.policy.brms.api.BrmsPush.syncGroupInfo(BrmsPush.java:484) -         at org.onap.policy.brms.api.BrmsPush.initiate(BrmsPush.java:386) -      at org.onap.policy.brms.api.BrmsHandler.notificationReceived(BrmsHandler.java:72) -     at org.onap.policy.std.AutoClientEnd.callHandler(AutoClientEnd.java:235) -      at org.onap.policy.std.AutoClientEnd.onMessage(AutoClientEnd.java:70) -         at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:462) -     at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:696) -     at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:367) -      at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:212) -    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:389) -    at java.lang.Thread.run(Thread.java:748) -

      2018-05-02T00:31:47.812+00:00||WebSocketConnectReadThread-22|||||ERROR|POLICY-519E||POLICY-519E ERROR: Error in Clients Handler Object : :java.lang.IllegalStateException:  - Exception Description: Transaction is currently active -  at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.begin(EntityTransactionImpl.java:89) -        at org.onap.policy.brms.api.BrmsPush.syncGroupInfo(BrmsPush.java:484) -         at org.onap.policy.brms.api.BrmsPush.initiate(BrmsPush.java:386) -      at org.onap.policy.brms.api.BrmsHandler.notificationReceived(BrmsHandler.java:72) -     at org.onap.policy.std.AutoClientEnd.callHandler(AutoClientEnd.java:235) -      at org.onap.policy.std.AutoClientEnd.onMessage(AutoClientEnd.java:70) -         at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:462) -     at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:696) -     at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:367) -      at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:212) -    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:389) -    at java.lang.Thread.run(Thread.java:748) -

       

            jhh jhh
            jhh jhh
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: