aws-greengrass / aws-greengrass-shadow-manager

A GreengrassV2 Component that provides offline device shadow documents and optional synchronization to the IoT device shadow service.
Apache License 2.0
9 stars 5 forks source link

(configuration): ShadowManager stops responding to configuration updates #129

Closed jbutler closed 1 year ago

jbutler commented 1 year ago

Describe the bug Shadow Manager can reach a state where it effectively stops listening to configuration updates. While in this state, it is not possible for customers to update ShadowManager configuration to add / remove shadows, or to change sync behavior. This leads to customer frustration since their configuration may actually be correct, but ShadowManager does not respect it. Restarting Greengrass resolves the issue.

This issue is caused by the fact that ShadowManager subscribes to individual configuration nodes during initialization (e.g. here, and here). These configuration node subscriptions are "lost" if the node gets deleted. This occurs if a deployment which performs a RESET on the configuration node occurs.

To Reproduce

  1. Deploy ShadowManager component
  2. Perform a second deployment which performs a ShadowManager configuration reset (RESET: [""])
  3. Perform a third deployment which configures SM to sync a shadow

Expected behavior ShadowManager should respond to the 3rd deployment by beginning to sync the specified shadow.

Actual behavior It does not sync the new shadow until Greengrass is restarted.

Environment

Additional context Add any other context about the problem here.

E.g. what is the impact of the bug?

saranyailla commented 1 year ago

Closed as part of shadow manager 2.2.4 release.