Skip to content
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

feat: Delete DG operation, remove the DG from the NS list #291

Conversation

patriciareinoso
Copy link
Contributor

@patriciareinoso patriciareinoso commented Jan 20, 2025

Issue

When we DELETE a device group, information is removed from webconsoleData.snapshots.devGroupData. However, if a network slice contains a reference to this device group in site-device-group, the reference is not removed.

When the new config if sent to the NFs clients we get the following logs:

Example for SMF:

2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.280Z	INFO	server/clientEvtHandler.go:511	resStream available	{"component": "WebUI", "category": "GRPC", "NF": "smf-0"}
2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.281Z	INFO	server/clientEvtHandler.go:523	sent data to client from push config 	{"component": "WebUI", "category": "GRPC", "NF": "smf-0"}
2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.281Z	INFO	server/clientEvtHandler.go:564	Config changed true and NewClient false
2025-02-03T13:26:54.281Z [nms] 	{"component": "WebUI", "category": "GRPC", "NF": "smf-0"}
2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.281Z	INFO	server/clientEvtHandler.go:591	Send complete snapshoot to client. Number of Network Slices 1 	{"component": "WebUI", "category": "GRPC", "NF": "smf-0"}
2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.281Z	INFO	server/clientEvtHandler.go:295	Did not find group test2-default 	{"component": "WebUI", "category": "GRPC", "NF": "smf-0"}
2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.281Z	INFO	server/clientEvtHandler.go:704	Not sending slice config	{"component": "WebUI", "category": "GRPC", "NF": "smf-0"}

Example for NFs that require metadata (PCF):

2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.280Z	INFO	server/clientEvtHandler.go:523	sent data to client from push config 	{"component": "WebUI", "category": "GRPC", "NF": "pcf-0"}
2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.280Z	INFO	server/clientEvtHandler.go:564	Config changed true and NewClient false
2025-02-03T13:26:54.281Z [nms] 	{"component": "WebUI", "category": "GRPC", "NF": "pcf-0"}
2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.280Z	INFO	server/clientEvtHandler.go:591	Send complete snapshoot to client. Number of Network Slices 1 	{"component": "WebUI", "category": "GRPC", "NF": "pcf-0"}
2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.280Z	INFO	server/clientEvtHandler.go:295	Did not find group test2-default 	{"component": "WebUI", "category": "GRPC", "NF": "pcf-0"}

Which means that the message is either not sent or incomplete. The reason: fillSlice function fails if the NS contains a reference to a DG that does not exist.

Description

This PR propagates the DELETE device group operation to the network slice that contains the deleted device group. This way, the removal of the DG is done in 1 operation, no need to manually post the network slice to remove the dangling reference anymore.

How the code works

Webconsole behavior on Device Group POST before this PR

When a device group is created (POST) and it belong to a NS. It creates entries for each subscriber in:

  • subscriptionData.provisionedData.smData
  • subscriptionData.provisionedData.smfSelectionSubscriptionData
  • policyData.ues.amData
  • policyData.ues.smData

And update the information in subscriptionData.provisionedData.amData

Webconsole behavior on Device Group DELETE before this PR

When a device group is deleted (DELETE) and it belong to a NS. It removes entries for each subscriber in:

  • subscriptionData.provisionedData.smData
  • subscriptionData.provisionedData.smfSelectionSubscriptionData
  • policyData.ues.amData
  • policyData.ues.smData
  • subscriptionData.provisionedData.amData

This PR

  • Removes the reference to the deleted device group from the networks slices (DB).
  • Modifies the delete operation over subscriptionData.provisionedData.amData to remove only the fields that it added. Since this entry is created in POST subscriber operation. Otherwise, the subscriber can no longer be retrieved by the GET {webconsole}/api/subscriber.
  • Extracts the delete operations that are common during when handling Device Groups and Network slices into a function to reduce code duplication. webconsole/proto/server/configEvtHandler.go
  • Fixes the message sent to NFs clients after a device group is deleted.

How to see the behavior

  1. Create a Subscriber, a DG and a NS
  2. Check the DB entries for that subscriber in
  • subscriptionData.provisionedData.smData
  • subscriptionData.provisionedData.smfSelectionSubscriptionData
  • policyData.ues.amData
  • policyData.ues.smData
  • subscriptionData.provisionedData.amData
  • subscriptionData.authenticationData.authenticationSubscription
  1. DELETE DG

You should see:

  1. The reference removed from the NS
  2. DB information about the subscriber removed from:
  • subscriptionData.provisionedData.smData
  • subscriptionData.provisionedData.smfSelectionSubscriptionData
  • policyData.ues.amData
  • policyData.ues.smData
  1. DB information kept in:
  • subscriptionData.provisionedData.amData (ueID)
  • subscriptionData.authenticationData.authenticationSubscription
  1. GET Subscriber returns the subscriber with only AccessAndMobilitySubscriptionData (ueID) and AuthenticationSubscription

  2. In the logs: in the messages sent to the NFs you should no longer see this line:

2025-02-03T13:26:54.281Z [nms] 2025-02-03T13:26:54.281Z	INFO	server/clientEvtHandler.go:295	Did not find group test2-default 	{"component": "WebUI", "category": "GRPC", "NF": "smf-0"}

Instead, they should look like:

2025-02-03T15:12:03.056Z [nms] 2025-02-03T15:12:03.053Z	INFO	server/clientEvtHandler.go:727	sliceDetails: RestartCounter:2102714460  NetworkSlice:{Name:"test1"  Nssai:{Sst:"1"  Sd:"102030"}  Site:{SiteName:"demo"  Gnb:{Name:"ran-gnbsim-gnbsim"  Tac:1}  Plmn:{mcc:"123"  mnc:"12"}  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": "WebUI", "category": "GRPC", "NF": "ausf-0"}
2025-02-03T15:12:03.056Z [nms] 2025-02-03T15:12:03.053Z	INFO	server/clientEvtHandler.go:739	send slice success	{"component": "WebUI", "category": "GRPC", "NF": "ausf-0"}

Signed-off-by: Patricia Reinoso <[email protected]>
@patriciareinoso patriciareinoso force-pushed the TELCO-1557-delete-dg-from-ns branch from ec03e55 to 36c0f60 Compare January 21, 2025 09:24
Signed-off-by: Patricia Reinoso <[email protected]>
Signed-off-by: Patricia Reinoso <[email protected]>
@patriciareinoso patriciareinoso changed the title feat: Telco 1557 delete dg from ns feat: Delete DG operation, remove the DG from the NS list Jan 21, 2025
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

Successfully merging this pull request may close these issues.

1 participant