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

Delete Device Group / Network Slice also deletes the Subscribers from DB #301

Open
patriciareinoso opened this issue Feb 5, 2025 · 0 comments

Comments

@patriciareinoso
Copy link
Contributor

patriciareinoso commented Feb 5, 2025

Description

When we create a subscriber X (POST), the following tables are created:

  • subscriptionData.authenticationData.authenticationSubscription
  • subscriptionData.provisionedData.amData

When subscriber X is associated to a DG that belongs to a NS, the following tables are created:

  • subscriptionData.provisionedData.smData
  • subscriptionData.provisionedData.smfSelectionSubscriptionData
  • policyData.ues.amData
  • policyData.ues.smData
  • policyData.ues.flowRule
  • AND subscriptionData.provisionedData.amData is updated to add PlmnID, Nssai, Gpsis, SubscribedUeAmbr

When we DELETE a DG or a NS, the following tables are deleted:

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

The Issue

When we retrieve all subcribers GET /api/subscriber, the information returned is based on subscriptionData.provisionedData.amData table. Which mean that if we try to retrieve all the subscribers, the subscriber X will no longer be on the list. And we'll have "orphan" information in the subscriptionData.authenticationData.authenticationSubscription table.

If we retrieve the subscriber by name (GET /api/subscriber/X) you'll see that the authenticationSubscription is filled but the rest of the fields are empty.

Expected behavior

I would have expected that when I delete a DG/NS, the subscribers associated to it are not removed. The same way a DG is not removed when you delete a NS that contains it.

So I would expect that GET /api/subscriber contains this subscriber

How to reproduce

  1. Create a Subcriber
  2. Create a DG and associate the subscriber to it
  3. Create a NS and associate the the DG to it.

Check the DB tables.

  1. Delete the DG.

Only the subscriptionData.authenticationData.authenticationSubscription should exist.
And when try to GET /api/subscriber the subscriber does not exist anymore.
If you GET /api/subscriber/X you'll see that the authenticationSubscription is filled but the rest of the fields are empty.

Solution attempts

I tried to fix this issue by only deleting PlmnID, Nssai, Gpsis, SubscribedUeAmbr from the subscriptionData.provisionedData.amData table when deleting a DG / NS. However, if a subscriber belongs to multiple NS, and you delete all of them we'll end up with multiple entries in the subscriptionData.provisionedData.amData looking like this:

"ueID: "X",

at the same time, it's not clear if a subscriber may belong to multiple dg/ ns.

Maybe we should base the GET /api/subscriber on the subscriptionData.authenticationData.authenticationSubscription table instead? (just brainstorming)

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