open5gs / open5gs

Open5GS is a C-language Open Source implementation for 5G Core and EPC, i.e. the core network of LTE/NR network (Release-17)
https://open5gs.org
GNU Affero General Public License v3.0
1.82k stars 754 forks source link

NF Instance URI is wrong in NRF Notifications #729

Closed fatihozer90 closed 3 years ago

fatihozer90 commented 3 years ago

I was testing NRF Notifications in open5gs, I noticed that nfInstanceUri is wrong which is the subscribed NFs notification URI but it supposed to be the instance ID of Deregistered NFs

I should be like this : {"event":"NF_DEREGISTERED","nfInstanceUri":"http://{nrf_ip}:{nrf_port}/nnrf-nfm/v1/nf-instances/2ce9c3c8-870a-4e12-bbf8-59a8ebb4b0b8"}

image

image

open5gs NRF Response : { "event": "NF_DEREGISTERED", "nfInstanceUri": "http://172.30.65.8:2560/nrf-notification", "nfProfile": { "nfInstanceId": "2ce9c3c8-870a-4e12-bbf8-59a8ebb4b0b8", "nfType": "AMF", "nfStatus": "REGISTERED", "ipv4Addresses": ["172.30.65.6"], "nfServices": [{ "serviceInstanceId": "3aadbff9-de16-4026-960b-280c92583462", "serviceName": "namf-comm", "versions": [{ "apiVersionInUri": "v1", "apiFullVersion": "1.0.0.alpha-1" }], "scheme": "http", "nfServiceStatus": "REGISTERED", "ipEndPoints": [{ "ipv4Address": "172.30.65.6", "port": 2860 }] }, { "serviceInstanceId": "ebeee67c-51af-4f4d-b862-1e2273aa2722", "serviceName": "namf-evts", "versions": [{ "apiVersionInUri": "v1", "apiFullVersion": "1.0.0.alpha-1" }], "scheme": "http", "nfServiceStatus": "REGISTERED", "ipEndPoints": [{ "ipv4Address": "172.30.65.6", "port": 2860 }] }, { "serviceInstanceId": "3d1c3af5-b638-4c43-acab-c8b5ffc91f44", "serviceName": "namf-loc", "versions": [{ "apiVersionInUri": "v1", "apiFullVersion": "1.0.0.alpha-1" }], "scheme": "http", "nfServiceStatus": "REGISTERED", "ipEndPoints": [{ "ipv4Address": "172.30.65.6", "port": 2860 }] }, { "serviceInstanceId": "0c0994b6-a493-4981-b1c1-7f75da009416", "serviceName": "namf-mt", "versions": [{ "apiVersionInUri": "v1", "apiFullVersion": "1.0.0.alpha-1" }], "scheme": "http", "nfServiceStatus": "REGISTERED", "ipEndPoints": [{ "ipv4Address": "172.30.65.6", "port": 2860 }] }, { "serviceInstanceId": "9f41b3e7-3218-46c4-983b-3e617de9379d", "serviceName": "namf-notify", "versions": [{ "apiVersionInUri": "v1", "apiFullVersion": "1.0.0.alpha-1" }], "scheme": "http", "nfServiceStatus": "REGISTERED", "ipEndPoints": [{ "ipv4Address": "172.30.65.6", "port": 2860 }] }] } }

acetcom commented 3 years ago

@fatihozer90

You're right. It was also needed to solve #728. This is because in DEREGISTERED we need to find NF instance by nfInstanceId without NFProfile. So, the format of this nfInstanceURI has been modified as in 6.1.3.3.2.

Thanks a lot! Sukchan

fatihozer90 commented 3 years ago

@acetcom Thank you for your fast response, I tested again and noticed that the problem is solved. NRF Deregistration Notification : { "event" : "NF_DEREGISTERED", "nfInstanceUri" : "http://10.10.12.5:7777/nnrf-nfm/v1/nnrf-nfm/f31c2ebd-5656-4444-8931-83f3d99961d6", "profileChanges" : [ ] }