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

Avoid crashloop in case of invalid connector #112

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

maciej-cz
Copy link
Contributor

Problem

When Invalid connector is created (e.g. liveobjects connector with invalid API key) the system returns error, but the connector is created anyway. In such case a microservice keeps working normally.
However, when the microservice is restarted and it fails to create a connection (in LNSIntegrationService::init) it enters crashloop: it keeps trying to create the invalid connection because of the way how cumulocity SDK reacts in exception from methods reacting on MicroserviceSubscriptionAddedEvent. The microservice is not operational in such case and when requested, cumulocity claims it's not subscribed by a tenant.

Solution

Errors at a single connector creation are logged and swallowed not affecting a whole microservice and other connectors.

@cpoder cpoder merged commit 7302caa into Cumulocity-IoT:master Jul 4, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants