You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
What happened?
ChirpStack Application Server API lets you change an application's service profile. Due to the fact there's a separation of network and application specific data, the device entity in the network database has its own service profile id attribute. It seems that changing the application's service profile does not cause the underlying devices to update their service profile id in the network database.
You can see that the corresponding code updates the application but not the underlying devices. In my opinion that leads to a inconsistency in which the application-side has the new service profile, while the network-side does not.
What did you expect?
Changing an application's service profile should cause all underlying devices to update their service profile id in the network database. That would require the code that is linked above to instruct the network server to update all devices inside that application.
Steps to reproduce this issue
Steps:
Create two service profiles X and Y
Create an application A (id: 1) with service profile X
Create a device D in application A and verify via database that the device has service profile X in the network database
Device D in network database will still have service profile X while the corresponding application has the new service profile Y
no
Your Environment
Cloned chirpstack-docker repo which currently uses the docker images with tag 3. I attempted to obtain AS and NS versions via chirpstack-application-server version command inside the container but that lead to an empty output.
The text was updated successfully, but these errors were encountered:
I think I would rather prevent applications from changing their service-profile. There is no guarantee that the service-profile exists within the NS database, as there could be multiple service-profiles, fragmented over multiple NS databases.
Just checked, there is already code that validates that the service-profile exists on the NS instance.
Yes. When you update an application, a call to storage.GetServiceProfile is performed. And this method does indeed check via the NS client if the service profile exists. I guess you are also talking about this code snippet.
I think I would rather prevent applications from changing their service-profile. There is no guarantee that the service-profile exists within the NS database, as there could be multiple service-profiles, fragmented over multiple NS databases.
Now that we're sure that the existence of the service-profile on the NS instance is verified, there's no reason why we shouldn't allow an application to switch the service-profile?
We basically need to retrieve a list containing all device EUIs of the application. For each device we need to determine the NS instance (assuming an application's devices can span over multiple NS instances), create a client and send an update request with the new service-profile id. And all that in a transactional manner.
What happened?
ChirpStack Application Server API lets you change an application's service profile. Due to the fact there's a separation of network and application specific data, the device entity in the network database has its own service profile id attribute. It seems that changing the application's service profile does not cause the underlying devices to update their service profile id in the network database.
You can see that the corresponding code updates the application but not the underlying devices. In my opinion that leads to a inconsistency in which the application-side has the new service profile, while the network-side does not.
What did you expect?
Changing an application's service profile should cause all underlying devices to update their service profile id in the network database. That would require the code that is linked above to instruct the network server to update all devices inside that application.
Steps to reproduce this issue
Steps:
Your Environment
Cloned chirpstack-docker repo which currently uses the docker images with tag
3
. I attempted to obtain AS and NS versions viachirpstack-application-server version
command inside the container but that lead to an empty output.The text was updated successfully, but these errors were encountered: