Skip to content

delete all network slices do not deregister the AUSF from the NRF #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
patriciareinoso opened this issue Apr 3, 2025 · 1 comment

Comments

@patriciareinoso
Copy link
Contributor

Description

When receiving the network configuration from webconsole's via the gRPC service. The AUSF stores the PLMN ID (MCC + MNC) in context.PlmnList. The PLMN ID is used in the NF's profile when registering to the NRF.

2025-04-03T09:58:03.518Z [ausf] 2025-04-03T09:58:03.518Z	INFO	service/init.go:202	received updateConfig in the ausf app: RestartCounter:1520406125 NetworkSlice:{Name:"default" Nssai:{Sst:"1" Sd:"102030"} Site:{SiteName:"demo" Gnb:{Name:"ran-gnbsim-gnbsim" Tac:1} Plmn:{mcc:"001" mnc:"01"} Upf:{UpfName:"upf-external.sdcore.svc.cluster.local"}} AppFilters:{PccRuleBase:{FlowInfos:{FlowDesc:"permit out ip from any to assigned" TosTrafficClass:"IPV4" FlowDir:BIDIRECTIONAL} RuleId:"DefaultRule" Qos:{Var5qi:9 Arp:{PL:1 PC:MAY_PREEMPT PV:PREEMPTABLE}} Priority:255}}} ConfigUpdated:1	{"component": "AUSF", "category": "GRPC"}
2025-04-03T09:58:03.518Z [ausf] 2025-04-03T09:58:03.518Z	INFO	service/init.go:204	network Slice Name default	{"component": "AUSF", "category": "GRPC"}
2025-04-03T09:58:03.518Z [ausf] 2025-04-03T09:58:03.518Z	INFO	service/init.go:208	network slice has site name present	{"component": "AUSF", "category": "GRPC"}
2025-04-03T09:58:03.518Z [ausf] 2025-04-03T09:58:03.518Z	INFO	service/init.go:210	site name demo	{"component": "AUSF", "category": "GRPC"}
2025-04-03T09:58:03.518Z [ausf] 2025-04-03T09:58:03.518Z	INFO	service/init.go:214	plmn mcc 001	{"component": "AUSF", "category": "GRPC"}
2025-04-03T09:58:03.518Z [ausf] 2025-04-03T09:58:03.518Z	INFO	service/init.go:245	send config trigger to main routine config updated	{"component": "AUSF", "category": "GRPC"}
2025-04-03T09:58:03.518Z [ausf] 2025-04-03T09:58:03.518Z	INFO	service/init.go:446	minimum configuration from config pod available true	{"component": "AUSF", "category": "Init"}
2025-04-03T09:58:03.585Z [ausf] 2025-04-03T09:58:03.585Z	INFO	service/init.go:378	stopped KeepAlive Timer	{"component": "AUSF", "category": "Init"}
2025-04-03T09:58:03.586Z [ausf] 2025-04-03T09:58:03.586Z	INFO	service/init.go:371	started KeepAlive Timer: 60 sec	{"component": "AUSF", "category": "Init"}
2025-04-03T09:58:03.586Z [ausf] 2025-04-03T09:58:03.586Z	INFO	service/init.go:459	sent Register NF Instance with updated profile	{"component": "AUSF", "category": "CFG"}

However, if we delete all the network slices from the webconsole, the AUSF will receive an empty configuration message, and still considers it has valid PLMN to register to the NRF

2025-04-03T09:58:21.421Z [ausf] 2025-04-03T09:58:21.416Z	INFO	client/gClient.go:193	stream message received	{"component": "Config5g", "category": "GRPC"}
2025-04-03T09:58:21.421Z [ausf] 2025-04-03T09:58:21.417Z	INFO	client/gClient.go:205	complete config deleted	{"component": "Config5g", "category": "GRPC"}
2025-04-03T09:58:21.421Z [ausf] 2025-04-03T09:58:21.417Z	INFO	service/init.go:202	received updateConfig in the ausf app: RestartCounter:1520406125 ConfigUpdated:1	{"component": "AUSF", "category": "GRPC"}
2025-04-03T09:58:21.421Z [ausf] 2025-04-03T09:58:21.417Z	INFO	service/init.go:245	send config trigger to main routine config updated	{"component": "AUSF", "category": "GRPC"}
2025-04-03T09:58:21.421Z [ausf] 2025-04-03T09:58:21.417Z	INFO	service/init.go:446	minimum configuration from config pod available true	{"component": "AUSF", "category": "Init"}
2025-04-03T09:58:21.530Z [ausf] 2025-04-03T09:58:21.530Z	INFO	service/init.go:378	stopped KeepAlive Timer	{"component": "AUSF", "category": "Init"}
2025-04-03T09:58:21.530Z [ausf] 2025-04-03T09:58:21.530Z	INFO	service/init.go:371	started KeepAlive Timer: 60 sec	{"component": "AUSF", "category": "Init"}
2025-04-03T09:58:21.530Z [ausf] 2025-04-03T09:58:21.530Z	INFO	service/init.go:459	sent Register NF Instance with updated profile	{"component": "AUSF", "category": "CFG"}

Looking at the code in ausf/service/init.go, we always add the PLMNs to the context, but never delete them

func (ausf *AUSF) updateConfig(commChannel chan *protos.NetworkSliceResponse) bool {
...
context.PlmnList = append(context.PlmnList, temp)
...
}

To Reproduce

  1. Create a network slice in the webconsole
  2. See in the AUSF that the configuration is received, and that the AUSF registers to the NRF
  3. Delete the network slice in the webconsole
  4. See the following logs, which indicates the context.PlmnList is not empty:
send config trigger to main routine config updated
minimum configuration from config pod available true	

Expected behavior

I would have expected to see the following logs and to see how the AUSF deregisters from the NRF

send config trigger to main routine config deleted
minimum configuration from config pod available false

The Fix

In ausf/service/init.go -> updateConfig I would ovewrite context.PlmnList with what ever is received on the gRPC message, instead of trying to identify the diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant