-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
4e9dd7e
to
5515762
Compare
test container |
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
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.
5515762
to
b84b141
Compare
fixed crash issue happening when pod comes up in production
b84b141
to
6c01ff2
Compare
@@ -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 { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
af9c79d
to
a1b52be
Compare
… into dev-imsiData-lock
a1b52be
to
29f373b
Compare
test container |
No description provided.