Hi Jorge, Thanks for the reply. Now policies are pushed and when I post DMAAP events sdnc actor is called as expected. but I got an exception for sdnc.url. /opt/app/policy/config/controlloop.properties.environment file is not present in latest version. So In which file sdnc.url should be set?
a8c24c70c66b: ccvpn.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED: operation=ControlLoopOperationManager [onset=6f455b14-efd9-450a-bf78-e47d55b6da87, policy=unique-policy-id-16-Reroute, attempts=1, policyResult=null, currentOperation=Operation [attempt=1, policyResult=null, operation=ControlLoopOperation [actor=SDNC, operation=Reroute, target=Target [type=VM, resourceId=null], start=2018-10-30T21:47:16.447Z, end=null, subRequestId=1, outcome=null, message=null]], operationHistory=[]]: AAI failure:* The value of policy engine manager environment property "sdnc.url" may not be null* java.lang.IllegalArgumentException: The value of policy engine manager environment property "sdnc.url" may not be null at org.onap.policy.sdnc.SdncManager.getPeManagerEnvProperty(SdncManager.java:157) at org.onap.policy.sdnc.SdncManager.<init>(SdncManager.java:68) at org.onap.policy.controlloop.Rule_EVENT$u46$MANAGER$u46$OPERATION$u46$LOCKED$u46$GUARD_PERMITTED1446493144.defaultConsequence(Rule_EVENT$u46$MANAGER$u46$OPERATION$u46$LOCKED$u46$GUARD_PERMITTED1446493144.java:72) at org.onap.policy.controlloop.Rule_EVENT$u46$MANAGER$u46$OPERATION$u46$LOCKED$u46$GUARD_PERMITTED1446493144DefaultConsequenceInvokerGenerated.evaluate(Unknown Source) at org.onap.policy.controlloop.Rule_EVENT$u46$MANAGER$u46$OPERATION$u46$LOCKED$u46$GUARD_PERMITTED1446493144DefaultConsequenceInvoker.evaluate(Unknown Source) at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1052) at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:121) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74) at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:970) at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1312) at org.drools.core.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:1232) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:1398) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:1377) at org.onap.policy.drools.core.PolicySession$DefaultThreadModel.run(PolicySession.java:472) at java.lang.Thread.run(Thread.java:748) [2018-10-30T21:47:16.456+00:00|INFO|MavenDroolsController|Session org.onap.policy.rules.amsterdam:amsterdam:1.3.1:casablanca] Thanks, Vidya On Tue, Oct 30, 2018 at 11:31 PM HERNANDEZ-HERRERO, JORGE <[email protected]> wrote: > Hi Vidya, > > > > Regarding #1: > > See below an example with the “amsterdam” controller using the telemetry > shell, “Casablanca” is not loaded. Follow the same steps to retrieve > similar information for your use case. If you don’t want to use the tool, > use the curl commands to the URLs pointed in the prompt. The URL paths > should be the same but just switching “amsterdam” with “casablanca”. The > facts will be a tad different. > > > > -Jorge > > policy@dev-policy-drools-0:/tmp/policy-install$ telemetry > > Version: 0.11.2 > > https://localhost:9696/policy/pdp/engine> cd controllers > > https://localhost:9696/policy/pdp/engine/controllers> get > > HTTP/1.1 200 OK > > Content-Length: 13 > > Content-Type: application/json > > Date: Tue, 30 Oct 2018 17:53:16 GMT > > Server: Jetty(9.4.12.v20180830) > > > > [ > > "amsterdam" > > ] > > > > https://localhost:9696/policy/pdp/engine/controllers> cd amsterdam > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam> ls > > decoders drools encoders inputs properties switches > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam> cd drools > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools> > get | jq .sessionCoordinates > > [ > > > "org.onap.policy-engine.drools.amsterdam:policy-amsterdam-rules:0.9.0:closedloop-amsterdam" > > ] > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools> > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools> > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools> ls > > facts > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools> cd > facts > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts> > get > > HTTP/1.1 200 OK > > Content-Length: 26 > > Content-Type: application/json > > Date: Tue, 30 Oct 2018 17:56:08 GMT > > Server: Jetty(9.4.12.v20180830) > > > > { > > "closedloop-amsterdam": 4 > > } > > > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts> > cd closedloop-amsterdam > > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam> > > > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam> > get > > HTTP/1.1 200 OK > > Content-Length: 40 > > Content-Type: application/json > > Date: Tue, 30 Oct 2018 17:56:31 GMT > > Server: Jetty(9.4.12.v20180830) > > > > { > > "org.onap.policy.controlloop.Params": 4 > > } > > > > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam> > cd org.onap.policy.controlloop.Params > > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params> > get > > HTTP/1.1 200 OK > > Content-Length: 3566 > > Content-Type: application/json > > Date: Tue, 30 Oct 2018 17:56:45 GMT > > Server: Jetty(9.4.12.v20180830) > > > > [ > > { > > "closedLoopControlName": > "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", > > "controlLoopYaml": > "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%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" > > }, > > { > > "closedLoopControlName": > "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", > > "controlLoopYaml": > "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0A++trigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0A++timeout%3A+1200%0D%0A++abatement%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+TBD+-+Cannot+be+known+until+instantiation+is+done%0D%0A++++++resourceID%3A+f96be00e-2b04-4f2e-ae2f-854a1d83f608%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-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", > > "controlLoopYaml": > "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%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-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b", > > "controlLoopYaml": > "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%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" > > } > > ] > > > > > https://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params > > > > -Jorge > > > > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Vidyashree Rama > *Sent:* Tuesday, October 30, 2018 4:29 AM > *To:* HERNANDEZ-HERRERO, JORGE <[email protected]> > *Cc:* [email protected]; [email protected]; Gaurav agrawal < > [email protected]>; Rama SubbaReddy <[email protected] > > > *Subject:* Re: [onap-discuss][policy] please help to resolve this issue - > No JSON object could be decoded > > > > Hi Jorge, > > > > Thanks for the response. it worked. > > > > I am facing another issue. Kindly help to proceed. > > When I post dmaap events, EVENT.CLEANUP is executed which means policy is > not avaliable. > > 1. How to check whether policy is loaded in casablanca? > > 2. How to set the log level to debug? > > > > I am sending following request to push policy > > > > policy@drools:/tmp/basex-controlloop$ > > *policy@drools:/tmp/basex-controlloop$ curl -k --silent --user > [email protected]:demo123456 <[email protected]:demo123456>! -X PUT > --header 'Content-Type: text/plain' -d '{"closedLoopControlName": > "ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b","controlLoopYaml": > "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b%0D%0A++trigger_policy%3A+unique-policy-id-16-Reroute%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-Reroute%0D%0A++++name%3A+Connectivity > Reroute%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+Reroute%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","policyName": > "ccvpn","policyScope":"DCAE","policyVersion": "1.2.0"}' > "https://localhost:9696/policy/pdp/engine/topics/sources/dmaap/unauthenticated.DCAE_CL_OUTPUT/events > <https://localhost:9696/policy/pdp/engine/topics/sources/dmaap/unauthenticated.DCAE_CL_OUTPUT/events>"* > > ["{\"closedLoopControlName\": > \"ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b\",\"controlLoopYaml\": > \"controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b%0D%0A++trigger_policy%3A+unique-policy-id-16-Reroute%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-Reroute%0D%0A++++name%3A+Connectivity > Reroute%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+Reroute%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\",\"policyName\": > \"ccvpn\",\"policyScope\":\"DCAE\",\"policyVersion\": > \"1.2.0\"}"]policy@drools:/tmp/basex-controlloop$ > > policy@drools:/tmp/basex-controlloop$ > > > > *Response for > http://localhost:9696/policy/pdp/engine/controllers/casablanca/drools/facts/casablanca > <http://localhost:9696/policy/pdp/engine/controllers/casablanca/drools/facts/casablanca>* > > > > *https://localhost:9696/policy/pdp/engine > <https://localhost:9696/policy/pdp/engine>> get --auth > [email protected]:demo1 <[email protected]:demo1>* > > *23456! > http://localhost:9696/policy/pdp/engine/controllers/casablanca/drools/fac > <http://localhost:9696/policy/pdp/engine/controllers/casablanca/drools/fac>* > > *ts/casablanca* > > HTTP/1.1 200 OK > > Content-Length: 967 > > Content-Type: application/json > > Date: Tue, 30 Oct 2018 08:54:15 GMT > > Server: Jetty(9.4.12.v20180830) > > > > { > > "alive": true, > > "controllers": [ > > "casablanca" > > ], > > "features": [ > > "org.onap.policy.drools.healthcheck.HealthCheckFeature", > > > "org.onap.policy.drools.apps.controlloop.feature.utils.ControlLoopUtilsFeature" > > ], > > "httpServers": [ > > { > > "alive": true, > > "host": "0.0.0.0", > > "name": "SECURED-CONFIG", > > "port": 9696, > > "user": "[email protected]" > > } > > ], > > "locked": false, > > "sinks": [ > > { > > "alive": true, > > "allowSelfSignedCerts": false, > > "apiKey": "", > > "apiSecret": "", > > "locked": false, > > "partitionKey": "96c420a9-265a-4a3f-8a1f-a12933e31c3d", > > "recentEvents": [], > > "servers": [ > > "mr.api.simpledemo.onap.org > <https://urldefense.proofpoint.com/v2/url?u=http-3A__mr.api.simpledemo.onap.org&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=KBxNCnvBiULMFrLf7-mWDLRIqfGifj9OdPuEw3oydrY&m=OXXxDwPi2syj5IZV6aj8ADJkIqYVvKa5Y88txSeRfMg&s=_C12CbAqkL8X0aitqFiuShPCUm0VSVH9GBuY7aAREoE&e=> > " > > ], > > "topic": "PDPD-CONFIGURATION", > > "topicCommInfrastructure": "DMAAP", > > "useHttps": true > > } > > ], > > "sources": [ > > { > > "alive": true, > > "allowSelfSignedCerts": false, > > "apiKey": "", > > "apiSecret": "", > > "consumerGroup": "92362421-1b86-4418-b1fe-c08bb2ac5ab4", > > "consumerInstance": "drools", > > "fetchLimit": 100, > > "fetchTimeout": 15000, > > "locked": false, > > "recentEvents": [], > > "servers": [ > > "mr.api.simpledemo.onap.org > <https://urldefense.proofpoint.com/v2/url?u=http-3A__mr.api.simpledemo.onap.org&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=KBxNCnvBiULMFrLf7-mWDLRIqfGifj9OdPuEw3oydrY&m=OXXxDwPi2syj5IZV6aj8ADJkIqYVvKa5Y88txSeRfMg&s=_C12CbAqkL8X0aitqFiuShPCUm0VSVH9GBuY7aAREoE&e=> > " > > ], > > "topic": "PDPD-CONFIGURATION", > > "topicCommInfrastructure": "DMAAP", > > "useHttps": true > > } > > ] > > } > > > > > > *Beijing verison logs: * > > > > policy@drools:/tmp/basex-controlloop/bin$ > > policy@drools:/tmp/basex-controlloop/bin$ curl --silent --user > @1b3rt:31nst31n -X GET > http://localhost:9696/policy/pdp/engine/controllers/beijing/drools/facts/beijing > | python -m json.tool > > { > > "org.onap.policy.controlloop.params.ControlLoopParams": 2 > > } > > policy@drools:/tmp/basex-controlloop/bin$ > > > > Thanks, > > Vidya > > > > > > On Sun, Oct 28, 2018 at 8:28 AM HERNANDEZ-HERRERO, JORGE <[email protected]> > wrote: > > Hello Vidya, > > > > Switch the url to https, and correct the credentials. > > > > Check the credentials within the drools container by “echo > $ENGINE_MANAGEMENT_USER” and $ENGINE_MANAGEMENT_PASSWORD” in a bash > shell. > > > > Remove the last piped command (python) to see curl’s output. > > > > I also encourage you to use the telemetry shell within the drools > container to get this info easier. Type “telemetry” in the drools > container, “cd controllers/casablanca” and then “get”. > > > > Best regards, > > Jorge > > > > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Vidyashree Rama > *Sent:* Saturday, October 27, 2018 1:22 AM > *To:* [email protected] > *Cc:* [email protected]; Gaurav agrawal <[email protected]>; > Rama SubbaReddy <[email protected]> > *Subject:* [onap-discuss][policy] please help to resolve this issue - No > JSON object could be decoded > > > > Hi All, > > > > Please help to resolve this issue "No JSON object could be decoded". > > I am getting "No JSON object could be decoded" for " > http://localhost:9696/policy/pdp/engine/controllers/casablanca" request > > > > root@onap-policy:~# > > root@onap-policy:~# > > root@onap-policy:~# curl --silent --user @1b3rt:31nst31n -X GET > http://localhost:9696/policy/pdp/engine/controllers/amsterdam | python -m > json.tool > > No JSON object could be decoded > > root@onap-policy:~# > > root@onap-policy:~# > > root@onap-policy:~# curl --silent --user @1b3rt:31nst31n -X GET > http://localhost:9696/policy/pdp/engine/controllers/casablanca | python > -m json.tool > > No JSON object could be decoded > > root@onap-policy:~# > > root@onap-policy:~# > > root@onap-policy:~# > > root@onap-policy:~# python --version > > Python 2.7.6 > > root@onap-policy:~# > > root@onap-policy:~# > > root@onap-policy:~# docker exec -it drools bash > > policy@drools:/tmp/policy-install$ features status > > name version status > > ---- ------- ------ > > state-management 1.3.0-SNAPSHOT disabled > > controlloop-amsterdam 1.3.1 disabled > > session-persistence 1.3.0-SNAPSHOT disabled > > distributed-locking 1.3.0-SNAPSHOT disabled > > controlloop-utils 1.3.1 enabled > > eelf 1.3.0-SNAPSHOT disabled > > *controlloop-casablanca 1.3.1 enabled* > > active-standby-management 1.3.0-SNAPSHOT disabled > > test-transaction 1.3.0-SNAPSHOT disabled > > controlloop-trans 1.3.1 enabled > > pooling-dmaap 1.3.0-SNAPSHOT disabled > > healthcheck 1.3.0-SNAPSHOT enabled > > > > policy@drools:/tmp/policy-install$ > > > > Thanks, > > Vidya > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13416): https://lists.onap.org/g/onap-discuss/message/13416 Mute This Topic: https://lists.onap.org/mt/27747206/21656 Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
