1
0
-1

Hi,

I'm trying to access the getConfig API which is used in DCAE poilcy handler to identify the working.

Here's the request I'm using: 

curl -v  -X POST --header 'Cont cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ "policyName": ".*"}' 'http://pdp:8081/pdp/api/getConfig'

The response I'm getting is: 

[{"policyConfigMessage":"No Response Received","policyConfigStatus":"CONFIG_NOT_FOUND","type":null,"config":null,"policyName":null,"policyType":null,"policyVersion":null,"matchingConditions":null,"responseAttributes":null,"property":null}]

In PDP logs, it is showing Null pointer exception. By static code analysis, I guess decide method in Policy is throwing the error. The logs are as below:

2018-07-14 10:06:18,849 [http-nio-8081-exec-4] DEBUG com.att.eelf.debug clientIpAddress=10.42.29.186 server=beijing-policy-pdp-0.pdp.onap.svc.cluster.localMetricEndTimestamp=2018-07-14T10:05:50.005+00:00 targetEntity=POLICY partnerName=USER serviceName=iDNS:PDP.test TransactionEndTimestamp=2018-07-14T10:05:50.007+00:00 StatusCode=COMPLETE TransactionElapsedTime=2 requestId=b968c8bb-4a56-4b16-b9ce-c91922dfb72f serverIpAddress=10.42.189.184 ClassName= targetServiceName=PE Process MetricElapsedTime=0 TransactionBeginTimestamp=2018-07-14T10:05:50.005+00:00 MetricBeginTimestamp=2018-07-14T10:05:50.005+00:00 statusCode=COMPLETE POLICY-500I INFO: Generated JSON Request is: {"Request":{"AccessSubject":{"Attribute":[{"Value":"DCAE.Config_.*.[\\d].*","AttributeId":"PolicyName"}]},"Action":{"Attribute":{"Value":"ACCESS","AttributeId":"urn:oasis:names:tc:xacml:1.0:action:action-id"}},"Resource":{"Attribute":[{"Value":"Config","AttributeId":"urn:oasis:names:tc:xacml:1.0:resource:resource-id"}]}}}
2018-07-14 10:06:18,860 [http-nio-8081-exec-4] INFO com.att.eelf.debug clientIpAddress=10.42.29.186 server=beijing-policy-pdp-0.pdp.onap.svc.cluster.localMetricEndTimestamp=2018-07-14T10:05:50.005+00:00 targetEntity=POLICY partnerName=USER serviceName=iDNS:PDP.test TransactionEndTimestamp=2018-07-14T10:05:50.007+00:00 StatusCode=COMPLETE TransactionElapsedTime=2 requestId=b968c8bb-4a56-4b16-b9ce-c91922dfb72f serverIpAddress=10.42.189.184 ClassName= targetServiceName=PE Process MetricElapsedTime=0 TransactionBeginTimestamp=2018-07-14T10:05:50.005+00:00 MetricBeginTimestamp=2018-07-14T10:05:50.005+00:00 statusCode=COMPLETE POLICY-500I INFO: --- Generating Request: ---\n{\n "Request" : {\n "CombinedDecision" : false,\n "Category" : [ {\n "CategoryId" : "urn:oasis:names:tc:xacml:1.0:subject-category:access-subject",\n "Attribute" : [ {\n "AttributeId" : "PolicyName",\n "Value" : "DCAE.Config_.*.[\\d].*",\n "DataType" : "http://www.w3.org/2001/XMLSchema#string",\n "IncludeInResult" : false\n } ]\n }, {\n "CategoryId" : "urn:oasis:names:tc:xacml:3.0:attribute-category:action",\n "Attribute" : [ {\n "AttributeId" : "urn:oasis:names:tc:xacml:1.0:action:action-id",\n "Value" : "ACCESS",\n "DataType" : "http://www.w3.org/2001/XMLSchema#string",\n "IncludeInResult" : false\n } ]\n }, {\n "CategoryId" : "urn:oasis:names:tc:xacml:3.0:attribute-category:resource",\n "Attribute" : [ {\n "AttributeId" : "urn:oasis:names:tc:xacml:1.0:resource:resource-id",\n "Value" : "Config",\n "DataType" : "http://www.w3.org/2001/XMLSchema#string",\n "IncludeInResult" : false\n } ]\n } ],\n "ReturnPolicyIdList" : false\n }\n}
2018-07-14 10:06:18,860 [http-nio-8081-exec-4] DEBUG com.att.eelf.debug clientIpAddress=10.42.29.186 server=beijing-policy-pdp-0.pdp.onap.svc.cluster.localMetricEndTimestamp=2018-07-14T10:05:50.005+00:00 targetEntity=POLICY partnerName=USER serviceName=iDNS:PDP.test TransactionEndTimestamp=2018-07-14T10:05:50.007+00:00 StatusCode=COMPLETE TransactionElapsedTime=2 requestId=b968c8bb-4a56-4b16-b9ce-c91922dfb72f serverIpAddress=10.42.189.184 ClassName= targetServiceName=PE Process MetricElapsedTime=0 TransactionBeginTimestamp=2018-07-14T10:05:50.005+00:00 MetricBeginTimestamp=2018-07-14T10:05:50.005+00:00 statusCode=COMPLETE POLICY-500I INFO: Using provided request ID: 379348c4-fced-4291-9b28-49903e8c08f5

==> error.log <==
2018-07-14 10:06:18,862 [http-nio-8081-exec-4] ERROR com.att.eelf.error clientIpAddress=10.42.29.186 ErrorDescription=This is a general error message during the process. Please check the error message for detail information server=beijing-policy-pdp-0.pdp.onap.svc.cluster.local MetricEndTimestamp=2018-07-14T10:05:50.005+00:00 targetEntity=POLICY partnerName=USER serviceName=iDNS:PDP.test TransactionEndTimestamp=2018-07-14T10:05:50.007+00:00 StatusCode=COMPLETE TransactionElapsedTime=2 requestId=b968c8bb-4a56-4b16-b9ce-c91922dfb72f serverIpAddress=10.42.189.184 ClassName= targetServiceName=PE Process ErrorCode=POLICY-515E MetricElapsedTime=0 TransactionBeginTimestamp=2018-07-14T10:05:50.005+00:00 MetricBeginTimestamp=2018-07-14T10:05:50.005+00:00 statusCode=COMPLETE POLICY-515E ERROR: PE500 - Process Flow Issue: java.lang.NullPointerException

==> debug.log <==
2018-07-14 10:06:18,863 [http-nio-8081-exec-4] INFO com.att.eelf.debug clientIpAddress=10.42.29.186 ErrorDescription=This is a general error message during the process. Please check the error message for detail information server=beijing-policy-pdp-0.pdp.onap.svc.cluster.local MetricEndTimestamp=2018-07-14T10:05:50.005+00:00 targetEntity=POLICY partnerName=USER serviceName=iDNS:PDP.test TransactionEndTimestamp=2018-07-14T10:05:50.007+00:00 StatusCode=COMPLETE TransactionElapsedTime=2 requestId=b968c8bb-4a56-4b16-b9ce-c91922dfb72f serverIpAddress=10.42.189.184 ClassName= targetServiceName=PE Process ErrorCode=POLICY-515E MetricElapsedTime=0 TransactionBeginTimestamp=2018-07-14T10:05:50.005+00:00 MetricBeginTimestamp=2018-07-14T10:05:50.005+00:00 statusCode=COMPLETE POLICY-500I INFO: No Response Received from PDP


I want to understand when I update policy (Threshold values of MS policy) and pushed to PDP, how DCAE will get the latest threshold values so that it'll store in dcae-config. Also, whether this error is going to effect the closed loop flow.

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Sure.. I'll take a look.

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Michael Mokry - can you take a look at this and help? I suspect he is querying for policies that don't exist or haven't been pushed.

        1. Michael Mokry

          Hi Pamela Dragosh,

          I met with Sudhakar today over Skype and we were able to resolve his issue.

        2. Sudhakar Reddy

          Thank you Michael MokryPamela Dragosh for your response and the inputs. (smile)

        3. Pamela Dragosh

          Thanks Michael Mokry!!! - If there is anything we need to clarify in our documentation then please work with Saryu Shah.

        4. Michael Mokry

          Pamela Dragosh

          The issue was caused by the PDP failing to register during initialization, so the policies were not pushing and the PDP was not loading the pre-configured policies in the PDP file system (xacml.policy.properties).  I am not sure why it failed to register with the PAP, historically this issue is related to a db issues or missing/invalid properties in the properties file.  Further analysis into catalina logs should print out a whole log trace if there are any errors so Sudhakar could look at this if the issue occurs again.  We resolved the issue by simply restarting the PDP so it would register with the PAP and then restarting the PAP to run the audit code in the init() that updates the PDP group in the file system to be in sync with the DB.

        CommentAdd your comment...