Hi Vamshi, Glad you make it. You may contact me if you have other issue within OOF.
Best Regards, Ruoyu From: [email protected] [mailto:[email protected]] On Behalf Of vamshi Sent: Thursday, August 22, 2019 11:00 PM To: [email protected]; Ying, Ruoyu <[email protected]> Subject: Re: [onap-discuss] [SO][OOF] error while instantiating service That's solved the issue Ruoyu. I could see Service Instance created now. Thank you so much. What I missed is : Matching between the following attributes as you suggested. resources(Policy) = resourceModuleName(SO) policyScope (Policy) = ServiceName(SO) Thanks & Regards, Vamshi Krishna | Tech Mahindra Sharda Centre, Off Karve Road, Erandwane, Pune 411 004, INDIA Mobile: +91 9848639561, ext : 3492 Email Id - [email protected]<mailto:[email protected]> [cid:[email protected]]<http://www.techmahindra.com/> From: Vamshi Namilikonda Sent: Thursday, August 22, 2019 10:57 AM To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]> Subject: RE: [onap-discuss] [SO][OOF] error while instantiating service Hello Ruoyu, Thank you so much, you are right. We've no right data in AAI compared to Policies pushed. I'm trying with right policy data. Many thanks for your continuous support. Thanks & Regards, Vamshi Krishna | Tech Mahindra Sharda Centre, Off Karve Road, Erandwane, Pune 411 004, INDIA Mobile: +91 9848639561, ext : 3492 Email Id - [email protected]<mailto:[email protected]> [cid:[email protected]]<http://www.techmahindra.com/> From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Ying, Ruoyu via Lists.Onap.Org Sent: Saturday, August 17, 2019 12:27 PM To: [email protected]<mailto:[email protected]>; Vamshi Namilikonda <[email protected]<mailto:[email protected]>> Subject: Re: [onap-discuss] [SO][OOF] error while instantiating service Hi Vamshi, I checked the logs you attached. It is showing that OOF cannot find an appropriate flavor inside AAI, so it is returning a 'not found' to SO which causes the results here. Can you check if you do have a candidate inside AAI matches all the requirement you specified in the HPA policies? Thanks. Best Regards, Ruoyu From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of vamshi Sent: Friday, August 16, 2019 10:09 PM To: Ying, Ruoyu <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> Subject: Re: [onap-discuss] [SO][OOF] error while instantiating service Hello Ruoyu, Thank you very much. I made changes to ensure following set match against each other. There is some improvement as Payload to Conductor has picked more data, but issue is there still. Please take a look on logs attached. Thanks again resources(Policy) = HpaVf51 ; resourceModuleName(SO) = "HpaVf51" policyScope (Policy) = vfw ; ServiceName(SO) = "vfw" 2019-08-16T13:30:30,180+00:00||Thread-86||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Payload to Conductor: {"name": "65487c09-d1ae-40f0-93ab-6be1fa8e365e", "files": {}, "num_solution": "1", "timeout": 600, "template": {"homing_template_version": "2017-10-10", "optimization": {"minimize": {"sum": [{"product": ["100", {"distance_between": ["customer_loc", "HpaVf51"]}]}, {"product": ["200", {"hpa_score": ["HpaVf51"]}]}]}}, "constraints": {"distance-vFW": {"properties": {"location": "customer_loc", "distance": "< 100 km"}, "demands": ["HpaVf51"], "type": "distance_to_location"}, "hpa-vFW": {"properties": {"evaluate": [{"directives": [{"attributes": [{"attribute_name": "firewall_flavor_name", "attribute_value": ""}], "type": "flavor_directives"}], "type": "vnfc", "id": "vfw", "flavorProperties": [{"hpa-feature": "basicCapabilities", "mandatory": "True", "architecture": "generic", "directives": [], "hpa-feature-attributes": [{"hpa-attribute-value": "2", "unit": "", "operator": "=", "hpa-attribute-key": "numVirtualCpu"}, {"hpa-attribute-value": "512", "unit": "MB", "operator": "=", "hpa-attribute-key": "virtualMemSize"}], "hpa-version": "v1"}, {"hpa-feature": "hugePages", "mandatory": "True", "architecture": "generic", "directives": [], "hpa-feature-attributes": [{"hpa-attribute-value": "2", "unit": "MB", "operator": "=", "hpa-attribute-key": "memoryPageSize"}], "hpa-version": "v1"}, {"hpa-feature": "localStorage", "mandatory": "True", "architecture": "generic", "directives": [], "hpa-feature-attributes": [{"hpa-attribute-value": "10", "unit": "GB", "hpa-attribute-key": "diskSize", "operator": ">="}], "hpa-version": "v1"}, {"hpa-feature": "cpuPinning", "mandatory": "False", "score": "100", "architecture": "generic", "directives": [], "hpa-feature-attributes": [{"hpa-attribute-value": "isolate", "unit": "", "operator": "=", "hpa-attribute-key": "logicalCpuThreadPinningPolicy"}, {"hpa-attribute-value": "dedicated", "unit": "", "operator": "=", "hpa-attribute-key": "logicalCpuPinningPolicy"}], "hpa-version": "v1"}]}, {"directives": [{"attributes": [{"attribute_name": "packetgen_flavor_name", "attribute_value": ""}], "type": "flavor_directives"}], "type": "vnfc", "id": "vgenerator", "flavorProperties": [{"hpa-feature": "basicCapabilities", "mandatory": "True", "architecture": "generic", "directives": [], "hpa-feature-attributes": [{"hpa-attribute-value": "1", "operator": ">=", "hpa-attribute-key": "numVirtualCpu"}, {"hpa-attribute-value": "7", "unit": "GB", "operator": ">=", "hpa-attribute-key": "virtualMemSize"}], "hpa-version": "v1"}, {"hpa-feature": "localStorage", "mandatory": "True", "architecture": "generic", "directives": [], "hpa-feature-attributes": [{"hpa-attribute-value": "10", "unit": "GB", "hpa-attribute-key": "diskSize", "operator": ">="}], "hpa-version": "v1"}]}, {"directives": [{"attributes": [{"attribute_name": "sink_flavor_name", "attribute_value": ""}], "type": "flavor_directives"}], "type": "vnfc", "id": "vsink", "flavorProperties": [{"hpa-feature": "basicCapabilities", "mandatory": "True", "architecture": "generic", "directives": [], "hpa-feature-attributes": [], "hpa-version": "v1"}]}]}, "demands": ["HpaVf51"], "type": "hpa"}}, "parameters": {"REQUIRED_DISK": "", "customer_lat": "32.89948", "REQUIRED_MEM": "", "customer_long": "97.045443", "service_name": "vfw", "service_id": "77534651-3d9e-4033-8378-0b31f1f9ca92"}, "locations": {"customer_loc": {"latitude": {"get_param": "customer_lat"}, "longitude": {"get_param": "customer_long"}}}, "demands": {"HpaVf51": [{"service_resource_id": "53a43a3a-2ad9-475e-860a-84e3329df186", "attributes": {"model-invariant-id": "b1b75792-65ac-4c48-b89a-192553eccc11", "model-version-id": "5540debe-28b1-4146-944c-309a95ea1de6"}, "service_type": "53a43a3a-2ad9-475e-860a-84e3329df186", "inventory_type": "cloud", "inventory_provider": "aai"}]}}} Thanks & Regards, Vamshi Krishna | Tech Mahindra Sharda Centre, Off Karve Road, Erandwane, Pune 411 004, INDIA Mobile: +91 9848639561, ext : 3492 Email Id - [email protected]<mailto:[email protected]> [cid:[email protected]]<http://www.techmahindra.com/> From: Ying, Ruoyu <[email protected]<mailto:[email protected]>> Sent: Friday, August 16, 2019 6:52 AM To: [email protected]<mailto:[email protected]>; Vamshi Namilikonda <[email protected]<mailto:[email protected]>> Subject: RE: [onap-discuss] [SO][OOF] error while instantiating service Hi Vamshi, I checked the logs here and I saw there's something missing in your policy. First, to apply the policies for a certain VNF included in a certain service, you need to make the two keys inside the policies('resources' and 'policyScope') matching with the values you have in your SO request. You need to have your 'ServiceName' in the SO request available inside the 'policyScope' in the policy, and have your 'resourceModuleName' in the SO request available as part of 'resources' in the policies. Take an example here. According to the pushed-policies.txt and the so-bpmn-log.txt you provided. We shall have a sample Distance policy being retrieved like this: { "config": "{\"service\":\"distancePolicy\",\"guard\":\"False\",\"content\":{\"policyType\":\"distance_to_location\",\"applicableResources\":\"any\",\"identity\":\"distance-vFW\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"distanceProperties\":{\"distance\":{\"value\":\"100\",\"unit\":\"km\",\"operator\":\"<\"},\"locationInfo\":\"customer_loc\"},\"resources\":[\"vFW\",\"VfwHeatHpaV1\",\"HpaVf42\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"Distance Policy for vFW\",\"policyName\":\"OSDF_DUBLIN.Distance_vFW_1\",\"version\":\"test1\",\"riskType\":\"test\"}", "matchingConditions": { "ECOMPName": "SampleDemo", "ONAPName": "SampleDemo", "policyScope": "vfw,us,international,ip", "policyType": "distance_to_location", "service": "distancePolicy" }, "policyConfigMessage": "Config Retrieved! ", "policyConfigStatus": "CONFIG_RETRIEVED", "policyName": "OSDF_DUBLIN.Config_MS_Distance_vFW_1.1.xml", "policyType": "MicroService", "policyVersion": "1", "property": null, "responseAttributes": {}, "type": "JSON" } So I think it is because of this, that a lot information are missing in the payload and cause the failure of placement. Can you try updating the policies with the correct value and see if it can solve this problem? Thanks. Best Regards, Ruoyu From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of vamshi Sent: Wednesday, August 14, 2019 7:26 PM To: Ying, Ruoyu <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> Subject: Re: [onap-discuss] [SO][OOF] error while instantiating service Hello Ruoyu, Many thanks for your reply. Here I pulled the logs need to understand the issue. I've also attached logs from SO, OSDF and policies that are pushed. Thank you OOF-OSDF - debug.log ------------------------------ 2019-08-14T10:56:17,245+00:00||Thread-62||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Sending first Conductor request for request_id 9f85f94d-52eb-4aba-a970-ebc3367052fa 2019-08-14T10:56:17,245+00:00||Thread-62||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Payload to Conductor: {"name": "9f85f94d-52eb-4aba-a970-ebc3367052fa", "files": {}, "num_solution": "1", "timeout": 600, "template": {"homing_template_version": "2017-10-10", "optimization": {"minimize": {"sum": []}}, "constraints": {}, "parameters": {"REQUIRED_DISK": "", "customer_lat": "32.897480", "REQUIRED_MEM": "", "customer_long": "97.040443", "service_name": "vFW", "service_id": "e5bacb00-4e32-4e4b-811a-a327e2b00202"}, "locations": {"customer_loc": {"latitude": {"get_param": "customer_lat"}, "longitude": {"get_param": "customer_long"}}}, "demands": {}}} 2019-08-14T10:56:17,246+00:00||Thread-62||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Requesting URL: https://oof-has-api:8091/v1/plans/ 2019-08-14T10:56:19,954+00:00||Thread-62||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Received response [code: 201, headers: {'X-LatestVersion': '1.3.1', 'Content-Type': 'application/json', 'Date': 'Wed, 14 Aug 2019 10:56:19 GMT', 'X-PatchVersion': '1', 'Server': 'nginx/1.14.2', 'Connection': 'keep-alive', 'Content-Length': '228', 'X-MinorVersion': '0'}, data: {'history': [], 'status_code': 201, '_next': None, 'request': <PreparedRequest [POST]>, 'reason': 'Created', 'connection': <requests.adapters.HTTPAdapter object at 0x7f56ebdd75c0>, '_content': b'{"status": "template", "name": "9f85f94d-52eb-4aba-a970-ebc3367052fa", "links": [[{"href": "https://oof-has-api:8091/v1/plans/f4c6f2c8-45a7-4a67-a9d5-52c8e1372d37", "rel": "self"}]], "id": "f4c6f2c8-45a7-4a67-a9d5-52c8e1372d37"}', 'headers': {'X-LatestVersion': '1.3.1', 'Content-Type': 'application/json', 'Date': 'Wed, 14 Aug 2019 10:56:19 GMT', 'X-PatchVersion': '1', 'Server': 'nginx/1.14.2', 'Connection': 'keep-alive', 'Content-Length': '228', 'X-MinorVersion': '0'}, '_content_consumed': True, 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(0, 2, 687100), 'url': 'https://oof-has-api:8091/v1/plans/', 'raw': <urllib3.response.HTTPResponse object at 0x7f56ebde0438>, 'encoding': None}] 2019-08-14T10:56:29,965+00:00||Thread-62||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Attempting to read the plan from the conductor provided url https://oof-has-api:8091/v1/plans/f4c6f2c8-45a7-4a67-a9d5-52c8e1372d37 2019-08-14T10:56:29,965+00:00||Thread-62||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Requesting URL: https://oof-has-api:8091/v1/plans/f4c6f2c8-45a7-4a67-a9d5-52c8e1372d37 2019-08-14T10:56:31,497+00:00||Thread-62||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Received response [code: 200, headers: {'X-LatestVersion': '1.3.1', 'Content-Type': 'application/json', 'Date': 'Wed, 14 Aug 2019 10:56:31 GMT', 'X-PatchVersion': '1', 'Server': 'nginx/1.14.2', 'Connection': 'keep-alive', 'Content-Length': '316', 'X-MinorVersion': '0'}, data: {'history': [], 'status_code': 200, '_next': None, 'request': <PreparedRequest [GET]>, 'reason': 'OK', 'connection': <requests.adapters.HTTPAdapter object at 0x7f56ebde0fd0>, '_content': b'{"plans": [{"status": "error", "message": "local variable \'triage_data_trans\' referenced before assignment", "name": "9f85f94d-52eb-4aba-a970-ebc3367052fa", "links": [[{"href": "https://oof-has-api:8091/v1/plans/f4c6f2c8-45a7-4a67-a9d5-52c8e1372d37", "rel": "self"}]], "id": "f4c6f2c8-45a7-4a67-a9d5-52c8e1372d37"}]}', 'headers': {'X-LatestVersion': '1.3.1', 'Content-Type': 'application/json', 'Date': 'Wed, 14 Aug 2019 10:56:31 GMT', 'X-PatchVersion': '1', 'Server': 'nginx/1.14.2', 'Connection': 'keep-alive', 'Content-Length': '316', 'X-MinorVersion': '0'}, '_content_consumed': True, 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(0, 1, 509218), 'url': 'https://oof-has-api:8091/v1/plans/f4c6f2c8-45a7-4a67-a9d5-52c8e1372d37', 'raw': <urllib3.response.HTTPResponse object at 0x7f56ebdcf048>, 'encoding': None}] 2019-08-14T10:56:31,498+00:00||Thread-62||OOF_OSDF|a6ffc2dc-af83-11e9-a796-ce8f9b3345ee|DEBUG||10.42.4.26|dev-oof-oof-79f9f55959-fqgs4||||Requesting URL: http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/oofResponse/9f85f94d-52eb-4aba-a970-ebc3367052fa<https://ind01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fso-bpmn-infra.onap%3A8081%2Fmso%2FWorkflowMessage%2FoofResponse%2F9f85f94d-52eb-4aba-a970-ebc3367052fa&data=02%7C01%7Cvn00480215%40techmahindra.com%7C28d30d750f24436d07cf08d722e02499%7Cedf442f5b9944c86a131b42b03a16c95%7C0%7C0%7C637016218399243638&sdata=RTB%2FkwvE%2B6Jum32t28EEFX81hn56eTmOna8PjO016pY%3D&reserved=0> Thanks & Regards, Vamshi Krishna | Tech Mahindra Sharda Centre, Off Karve Road, Erandwane, Pune 411 004, INDIA Mobile: +91 9848639561, ext : 3492 Email Id - [email protected]<mailto:[email protected]> [cid:[email protected]]<http://www.techmahindra.com/> From: Ying, Ruoyu <[email protected]<mailto:[email protected]>> Sent: Wednesday, August 14, 2019 7:19 AM To: [email protected]<mailto:[email protected]>; Vamshi Namilikonda <[email protected]<mailto:[email protected]>> Subject: RE: [onap-discuss] [SO][OOF] error while instantiating service Hi Vamshi, This error mainly happens when there's something wrong with the optimization policy that is needed for placement. May you try login to the osdf pod and copy the debug log(especially the payload it send to conductor) here? That will help us to locate the root cause for the problem. Thanks. Best Regards, Ruoyu From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of vamshi Sent: Tuesday, August 13, 2019 5:42 PM To: [email protected]<mailto:[email protected]> Subject: [onap-discuss] [SO][OOF] error while instantiating service Hello SO/OOF team, I'm trying vFW automation script for instantiating vFW use case. By following page https://github.com/onap/integration/tree/master/test/hpa_automation/heat<https://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fonap%2Fintegration%2Ftree%2Fmaster%2Ftest%2Fhpa_automation%2Fheat&data=02%7C01%7Cvn00480215%40techmahindra.com%7C28d30d750f24436d07cf08d722e02499%7Cedf442f5b9944c86a131b42b03a16c95%7C0%7C0%7C637016218399253630&sdata=Sb1o6wfzk6X7McheEky8F3JDkiViQBxY5kwW41%2Bjc28%3D&reserved=0> I was facing below issue in SO while it is trying to request OOF , have pulled log from - dev-so-so-bpmn-infra-5b4f566958-7jql6. The detailed log has attached to this mail. Could you please suggest any thoughts with your observations. Thank you 2019-08-13T06:49:14.926Z|5899cd91-80a9-4adc-9b09-40ce5340a0e0| org.onap.so.bpmn.common.scripts.OofHoming - OOF Async Callback Response is: "{\"externalApplicationDetails\": {\"httpMethod\": \"GET\", \"httpStatusCode\": 200, \"responseMessage\": {\"plans\": [{\"name\": \"c8fc2537-3080-4cc7-873e-82e1a404550d\", \"status\": \"error\", \"id\": \"375bcb8e-5ab8-403f-940f-306e5068363f\", \"links\": [[{\"rel\": \"self\", \"href\": \"https://oof-has-api:8091/v1/plans/375bcb8e-5ab8-403f-940f-306e5068363f\<https://oof-has-api:8091/v1/plans/375bcb8e-5ab8-403f-940f-306e5068363f/>"}]], \"message\": \"local variable 'triage_data_trans' referenced before assignment\"}]}, \"url\": \"https://oof-has-api:8091/v1/plans/375bcb8e-5ab8-403f-940f-306e5068363f\<https://oof-has-api:8091/v1/plans/375bcb8e-5ab8-403f-940f-306e5068363f/>"}, \"serviceException\": {\"text\": \"A request exception has occurred when contacting an external system\", \"errorType\": \"InterfaceError\"}}" 2019-08-13T06:49:14.932Z|5899cd91-80a9-4adc-9b09-40ce5340a0e0| org.onap.so.bpmn.core.json.JsonUtils - getJsonRawValue(): unable to parse json to retrieve value for field=solutions.placementSolutions. Exception was: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] at org.json.JSONTokener.syntaxError(JSONTokener.java:433) at org.json.JSONObject.<init>(JSONObject.java:194) at org.json.JSONObject.<init>(JSONObject.java:321) at org.onap.so.bpmn.core.json.JsonUtils.getJsonRawValue(JsonUtils.java:775) at org.onap.so.bpmn.core.json.JsonUtils.getJsonRawValue(JsonUtils.java:757) Thanks & Regards, Vamshi Krishna | Tech Mahindra Sharda Centre, Off Karve Road, Erandwane, Pune 411 004, INDIA Mobile: +91 9848639561, ext : 3492 Email Id - [email protected]<mailto:[email protected]> [cid:[email protected]]<http://www.techmahindra.com/> ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. ============================================================================================================================ -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18672): https://lists.onap.org/g/onap-discuss/message/18672 Mute This Topic: https://lists.onap.org/mt/32850918/21656 Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
