Brian

yes it looks like a race condition within the SO as indicated by Steve.
I will try to test on Master tomorrow (hope the nighlty deployment will be OK)
I will create a JIRA.

/Morgan


Le mardi 22 janvier 2019 à 14:41 +0000, Brian a écrit :
Morgan,

Sounds like a Jira is appropriate. From your analysis – is it an SO issue ? (or 
at least it starts there ?)

Brian


From: onap-discuss@lists.onap.org <onap-discuss@lists.onap.org> On Behalf Of 
Morgan Richomme
Sent: Tuesday, January 22, 2019 9:35 AM
To: BENJAMIN, MAX <mb3...@att.com>; sv00449...@techmahindra.com; 
lukasz.muszki...@nokia.com; seshu.kuma...@huawei.com; 
subhash.kumar.si...@huawei.com
Cc: onap-discuss@lists.onap.org
Subject: [onap-discuss] [ONAP] [SO] [VNF-API] impossible to delete service 
instance with the SO - IN_PROGRESS never ends

Hi

I observed a strange behavior when cleaning resources with Casablanca (no 
problem with Beijing).

Before creating a JIRA, I would like to be sure that this issue has not already 
been reported.
I did not find anything neither on SO JIRAs nor on the mailing list.

With Casablanca, I can onboard then instantiated a VNF using the old VNF-API 
(old but not deprecated).

Everything is almost fine
- Onboarding OK: from the upload of the heat files to the model distribution in 
the different modules.
- Instantiation OK: creation of service instance => creation of the VNF 
instance(s) => preload(s) => creation of the VF module(s)

But I got a problem when I try to clean the resources
delete of the VF module(s) => delete of the VNF instance(s) => delete of the 
preload(s) OK
but delete of the service instance never ends and keeps "IN_PROGRESS"

according to the SO logs

creation then deletion of the VNF COMPLETED
--------------------------> create VNF
/app/logs/apih # grep 54d8314d-8b76-4a76-ad8b-270a39a4164b audit.log
2019-01-22T13:00:33.981Z|2019-01-22T13:00:35.444Z|95de6d44-c262-4c38-b602-d2abc3682f57||http-nio-8080-exec-7||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d/vnfs/54d8314d-8b76-4a76-ad8b-270a39a4164b/vfModules||COMPLETED|202||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|0|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.
2019-01-22T13:01:58.084Z|2019-01-22T13:01:59.570Z|5c97e518-c9df-4424-ba08-dd0adb3743f5||http-nio-8080-exec-8||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d/vnfs/54d8314d-8b76-4a76-ad8b-270a39a4164b/vfModules/c83f0095-bbc3-4327-a33e-ed12b1e3d26c||COMPLETED|202||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|0|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.
--------------------------> clean
2019-01-22T13:02:45.542Z|2019-01-22T13:02:47.011Z|9d764278-bfce-489c-be9d-6bf3f324c5e3||http-nio-8080-exec-2||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d/vnfs/54d8314d-8b76-4a76-ad8b-270a39a4164b||COMPLETED|202||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|0|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.


--------------------------> create service instance
2019-01-22T13:00:11.867Z|2019-01-22T13:00:13.181Z|8c54f59d-0bf4-4f96-be11-71f02e694294||http-nio-8080-exec-2||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d/vnfs||COMPLETED|202||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|0|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.
2019-01-22T13:00:33.981Z|2019-01-22T13:00:35.444Z|95de6d44-c262-4c38-b602-d2abc3682f57||http-nio-8080-exec-7||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d/vnfs/54d8314d-8b76-4a76-ad8b-270a39a4164b/vfModules||COMPLETED|202||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|0|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.
2019-01-22T13:01:58.084Z|2019-01-22T13:01:59.570Z|5c97e518-c9df-4424-ba08-dd0adb3743f5||http-nio-8080-exec-8||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d/vnfs/54d8314d-8b76-4a76-ad8b-270a39a4164b/vfModules/c83f0095-bbc3-4327-a33e-ed12b1e3d26c||COMPLETED|202||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|0|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.
--------------------------> clean
2019-01-22T13:02:45.542Z|2019-01-22T13:02:47.011Z|9d764278-bfce-489c-be9d-6bf3f324c5e3||http-nio-8080-exec-2||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d/vnfs/54d8314d-8b76-4a76-ad8b-270a39a4164b||COMPLETED|202||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|0|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.
2019-01-22T13:02:57.974Z|2019-01-22T13:02:59.266Z|02ad82a2-198b-4e43-87c1-ddfde03c0b42||http-nio-8080-exec-4||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d||COMPLETED|202||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|0|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.
--------------------------> manual attempt with the VID some minutes later
2019-01-22T13:24:45.698Z|2019-01-22T13:24:45.764Z|a4be4eb1-7387-417d-b0a7-889c5d0e4ca9||http-nio-8080-exec-10||onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d||ERROR|409||b1307e77-a122-4be4-993c-c3a5fd6f1b8d|INFO|2|||onap-so-so-85f675cfd9-6qsmg/10.42.102.18|||||||||Exiting.

From BPMN logs, It looks OK.

in the debug.log of the SO (see full logs attached) around 13:02:58, I can see 
the deletion state moving from PENDING (13:02:58) to IN_PROGRESS (13:02:59)
but it stays in IN_PROGRESS and is never COMPLETED
that is why when I try manually to delete the instance through the VID I got

2019-01-22T13:24:45.763Z|a4be4eb1-7387-417d-b0a7-889c5d0e4ca9|http-nio-8080-exec-10|onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d||||ERROR|||Error:
 Locked instance - This service (6536a8ee-a7fc-4443-a722-6c0918ba361d) already 
has a request being worked with a status of IN_PROGRESS (RequestId - 
02ad82a2-198b-4e43-87c1-ddfde03c0b42). The existing request must finish or be 
cleaned up before proceeding.
org.onap.so.apihandlerinfra.exceptions.DuplicateRequestException: Error: Locked 
instance - This service (6536a8ee-a7fc-4443-a722-6c0918ba361d) already has a 
request being worked with a status of IN_PROGRESS (RequestId - 
02ad82a2-198b-4e43-87c1-ddfde03c0b42). The existing request must finish or be 
cleaned up before proceeding.
2019-01-22T13:24:45.763Z|a4be4eb1-7387-417d-b0a7-889c5d0e4ca9|http-nio-8080-exec-10|onap/so/infra/serviceInstantiation/v7/serviceInstances/6536a8ee-a7fc-4443-a722-6c0918ba361d||||ERROR|400|Error:
 Locked instance - This service (6536a8ee-a7fc-4443-a722-6c0918ba361d) already 
has a request being worked with a status of IN_PROGRESS (RequestId - 
02ad82a2-198b-4e43-87c1-ddfde03c0b42). The existing request must finish or be 
cleaned up before proceeding.|APIH_DUPLICATE_FOUND



In the VID I can see only the service instance, it means the VNF and the VF 
module have been deleted

[cid:a6d279ab1a95d50acdb20c632c90ba4560ac67bf.camel@orange.com]

If I have a look at the VID GUI of the instance


"requestId": "d6541749-6eb8-4600-841b-c892edf940df",

"requestType": "createInstance",

"timestamp": "Tue, 22 Jan 2019 14:00:01",

"requestState": "COMPLETE",

"requestStatus": "Service Instance was created successfully.",

"percent-progress": "100"



"requestId": "8c54f59d-0bf4-4f96-be11-71f02e694294",

"requestType": "createInstance",

"timestamp": "Tue, 22 Jan 2019 14:00:13",

"requestState": "COMPLETE",

"requestStatus": "Vnf has been created successfully.",

"percent-progress": "100"



"requestId": "95de6d44-c262-4c38-b602-d2abc3682f57",

"requestType": "createInstance",

"timestamp": "Tue, 22 Jan 2019 14:01:21",

"requestState": "COMPLETE",

"requestStatus": "Vf Module has been created successfully.",

"percent-progress": "100"



"requestId": "5c97e518-c9df-4424-ba08-dd0adb3743f5",

"requestType": "deleteInstance",

"timestamp": "Tue, 22 Jan 2019 14:02:18",

"requestState": "COMPLETE",

"requestStatus": "Vf Module has been deleted successfully.",

"percent-progress": "100"



"requestId": "9d764278-bfce-489c-be9d-6bf3f324c5e3",

"requestType": "deleteInstance",

"requestState": "IN_PROGRESS",

"requestStatus": undefined,

"percent-progress": undefined



"requestId": "02ad82a2-198b-4e43-87c1-ddfde03c0b42",

"requestType": "deleteInstance",

"requestState": "IN_PROGRESS",

"requestStatus": undefined,

"percent-progress": undefined


With my tool, once I call the SO to delete the VF module, the VNf or the 
service instance, I check directly in the AA&I that the references have been 
cleaned.
it is OK for the Module and the VNF but the reference keeps in the A&AI
However we do not get message in the VID saying that the VNF has been cleaned
I got the same behavior using my test framework 
(https://gitlab.com/Orange-OpenSource/lfn/onap/onap-tests<https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.com_Orange-2DOpenSource_lfn_onap_onap-2Dtests&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=e3d1ehx3DI5AoMgDmi2Fzw&m=_he7avdqpkeY9V6I9HrYGzjHksTIAKs4r3wBVCMcpvs&s=Y6jIrl-WCer8-yvbTBsjD_f7rkC9uTY4ywPuw-uHfeY&e=>)
 or performing all the operations manually with the VID.

On my side cleaning resources is part of my test
In fact the tests are run regularly through CI, resources must be properly 
cleaned in order to avoid resource duplication or misuse and, to get a clean 
system after the tests...
here it seems that using the old API, it is impossible to delete any service 
instance (except if we do it directly in the DB, which is not the nominal 
case...)

Note: I just created an instance (but no VNF, VF module) then delete it and I 
do not have the problem.

/Morgan



_________________________________________________________________________________________________________________________



Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc

pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler

a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,

Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.



This message and its attachments may contain confidential or privileged 
information that may be protected by law;

they should not be distributed, used or copied without authorisation.

If you have received this email in error, please notify the sender and delete 
this message and its attachments.

As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.

Thank you.


_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15087): https://lists.onap.org/g/onap-discuss/message/15087
Mute This Topic: https://lists.onap.org/mt/29413839/21656
Group Owner: onap-discuss+ow...@lists.onap.org
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to