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

supported disable/enable device-group from slice #46

Merged
merged 2 commits into from Oct 19, 2021

Conversation

vthiruveedula
Copy link
Contributor

No description provided.

@vthiruveedula
Copy link
Contributor Author

test container

}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at line 790. If lastDevGroup is set then we are deleting all the IMSIs which are not part of devGroup..

Imagine 2 slices and 2 device group
Slice1 -> DG1
Slice2 -> DG2
Now if we update content of DG2 ( adding new IMSI in the DG2).
postConfigHss is called with DG2.
while looping thorugh all slices and their device groups, we end up in comparing DG1 IMSIs with DG2 imsis.
and result is we delete all the IMSIs from DG2. This is what we have seen today in Aether production.

fixed crash issue happening when pod comes up in production
@@ -499,8 +502,20 @@ func clientEventMachine(client *clientNF) {
if configMsg.MsgType == configmodels.Sub_data && configMsg.MsgMethod == configmodels.Delete_op {
imsiVal := strings.ReplaceAll(configMsg.Imsi, "imsi-", "")
deleteConfigHss(client, imsiVal)
} else if configMsg.SliceName != "" && configMsg.MsgMethod == configmodels.Delete_op {
for _, name := range lastSlice.SiteDeviceGroup {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is slice delete case. Please note that slice delete can happen and device group can stay without slice. You can delete IMSIs from HSS, but we want device group to stay as is. SO that next time, new slice can be created and it cause use the device group.

@@ -499,8 +502,20 @@ func clientEventMachine(client *clientNF) {
if configMsg.MsgType == configmodels.Sub_data && configMsg.MsgMethod == configmodels.Delete_op {
imsiVal := strings.ReplaceAll(configMsg.Imsi, "imsi-", "")
deleteConfigHss(client, imsiVal)
} else if configMsg.SliceName != "" && configMsg.MsgMethod == configmodels.Delete_op {
for _, name := range lastSlice.SiteDeviceGroup {
if client.devgroupsConfigClient[name] != nil && !isDeviceGroupInExistingSlices(client, name) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete device group IMSIs only if no other slice is using this device group

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes check added that if no other slices uses this device group

// imsi is not present in latest device Group
imsis := getDeletedImsiList(lastDevGroup, devGroup)
client.clientLog.Infoln("Deleted Imsi list from DeviceGroup: ", imsis)
for _, val := range imsis {
deleteConfigHss(client, val)
}
newImsis = getAddedImsiList(lastDevGroup, devGroup)
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just dont add this else loop...anyways this is the case of multiple device group..
DG11, DG12 under same slice SLICE1... Isnt it like we will run this for loop for DG11 & DG12 as well.

@vthiruveedula
Copy link
Contributor Author

test container

@vthiruveedula vthiruveedula merged commit 08d7bca into onf-release3.0.5 Oct 19, 2021
@vthiruveedula vthiruveedula deleted the dev-imsiData-lock branch October 19, 2021 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants