The request is correct. See below generic structure for LCM stop operation:
{
"input": {
"common-header": {
"timestamp": "{{serverDate}}",
"api-ver": "2.00",
"originator-id": "{{orginatorId}}",
"request-id": "Postman",
"sub-request-id": "Postman",
"flags": {
"mode": "NORMAL",
"force": "TRUE",
"ttl": 36000
}
},
"action": "Stop",
"action-identifiers": {
"vnf-id": "{{vnf-id}}",
"vserver-id":"{{vserver-id}}"
},
"payload":
"{\"vm-id\":\"{{vm-id}}\",\"identity-url\":\"{{identity-url}}\",\"tenant-id\":\"{{tenant-id}}\"}"
}
}
As you can see, the payload items are escaped. Does that URL exist? One thing
you should check is whether you can access openstack using the IP address
directly. In my case, if I do http://1.2.3.4 it will not work even if 1.2.3.4
is a valid address for my openstack controller. For some reason, my openstack
wants the word “controller” instead of the IP. So I have http://controller
instead of http://1.2.3.4
Check API Access in your openstack (it should be under Access and Security).
If you see something like this http://controller:5000/v3 then you should add
192.168.37.15 controller
To /etc/hosts in the appc pod.
Marco
From: "[email protected]" <[email protected]>
Date: Wednesday, November 20, 2019 at 12:33 PM
To: "PLATANIA, MARCO (MARCO)" <[email protected]>,
"[email protected]" <[email protected]>
Subject: Re: [onap-discuss] APPC -> RE: [onap-discuss] #appc Unable to execute
stop lcm operation from APPC
Hi Marco, Taka,
I am facing an issue while doing LCM Stop operation. In karaf.log it says VM
URL is invalid (please see the log snippet below). I noticed that in my request
additional escape chars are being added when vm url is extracted from payload.
Below is my payload
lcm_stop_payload.json
{
"version": "2.00",
"rpc-name": "stop",
"correlation-id": "c09ac7d1-de62-0016-2000-e63701125557-201",
"type": "request",
"body": {
"input": {
"common-header": {
"timestamp": "2019-11-20T3:44:51.36Z",
"api-ver": "2.00",
"originator-id": "849e6c6b420",
"request-id": "OpenSTACK",
"sub-request-id": "stop10",
"flags": {
"force": "TRUE",
"ttl": 60000
}
},
"action": "Stop",
"action-identifiers": {
"vnf-id":
"dc4ccb80-adf1-4557-872b-4e4b3e1b5c3c",
"vserver-id":
"775348eb-78c5-4150-87c7-95852e12ba45"
},
"payload":
"{\"vm-id\":\"http://192.168.37.15:8774/v2.1/3d412a0caed04122a94f4cbff2258405/servers/775348eb-78c5-4150-87c7-95852e12ba45\<https://urldefense.proofpoint.com/v2/url?u=http-3A__192.168.37.15-3A8774_v2.1_3d412a0caed04122a94f4cbff2258405_servers_775348eb-2D78c5-2D4150-2D87c7-2D95852e12ba45-255C&d=DwQFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=KgFIQiUJzSC0gUhJaQxg8eC3w16GC3sKgWIcs4iIee0&m=bpUpHHH5kku6vGpkymsw1zBgNcSs4WHER1tcVwiBDeY&s=tgF0m84D2y4Cg8Ors_ivXEvNdbEZHLW55sIs6dJgHzQ&e=>",
\"identity-url\":
\"http://192.168.37.15:5000/v3\",\"skip-hypervisor-check\":\"true\"}"<https://urldefense.proofpoint.com/v2/url?u=http-3A__192.168.37.15-3A5000_v3-255C-2522-2C-255C-2522skip-2Dhypervisor-2Dcheck-255C-2522-3A-255C-2522true-255C-2522-257D-2522&d=DwQFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=KgFIQiUJzSC0gUhJaQxg8eC3w16GC3sKgWIcs4iIee0&m=bpUpHHH5kku6vGpkymsw1zBgNcSs4WHER1tcVwiBDeY&s=S_0IFrbibtJeylDoT9k3t_GZREbLkpFun_66T_StX74&e=>
}
}
}
I am making below rest call
curl -v -H 'Content-type: application/json' -X POST
http://localhost:30227/events/APPC-LCM-READ -d @lcm_stop_payload.json
Below is the error string from karaf.log
2019-11-20T09:57:28,134 | ERROR | appc-dispatcher-3 | ProviderOperation
| 475 - appc-iaas-adapter - 1.5.2 | APPC0041E APPC IAAS Adapter cannot
perform requested service, VM url
[http:%5C/%5C/192.168.37.15:8774%5C/v2.1%5C/3d412a0caed04122a94f4cbff2258405%5C/servers%5C/fa452444-9a63-48ed-92b8-4a3088f9a4ad]
is invalid
I checked appc code and I think this is happening due to the escape chars which
is being added when vm url is being extracted from the payload due to which
validateVM in stopServer() might be returning false. I don't see this happening
in logs of others who have replied. I am using Dublin release.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19534): https://lists.onap.org/g/onap-discuss/message/19534
Mute This Topic: https://lists.onap.org/mt/31641303/21656
Mute #appc: https://lists.onap.org/mk?hashtag=appc&subid=2740164
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-