canonical / sdcore-nssf-k8s-operator

Charmed Operator for the SD-Core Network Slice Selection Function (NSSF).
https://charmhub.io/sdcore-nssf-k8s
Apache License 2.0
0 stars 1 forks source link

Charmed-5G is broken after NSSF pod is recreated #32

Closed ghislainbourgeois closed 5 months ago

ghislainbourgeois commented 9 months ago

Describe the bug

If the pod for NSSF is recreated for any reasons, Charmed-5G fails to run the simulation.

To Reproduce

  1. Deploy Charmed-5G
  2. Run a successful simulation
  3. kubectl delete pod -n core nssf-0
  4. Wait for nssf/0 to be redeployed an become Active/Idle
  5. Run a new simulation, resulting in failure

Expected behavior

After the pod gets recreated, the simulation should still work.

gruyaume commented 9 months ago

Here is the output of the simulation after deleting the nssf pod:

2023-11-22T18:50:07Z [INFO][GNBSIM][App] App Name: GNBSIM
2023-11-22T18:50:07Z [INFO][GNBSIM][App] Setting log level to: trace
2023-11-22T18:50:07Z [TRAC][GNBSIM][Profile][profile1] profile initialized  profile1 , Enable  true
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][gnb1] Inititializing GNodeB
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][gnb1] GNodeB IP:  GNodeB Port: 9487
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][UserPlaneTransport] User Plane transport listening on: 192.168.251.5:2152
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB] Current range selector value: 197
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB] Current ID range start: 3305111552 end: 3321888767
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][ControlPlaneTransport] Connecting to AMF
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Connected to AMF, AMF IP: 10.152.183.246 AMF Port: 38412
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][gnb1] Performing NG Setup Procedure
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][gnb1] Sending NG Setup Request
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Wrote 54 bytes
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Read 48 bytes from 10.152.183.246:38412
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][gnb1] Received NG Setup Response
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Processing NG Setup Response
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Handle NG Setup response
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Decode IE AMFName
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Decode IE ServedGUAMIList
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Decode IE RelativeAMFCapacity
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Decode IE PLMNSupportList
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Processed NG Setup Response
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][gnb1] NG Setup Successful: true
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][gnb1] GNodeB Initialized &{ 9487 192.168.251.5 2152 gnb1 {0xc00048cc40  0xc0004846f0 } [{000001 [{{208 93} [{1 010203}]}]}] 0xc000480cc0 0xc000490ec0 0xc0007008d0 0xc000700930 <nil> 0xc0005122d0 0xc000119970 0xc0004848d0 0xc0001f2d20}
2023-11-22T18:50:07Z [INFO][GNBSIM][Profile][profile1] Init profile: profile1 , profile type: pdusessest
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Created new context
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Created new SimUe context
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Context Created
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbUeDao] Adding new GnbCpUe for RANUENGAPID: 3305111552
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Connected to gNodeB, Name:gnb1, IP:, Port:9487
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] SIM UE Init complete
2023-11-22T18:50:07Z [INFO][GNBSIM][Profile][profile1] ExecuteProfile started
2023-11-22T18:50:07Z [INFO][GNBSIM][Profile][profile1] ExecuteProfile ExecInParallel false. Waiting for UEs to finish procesessing
2023-11-22T18:50:07Z [INFO][GNBSIM][ProfUeCtx][imsi-208930100007487] Execute procedure  REGISTRATION-PROCEDURE
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: CONNECTION-REQUEST-EVENT
2023-11-22T18:50:07Z [INFO][GNBSIM][ProfUeCtx][imsi-208930100007487] Waiting for procedure result from imsiStateMachine
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: PROC-START-EVENT
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Start new procedure  REGISTRATION-PROCEDURE
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Initiating Registration Procedure
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending REGESTRATION-REQUEST-EVENT to RealUe
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: REGESTRATION-REQUEST-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Generating SUPI Registration Request Message
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending REGESTRATION-REQUEST-EVENT to SimUe
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sent Registration Request Message to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: REGESTRATION-REQUEST-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending REGESTRATION-REQUEST-EVENT to GnbUe
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: REGESTRATION-REQUEST-EVENT
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Wrote 73 bytes
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sent Initial UE Message to AMF
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Read 71 bytes from 10.152.183.246
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Processing Downlink Nas Transport
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Handle Downlink NAS Transport
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Decode IE RANUENGAPID
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbUeDao] Fetching GnbCpUe for RANUENGAPID: 3305111552
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: DOWNLINK-NAS-TRANSPORT-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sending event DL-INFO-TRANSFER-EVENT to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: DL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending DL-INFO-TRANSFER-EVENT to RealUe
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: DL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Received Message Type: 86
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending AUTHENTICATION-REQUEST-EVENT to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: AUTHENTICATION-REQUEST-EVENT
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Next Event: AUTHENTICATION-RESPONSE-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending AUTHENTICATION-RESPONSE-EVENT to RealUe
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: AUTHENTICATION-RESPONSE-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Processing corresponding Authentication Request Message
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Generating Authentication Reponse Message
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending AUTHENTICATION-RESPONSE-EVENT to SimUe
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sent Authentication Reponse Message to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: AUTHENTICATION-RESPONSE-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending UL-INFO-TRANSFER-EVENT to GnbUe
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending Authentication Response to the network
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: UL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Creating Uplink NAS Transport Message
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Wrote 69 bytes
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sent Uplink NAS Transport Message to AMF
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Read 48 bytes from 10.152.183.246
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Processing Downlink Nas Transport
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Handle Downlink NAS Transport
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Decode IE RANUENGAPID
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbUeDao] Fetching GnbCpUe for RANUENGAPID: 3305111552
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: DOWNLINK-NAS-TRANSPORT-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sending event DL-INFO-TRANSFER-EVENT to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: DL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending DL-INFO-TRANSFER-EVENT to RealUe
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: DL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Security Header Type Integrity Protected With New 5g Nas Security Context
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Calculate NAS MAC (algorithm: 2, DLCount: 0x0)
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] NAS integrity key: f85d55dcbb3a81468d62d162c1dc1d29
cmac value: 0xa9965982
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Received Message Type: 93
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending SECURITY-MODE-COMMAND-EVENT to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: SECURITY-MODE-COMMAND-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending SECURITY-MODE-COMPLETE-EVENT to RealUe
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: SECURITY-MODE-COMPLETE-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Generating Security Mode Complete Message
2023-11-22T18:50:07Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Security header type: Integrity Protected With New 5G Security Context
2023-11-22T18:50:07Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Encrypt NAS message (algorithm: 0, DLCount: 0x0)
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] NAS ciphering key: 5a85043829333a608a5528678b768891
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending SECURITY-MODE-COMPLETE-EVENT to SimUe
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sent Security Mode Complete Message to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: SECURITY-MODE-COMPLETE-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Handling Security Mode Complete Event
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending UL-INFO-TRANSFER-EVENT to GnbUe
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sent Security Mode Complete to the network
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: UL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Creating Uplink NAS Transport Message
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Wrote 99 bytes
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sent Uplink NAS Transport Message to AMF
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Read 153 bytes from 10.152.183.246
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Processing Initial Context Setup Request
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] InitialContextSetupRequest
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Decode IE RANUENGAPID
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbUeDao] Fetching GnbCpUe for RANUENGAPID: 3305111552
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: INITIAL-CONTEXT-SETUP-REQUEST-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sending event DL-INFO-TRANSFER-EVENT to SimUe
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sent DL Information Transfer Event to UE
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: DL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending DL-INFO-TRANSFER-EVENT to RealUe
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: DL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Security header type: Integrity Protected And Ciphered
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Calculate NAS MAC (algorithm: 2, DLCount: 0x1)
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] NAS integrity key: f85d55dcbb3a81468d62d162c1dc1d29
cmac value: 0x28e906e0
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Received Message Type: 66
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending REGESTRATION-ACCEPT-EVENT to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: REGESTRATION-ACCEPT-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending REGESTRATION-COMPLETE-EVENT to RealUe
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: REGESTRATION-COMPLETE-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Generating Registration Complete Message
2023-11-22T18:50:07Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Security header type: Integrity Protected And Ciphered
2023-11-22T18:50:07Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Encrypt NAS message (algorithm: 0, DLCount: 0x1)
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] NAS ciphering key: 5a85043829333a608a5528678b768891
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending REGESTRATION-COMPLETE-EVENT to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Wrote 24 bytes
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sent Registration Complete Message to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: REGESTRATION-COMPLETE-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending UL-INFO-TRANSFER-EVENT to GnbUe
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sent Registration Complete to the network
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending Procedure Result to Profile : PASS
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending PROC-PASS-EVENT to Profile routine
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sent  PROC-PASS-EVENT to Profile routine
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: UL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Creating Uplink NAS Transport Message
2023-11-22T18:50:07Z [INFO][GNBSIM][ProfUeCtx][imsi-208930100007487] imsiStateMachine received result
2023-11-22T18:50:07Z [INFO][GNBSIM][ProfUeCtx][imsi-208930100007487] Procedure Result: PASS, imsi: imsi-208930100007487
2023-11-22T18:50:07Z [INFO][GNBSIM][ProfUeCtx][imsi-208930100007487] Execute procedure  PDU-SESSION-ESTABLISHMENT-PROCEDURE
2023-11-22T18:50:07Z [INFO][GNBSIM][ProfUeCtx][imsi-208930100007487] Waiting for procedure result from imsiStateMachine
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: PROC-START-EVENT
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Start new procedure  PDU-SESSION-ESTABLISHMENT-PROCEDURE
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Initiating UE Requested PDU Session Establishment Procedure
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending PDU-SESSION-ESTABLISHMENT-REQUEST-EVENT to RealUe
2023-11-22T18:50:07Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: PDU-SESSION-ESTABLISHMENT-REQUEST-EVENT
2023-11-22T18:50:07Z [INFO][NAS][Message] Encode ExtendedProtocolConfigurationOptions in EncodePDUSessionEstablishmentRequest
2023-11-22T18:50:07Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Security header type: Integrity Protected And Ciphered
2023-11-22T18:50:07Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Encrypt NAS message (algorithm: 0, DLCount: 0x1)
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] NAS ciphering key: 5a85043829333a608a5528678b768891
2023-11-22T18:50:07Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending PDU-SESSION-ESTABLISHMENT-REQUEST-EVENT to SimUe
2023-11-22T18:50:07Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: PDU-SESSION-ESTABLISHMENT-REQUEST-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending UL-INFO-TRANSFER-EVENT to GnbUe
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Wrote 58 bytes
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sent Uplink NAS Transport Message to AMF
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: UL-INFO-TRANSFER-EVENT
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Creating Uplink NAS Transport Message
2023-11-22T18:50:07Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Wrote 84 bytes
2023-11-22T18:50:07Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sent Uplink NAS Transport Message to AMF
2023-11-22T18:50:37Z [INFO][GNBSIM][GNodeB][ControlPlaneTransport] Read 66 bytes from 10.152.183.246
2023-11-22T18:50:37Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Processing Downlink Nas Transport
2023-11-22T18:50:37Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Handle Downlink NAS Transport
2023-11-22T18:50:37Z [TRAC][GNBSIM][GNodeB][GnbAmf][] Decode IE RANUENGAPID
2023-11-22T18:50:37Z [INFO][GNBSIM][GNodeB][GnbUeDao] Fetching GnbCpUe for RANUENGAPID: 3305111552
2023-11-22T18:50:37Z [INFO][GNBSIM][GNodeB][GnbCpUe][3305111552] Handling event: DOWNLINK-NAS-TRANSPORT-EVENT
2023-11-22T18:50:37Z [TRAC][GNBSIM][GNodeB][GnbCpUe][3305111552] Sending event DL-INFO-TRANSFER-EVENT to SimUe
2023-11-22T18:50:37Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: DL-INFO-TRANSFER-EVENT
2023-11-22T18:50:37Z [TRAC][GNBSIM][SimUe][imsi-208930100007487] Sending DL-INFO-TRANSFER-EVENT to RealUe
2023-11-22T18:50:37Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Handling: DL-INFO-TRANSFER-EVENT
2023-11-22T18:50:37Z [DEBU][GNBSIM][RealUe][imsi-208930100007487] Security header type: Integrity Protected And Ciphered
2023-11-22T18:50:37Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Calculate NAS MAC (algorithm: 2, DLCount: 0x2)
2023-11-22T18:50:37Z [INFO][GNBSIM][RealUe][imsi-208930100007487] NAS integrity key: f85d55dcbb3a81468d62d162c1dc1d29
cmac value: 0x836ea07f
2023-11-22T18:50:37Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Received Message Type: 104
2023-11-22T18:50:37Z [INFO][GNBSIM][RealUe][imsi-208930100007487] Payload contaner type:{1}
2023-11-22T18:50:37Z [TRAC][GNBSIM][RealUe][imsi-208930100007487] Sending PDU-SESSION-ESTABLISHMENT-REQUEST-EVENT to SimUe
2023-11-22T18:50:37Z [INFO][GNBSIM][SimUe][imsi-208930100007487] Handling event: PDU-SESSION-ESTABLISHMENT-REQUEST-EVENT
panic: interface conversion: common.InterfaceMessage is *common.UeMessage, not *common.UuMessage

goroutine 16 [running]:
github.com/omec-project/gnbsim/simue.HandlePduSessEstRequestEvent(...)
    /root/parts/gnbsim/build/simue/handler.go:173
github.com/omec-project/gnbsim/simue.HandleEvents(0xc0001fe2a0)
    /root/parts/gnbsim/build/simue/simue.go:95 +0xa07
created by github.com/omec-project/gnbsim/simue.Init
    /root/parts/gnbsim/build/simue/simue.go:41 +0x195
command terminated with exit code 2

I was initially suspecting that this was caused by the fact that the NRF did not register the new IP from the NSSF. However looking at the NRF logs, it seems like it does receive the new IP:

2023-11-22T18:38:58.775Z [nrf] 2023-11-22T18:38:58Z [INFO][NRF][MGMT] nf profile [NSSF] update success
2023-11-22T18:38:58.775Z [nrf] 2023/11/22 18:38:58 iterate stream :  map[_id:map[_data:82655E4AC2000000022B022C0100296E5A10042B2C1E8F6E374763BB7D9122F58D0B4B46645F69640064655E48E26334CDDB24E690220004] clusterTime:{1700678338 2} documentKey:map[_id:ObjectID("655e48e26334cddb24e69022")] ns:map[coll:NfProfile db:free5gc] operationType:update updateDescription:map[removedFields:[] truncatedArrays:[] updatedFields:map[expireAt:1700678518771 nfServices:[map[apiPrefix:https://10.1.182.17:29531 ipEndPoints:[map[ipv4Address:10.1.182.17 port:29531 transport:TCP]] nfServiceStatus:REGISTERED scheme:https serviceInstanceId:1 serviceName:nnssf-nssaiavailability versions:[map[apiFullVersion:1.0.0 apiVersionInUri:v1]]] map[apiPrefix:https://10.1.182.17:29531 ipEndPoints:[map[ipv4Address:10.1.182.17 port:29531 transport:TCP]] nfServiceStatus:REGISTERED scheme:https serviceInstanceId:0 serviceName:nnssf-nsselection versions:[map[apiFullVersion:1.0.0 apiVersionInUri:v1]]]] plmnList:[map[mcc: mnc:]]]]]

Here the NSSF moved from 10.1.182.35 to 10.1.182.17 and the log above indicates that the NRF caught the new IP which is good.

I'm following up to try to understand where's the issue.

gruyaume commented 9 months ago

Looking at the AMF logs, we see the following error message:

2023-11-22T18:50:37.424Z [amf] 2023-11-22T18:50:37Z [ERRO][AMF][GMM][AMF_UE_NGAP_ID:13864935][SUPI:imsi-208930100007487][SUCI:suci-0-208-93-0-0-0-0100007487] Select SMF failed: NSSelection Get Error[NSSF No Response]

Which suggests that the AMF may be using the old NSSF IP instead of the new one.

And indeed, deleting the AMF and re-re-running the simulation now works so it seems like the AMF caches the NSSF IP in some way.

gruyaume commented 9 months ago

I think I found the issue.

The AMF will only make a call to the NRF to retrieve the NSSF URI if it hasn't a stored value for the NSSF URI instead of making it every time it needs to communicate with the NSSF.

Reference:

gruyaume commented 9 months ago

I opened this bug in the upstream project: https://github.com/omec-project/amf/issues/133