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

[release/1.1] Prevent EdgeHub from starting without a valid configuration #5515

Merged
merged 9 commits into from
Oct 27, 2021

Conversation

onalante-msft
Copy link
Contributor

@onalante-msft onalante-msft commented Sep 16, 2021

Currently, EdgeHub 1.1 can start without a valid configuration. This PR backports logic introduced in later releases to check that a configuration was pulled successfully, and modifies the configuration pulling task to fail when appropriate.

Fixes #5398.

@@ -56,6 +56,13 @@ public async Task Init(IConfigSource configProvider)
{
Events.GettingConfig();
await pullTask;

this.currentConfig.Expect<InvalidOperationException>(() => throw new InvalidOperationException(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested text - Cannot start successfully as could not get configuration for EdgeHub.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same text that is used in later versions. Should we change those also?

varunpuranik
varunpuranik previously approved these changes Sep 28, 2021
No merge conflicts. Merged changes are in agent, edgelet, and pipeline
configuration, and so should not have any problematic interactions with the
changes in this branch.
@kodiakhq kodiakhq bot merged commit 849e110 into Azure:release/1.1 Oct 27, 2021
kodiakhq bot pushed a commit that referenced this pull request Oct 27, 2021
…5516)

This commit modifies EdgeHub initialization to make sure a configuration was pulled before starting the protocol heads.

*Cf.* #5515.
and-rewsmith pushed a commit to and-rewsmith/iotedge that referenced this pull request Oct 28, 2021
…tion (Azure#5515)

Currently, EdgeHub 1.1 can start without a valid configuration. This PR backports logic introduced in later releases to check that a configuration was pulled successfully, and modifies the configuration pulling task to fail when appropriate.

Fixes Azure#5398.
and-rewsmith added a commit to and-rewsmith/iotedge that referenced this pull request Oct 28, 2021
onalante-msft added a commit to onalante-msft/iotedge that referenced this pull request Oct 29, 2021
kodiakhq bot pushed a commit that referenced this pull request Oct 29, 2021
There is still an interdependency between the configuration fetch task and the protocol heads in the nested case. The pertinent PR is #5515.

## Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

### General Guidelines and Best Practices
- [x] I have read the [contribution guidelines](https://github.com/azure/iotedge#contributing).
- [x] Title of the pull request is clear and informative.
- [x] Description of the pull request includes a concise summary of the enhancement or bug fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

edgeHub race condition on startup - modules cannot send messages for 5 minutes after device deployment
3 participants