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

Cumulocity IoT operations created whilst the bridge is down are not processed upon reconnection #3166

Closed
reubenmiller opened this issue Oct 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working theme:c8y Theme: Cumulocity related topics
Milestone

Comments

@reubenmiller
Copy link
Contributor

Describe the bug

Cumulocity IoT operations which are created whilst the Cumulocity IoT MQTT bridge is disconnected do not get processed by the tedge-mapper-c8y when the network outage has passed (e.g. the bridge can communicate with Cumulocity IoT again).

The operations are left in the PENDING state until the mapper is either restarted, or a manual SmartREST 2.0 500 static SmartREST 2.0 message is published (once the mapper health status returns).

Workaround

The following MQTT message can be published locally to request the PENDING operations from Cumulocity IoT once the cloud connectivity has been restored:

tedge mqtt pub c8y/s/us 500

To Reproduce

  1. Install and configuration thin-edge.io and verify the bridge connection to Cumulocity IoT is up/healthy

  2. Disconnect the network

  3. Wait until the bridge is down

  4. Create a new operation in Cumulocity IoT. For example request a the tedge-configuration-plugin

  5. Connect the network

  6. Wait until the bridge has been re-established

  7. Expectation: The pending operation should be processed by thin-edge.io, and set to SUCCESSFUL

Expected behavior

Any operations which are created whilst the Cumulocity IoT bridge is down, should be processed one the connectivity has been reestablished.

The way this should be done, is that the static SmartREST 2.0 template, 500 should be sent when the connection has been restored.

Screenshots

Environment (please complete the following information):

  • OS [incl. version]: any
  • Hardware [incl. revision]: any
  • System-Architecture [e.g. result of "uname -a"]: any
  • thin-edge.io version [e.g. 0.1.0]: 1.3.1

Additional context

@reubenmiller reubenmiller added bug Something isn't working theme:c8y Theme: Cumulocity related topics labels Oct 7, 2024
@reubenmiller
Copy link
Contributor Author

A system test case has been added to cover the bug found here. #3170

@reubenmiller reubenmiller added this to the 1.4.0 milestone Nov 11, 2024
@reubenmiller reubenmiller changed the title Cumulocity IoT operations created whilst the bridge is done are not processed upon reconnection Cumulocity IoT operations created whilst the bridge is down are not processed upon reconnection Nov 11, 2024
@jarhodes314 jarhodes314 self-assigned this Dec 11, 2024
@reubenmiller
Copy link
Contributor Author

I've tested this fix (included part of #3278), and it works as intended, but there is a following up issue where the devicecontrol/operations message payload can included multiple operations (newline delimited), which causes the parsing to fail. So technically this ticket can be closed, and the limitation on parsing the multiple operations in one message from the cloud is tracked in this ticket: #3297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working theme:c8y Theme: Cumulocity related topics
Projects
None yet
Development

No branches or pull requests

2 participants