forked from Azure/iotedge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore device scopes from older store (version < 1.2) (Azure#4889)
Edgehub version 1.1 didn't have DeviceScope and ParentScopes in storage and updating to 1.2 fails to start edgeHub because reading from cache fails. Fix is to check the service identity that was read from storage for current device (from actorDeviceId) and if the DeviceScope is empty that means it is a restore from older version (edge devices should always have DeviceScope) and set the value for DeviceScope from device details (deviceId and generationId). For leaf devices it sets DeviceScope and ParentScopes to the edge device scope because if the device was in store it must be a child of the edge device and sync from cloud will update the leaf device in case it was removed as child. This fixes Azure#4828
- Loading branch information
1 parent
c7d7e58
commit 207a5f0
Showing
3 changed files
with
140 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.