Hello Adam,
Could you also try the following command? Normally it will list all the
versions of policies with the name indicated by the policyName.
curl -i -v -H 'Content-Type: application/json' -H 'Accept: application/json'
--header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic
dGVzdHBkcDphbHBoYTEyMw==' -H 'Environment: TEST' -X POST -d '{ "policyName": "
test_policy_error.Config_MS_ClosedLoop_3cb6b3ad_8b2a_11e8_b055_0242ac120003_TCA_0owl1kv"
}'
http://10.157.164.196:30299/pdp/api/getConfig<https://urldefense.proofpoint.com/v2/url?u=http-3A__10.157.164.196-3A30299_pdp_api_getConfig&d=DwQF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=IlDIQNNgMj8xrV4PZJk9kPbU5xq74zJ_Tv0uUDCGldU&m=cmBolPbSvoi8nhXS3hkwoua3fCLrZYyGbVeE43xHys0&s=7CQciOq9QYqEBGyGvAz9tzK-lxGA2jZ3A8bPFQd_1z0&e=>
And is that possible to also make a screen shot of the Policy UI, since you
said you can see it in the UI, right? Please click the Editor tab, and then
select the folder test_policy_error, if the policy exist already, you should be
able to see it there (the Policy UI page is something silimar as below).
[cid:[email protected]]
Kr,
Xue
From: Krysiak, Adam (Nokia - PL/Wroclaw) <[email protected]>
Sent: Tuesday, July 24, 2018 8:26 AM
To: Gao, Xue <[email protected]>
Subject: Re: Suspected SPAM - Re: [onap-discuss][clamp][policy] Error during
closed loop resubmit
Hi Xue,
I've send request you asked for.
curl -i -v -H 'Content-Type: application/json' -H 'Accept: application/json'
--header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic
dGVzdHBkcDphbHBoYTEyMw==' -H 'Environment: TEST' -X POST -d '{ "policyName": "
test_policy_error.Config_MS_ClosedLoop_3cb6b3ad_8b2a_11e8_b055_0242ac120003_TCA_0owl1kv.1.xml"
}'
http://10.157.164.196:30299/pdp/api/getConfig<https://urldefense.proofpoint.com/v2/url?u=http-3A__10.157.164.196-3A30299_pdp_api_getConfig&d=DwQF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=IlDIQNNgMj8xrV4PZJk9kPbU5xq74zJ_Tv0uUDCGldU&m=cmBolPbSvoi8nhXS3hkwoua3fCLrZYyGbVeE43xHys0&s=7CQciOq9QYqEBGyGvAz9tzK-lxGA2jZ3A8bPFQd_1z0&e=>
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 10.157.164.196...
* TCP_NODELAY set
* Connected to 10.157.164.196 (10.157.164.196) port 30299 (#0)
> POST /pdp/api/getConfig HTTP/1.1
> Host: 10.157.164.196:30299
> User-Agent: curl/7.58.0
> Content-Type: application/json
> Accept: application/json
> ClientAuth: cHl0aG9uOnRlc3Q=
> Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
> Environment: TEST
> Content-Length: 114
>
* upload completely sent off: 114 out of 114 bytes
< HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
< Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
< Content-Type: application/json;charset=UTF-8
Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
< Date: Tue, 24 Jul 2018 05:25:02 GMT
Date: Tue, 24 Jul 2018 05:25:02 GMT
< Connection: close
Connection: close
<
* Closing connection 0
[{"policyConfigMessage":"PE300 - Data Issue: Incorrect Params passed: Decision
not a
Permit.","policyConfigStatus":"CONFIG_NOT_FOUND","type":null,"config":null,"policyName":null,"policyType":null,"policyVersion":null,"matchingConditions":null,"responseAttributes":null,"property":null}]%
===========================================================================================
As you can see it looks like policy is not there. But it's visible it in ui.
I've send more generic request with ".*" as policyName and my policy is not in
response. There are policies but all of them match same pattern and differ only
with names. For example:
...
{
"policyConfigMessage": "Error in Calling the Configuration URL
com.att.research.xacml.api.pdp.PDPException: PE300 - Data Issue: Error in
ConfigURL",
"policyConfigStatus": "CONFIG_NOT_FOUND",
"type": null,
"config": null,
"policyName":
"Test_VES_CL_2.Config_MS_ClosedLoop_d16af88b_8504_11e8_a814_0242ac120002_TCA_0owl1kv.1.xml",
"policyType": "MicroService",
"policyVersion": "1",
"matchingConditions": {
"ONAPName": "DCAE",
"ConfigName": "SampleConfigName",
"service": "tca_policy",
"uuid": "test",
"Location": "SampleServiceLocation"
},
"responseAttributes": {},
"property": null
},
...
Unfortunately I'm not able to share instance it's not available from outside
our network. I've checked it on other environment and response is similar. Both
them are installed from OOM.
[cid:[email protected]]
Adam Krysiak
Software Engineer
MN MANO RD&Pz ONAP-UI-ML DEVOPS WRO 2 SG
Nokia
Contact number: +48691441316
________________________________
From: Gao, Xue <[email protected]<mailto:[email protected]>>
Sent: Monday, July 23, 2018 9:41:03 AM
To: [email protected]<mailto:[email protected]>; Krysiak,
Adam (Nokia - PL/Wroclaw)
Cc: Closson, Anael; DRAGOSH, PAM; HERNANDEZ-HERRERO, JORGE; MANDER, BOBBY
Subject: RE: Suspected SPAM - Re: [onap-discuss][clamp][policy] Error during
closed loop resubmit
Hi Adam,
To help further, could you please try the following command (with the good
policy fqdn/IP) and let us know the result?
curl -i -v -H 'Content-Type: application/json' -H 'Accept: application/json'
--header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic
dGVzdHBkcDphbHBoYTEyMw==' -H 'Environment: TEST' -X POST -d '{ "policyName": "
test_policy_error.Config_MS_ClosedLoop_3cb6b3ad_8b2a_11e8_b055_0242ac120003_TCA_0owl1kv.1.xml"
}'
http://policy.api.simpledemo.onap.org:8081/pdp/api/getConfig<https://urldefense.proofpoint.com/v2/url?u=http-3A__policy.api.simpledemo.onap.org-3A8081_pdp_api_getConfig&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=ySTRq0iuckTawXrFCjgNAQ&m=YG4hE-UKm8381YSTAAtK6lpxAh4tUsbaQKralhrB5BA&s=r1JbNVuj3R1xfMDdi-UXdjSKZGt3CsMOGeOJNXgovAw&e=>
If possible, do you think you could provide us the access to your lab? Thanks!
Kr,
Xue
From: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>> On Behalf Of
Krysiak, Adam (Nokia - PL/Wroclaw)
Sent: Friday, July 20, 2018 2:14 PM
To: Closson, Anael <[email protected]<mailto:[email protected]>>;
[email protected]<mailto:[email protected]>; Gao, Xue
<[email protected]<mailto:[email protected]>>; Krysiak, Adam (Nokia -
PL/Wroclaw) <[email protected]<mailto:[email protected]>>; DRAGOSH,
PAM <[email protected]<mailto:[email protected]>>;
HERNANDEZ-HERRERO, JORGE <[email protected]<mailto:[email protected]>>; MANDER, BOBBY
<[email protected]<mailto:[email protected]>>
Subject: Re: Suspected SPAM - Re: [onap-discuss][clamp][policy] Error during
closed loop resubmit
Hi Pamela
Can anyone on Policy side take a look at this or create a jira for future
investigation?
Br,
Adam Krysiak
Software Engineer
MN MANO RD&Pz ONAP-UI-ML DEVOPS WRO 2 SG
Nokia
Contact number: +48691441316
________________________________
From: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>> on behalf of
Krysiak, Adam (Nokia - PL/Wroclaw)
<[email protected]<mailto:[email protected]>>
Sent: Friday, July 20, 2018 2:12:44 PM
To: Closson, Anael;
[email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
Subject: Suspected SPAM - Re: [onap-discuss][clamp][policy] Error during closed
loop resubmit
Hi,
Thanks Anael, Xue for checking on that issue.
Br,
Adam Krysiak
Software Engineer
MN MANO RD&Pz ONAP-UI-ML DEVOPS WRO 2 SG
Nokia
Contact number: +48691441316
________________________________
From: Closson, Anael <[email protected]<mailto:[email protected]>>
Sent: Thursday, July 19, 2018 11:56:41 AM
To: [email protected]<mailto:[email protected]>; Krysiak,
Adam (Nokia - PL/Wroclaw)
Subject: RE: [onap-discuss][clamp][policy] Error during closed loop resubmit
Hello Adan,
Xue did some tests on SB07 to verify the expected behavior. According to her,
there's a gap between the expected Policy reply and the actual one (see below).
There might be either an issue with Policy, either a configuration one or a
bug. We think the latter, but the Policy team is better suited to answer that
question.
FYI :
Expected one :
============
root@mywebserver:/home/xg353y/git/clamp-lf# curl -i -v -H 'Content-Type:
application/json' -H 'Accept: application/json' --header 'ClientAuth:
cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' -H
'Environment: TEST' -X POST -d '{ "policyName":
"ClampTest_v1_0.Config_MS_ClosedLoop_test6.1.xml" }'
http://policy.api.simpledemo.onap.org:8081/pdp/api/getConfig<https://urldefense.proofpoint.com/v2/url?u=http-3A__policy.api.simpledemo.onap.org-3A8081_pdp_api_getConfig&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=ySTRq0iuckTawXrFCjgNAQ&m=YG4hE-UKm8381YSTAAtK6lpxAh4tUsbaQKralhrB5BA&s=r1JbNVuj3R1xfMDdi-UXdjSKZGt3CsMOGeOJNXgovAw&e=>
Hostname was NOT found in DNS cache
Trying 10.12.5.157...
Connected to
policy.api.simpledemo.onap.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__policy.api.simpledemo.onap.org&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=ySTRq0iuckTawXrFCjgNAQ&m=YG4hE-UKm8381YSTAAtK6lpxAh4tUsbaQKralhrB5BA&s=mF_CMfJx3CBc0GipdhVX05IrcunxSiAgqHtdY2zVmgM&e=>
(10.12.5.157) port 8081 (#0)
> POST /pdp/api/getConfig HTTP/1.1
> User-Agent: curl/7.35.0
> Host:
> policy.api.simpledemo.onap.org:8081<https://urldefense.proofpoint.com/v2/url?u=http-3A__policy.api.simpledemo.onap.org-3A8081&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=ySTRq0iuckTawXrFCjgNAQ&m=YG4hE-UKm8381YSTAAtK6lpxAh4tUsbaQKralhrB5BA&s=5MqUlQD6DAIvQUyDp3J7PG2CaXvU_u2et2TF9kmgZZo&e=>
> Content-Type: application/json
> Accept: application/json
> ClientAuth: cHl0aG9uOnRlc3Q=
> Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
> Environment: TEST
> Content-Length: 67
>
upload completely sent off: 67 out of 67 bytes
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
Server Apache-Coyote/1.1 is not blacklisted
< Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
< Content-Type: application/json;charset=UTF-8
Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
< Date: Tue, 17 Apr 2018 15:31:25 GMT
Date: Tue, 17 Apr 2018 15:31:25 GMT
<
[{"policyConfigMessage":"Config Retrieved!
","policyConfigStatus":"CONFIG_RETRIEVED","type":"JSON","config":"{\"service\":\"tca_policy\",\"version\":\"1.1.0\",\"location\":\"SampleServiceLocation\",\"configName\":\"SampleConfigName\",\"uuid\":\"test\",\"policyScope\":\"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=com.v1.0.ClosedLoop_test6\",\"templateVersion\":\"OpenSource.version.1\",\"policyName\":\"ClampTest_v1_0.ClosedLoop_test6\",\"description\":\"MicroService
vCPE
Policy\",\"priority\":\"1\",\"riskType\":\"SampleRiskType\",\"riskLevel\":\"1\",\"guard\":\"False\",\"content\":{\"tca_policy\":{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vCPEvGMUXPacketLoss\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"ClampTest_v1_0.ClosedLoop_test6\",\"policyVersion\":\"1\",\"thresholds\":[{\"closedLoopControlName\":\"ClosedLoop-test5_null\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingField
Connection #0 to host
policy.api.simpledemo.onap.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__policy.api.simpledemo.onap.org&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=ySTRq0iuckTawXrFCjgNAQ&m=YG4hE-UKm8381YSTAAtK6lpxAh4tUsbaQKralhrB5BA&s=mF_CMfJx3CBc0GipdhVX05IrcunxSiAgqHtdY2zVmgM&e=>
left intact
s.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":200,\"direction\":\"GREATER\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"}]}]}}}","policyName":"ClampTest_v1_0.Config_MS_ClosedLoop_test6.1.xml","policyType":"MicroService","policyVersion":"1","matchingConditions":{"ONAPName":"DCAE","ConfigName":"SampleConfigName","service":"tca_policy","uuid":"test","Location":"SampleServiceLocation"},"responseAttributes":{},"property":null}]
Actual one (SB07):
===============
root@clamp:/home/xg353y/git/clamp-codecloud# curl -i -v -H 'Content-Type:
application/json' -H 'Accept: application/json' --header 'ClientAuth:
cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' -H
'Environment: TEST' -X POST -d '{ "policyName": "
HPATest.Config_OOF_PolicyHPA3.xml" }'
http://policy.api.simpledemo.onap.org:8081/pdp/api/getConfig<https://urldefense.proofpoint.com/v2/url?u=http-3A__policy.api.simpledemo.onap.org-3A8081_pdp_api_getConfig&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=ySTRq0iuckTawXrFCjgNAQ&m=YG4hE-UKm8381YSTAAtK6lpxAh4tUsbaQKralhrB5BA&s=r1JbNVuj3R1xfMDdi-UXdjSKZGt3CsMOGeOJNXgovAw&e=>
Hostname was NOT found in DNS cache
Trying 10.12.5.157...
Connected to
policy.api.simpledemo.onap.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__policy.api.simpledemo.onap.org&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=ySTRq0iuckTawXrFCjgNAQ&m=YG4hE-UKm8381YSTAAtK6lpxAh4tUsbaQKralhrB5BA&s=mF_CMfJx3CBc0GipdhVX05IrcunxSiAgqHtdY2zVmgM&e=>
(10.12.5.157) port 8081 (#0)
> POST /pdp/api/getConfig HTTP/1.1
> User-Agent: curl/7.35.0
> Host:
> policy.api.simpledemo.onap.org:8081<https://urldefense.proofpoint.com/v2/url?u=http-3A__policy.api.simpledemo.onap.org-3A8081&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=ySTRq0iuckTawXrFCjgNAQ&m=YG4hE-UKm8381YSTAAtK6lpxAh4tUsbaQKralhrB5BA&s=5MqUlQD6DAIvQUyDp3J7PG2CaXvU_u2et2TF9kmgZZo&e=>
> Content-Type: application/json
> Accept: application/json
> ClientAuth: cHl0aG9uOnRlc3Q=
> Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
> Environment: TEST
> Content-Length: 54
>
upload completely sent off: 54 out of 54 bytes
< HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
Server Apache-Coyote/1.1 is not blacklisted
< Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
< Content-Type: application/json;charset=UTF-8
Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
< Date: Thu, 19 Jul 2018 09:43:04 GMT
Date: Thu, 19 Jul 2018 09:43:04 GMT
< Connection: close
Connection: close
<
Closing connection 0
[{"policyConfigMessage":"PE300 - Data Issue: Incorrect Params passed: Decision
not a
Permit.","policyConfigStatus":"CONFIG_NOT_FOUND","type":null,"config":null,"policyName":null,"policyType":null,"policyVersion":null,"matchingConditions":null,"responseAttributes":null,"property":null}]
From: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>> On Behalf Of
Krysiak, Adam (Nokia - PL/Wroclaw)
Sent: jeudi 19 juillet 2018 10:41
To: [email protected]<mailto:[email protected]>
Subject: [onap-discuss][clamp][policy] Error during closed loop resubmit
Hi,
I've found weird behavior during resubmitting Policy from CLAMP.
During 'resubmit' CLAMP first checks if policy exists to know if it should be
created or updated.
>From logs I see that during check response is that it's new policy.
But when clamp tries to create it the response is that policy already exists.
Also in logs there is an info about bad request when checking policy.
Data Issue: :400:[{"policyConfigMessage":"PE300 - Data Issue: Incorrect Params
passed: Decision not a
Permit.","policyConfigStatus":"CONFIG_NOT_FOUND","type":null,"config":null,"policyName":null,"policyType":null,"policyVersion":null,"matchingConditions":null,"responseAttributes":null,"property":null}]
At least that's what logs are saying.
I've quickly debugged it and it looks like CLAMP sends request with body:
{"policyName":"test_policy_error.Config_MS_ClosedLoop_3cb6b3ad_8b2a_11e8_b055_0242ac120003_TCA_0owl1kv","onapName":null,"configName":null,"configAttributes":null,"requestID":null,"unique":false,"ecompName":null}
In exception from Policy policyName param is null but clamp is sending it.
It looks like some simple serialization issue on Policy side.
I've attached logs to this email.
Can anyone take a look and tell if it happens only on my environment because of
some misconfiguration or is it a bug and jira needs to be created?
Adam Krysiak
Software Engineer
MN MANO RD&Pz ONAP-UI-ML DEVOPS WRO 2 SG
Nokia
Contact number: +48691441316
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11388): https://lists.onap.org/g/onap-discuss/message/11388
Mute This Topic: https://lists.onap.org/mt/23742883/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-