Skip to content

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

Description

@patriciareinoso

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions