-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: restart tedge-agent on tedge connect #3347
base: main
Are you sure you want to change the base?
feat: restart tedge-agent on tedge connect #3347
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files📢 Thoughts on this report? Let us know! |
Robot Results
Failed Tests
|
Looks like we have a system test which covers the opposite case (introduced in 415ffaa, PR #2505). Investigating the PR where it was introduced and compare the two conflicting requirements. Update The PR introduced the following behaviour:
In my view, point 2 is partially incorrect. Whilst the cloud specific logic has moved out of the tedge-agent and into the mappers, the tedge-agent's configuration is still coupled to the tedge.toml configuration and there is no indication to the user when the tedge-agent needs to be restarted or even how to restart the tedge-agent. Ideally it would be great if the tedge-agent could determine if it needs to be restarted or not based on the configuration changes, (or dynamically reload the configuration if changes are detected)...this would eliminate the need for this PR. @didier-wenzek @jarhodes314 Do you think dynamically reloading the configuration used by the tedge-agent would be feasible here? |
Why not but this will be tedious. The issue is that the impact of a config change is deeply hidden in numerous independent components. |
From what I understood, the primary intent of the PR #2505 was just to prevent the agent from being stopped on a disconnect (which is even more relevant now since profiled connections are possible). Since this PR doesn't change that aspect, it is fine from that POV. My only concern about restart on |
I don't think it will be an issue, as the |
Proposed changes
Restart the tedge-agent service (instead of just starting it) when calling
tedge connect <cloud>
to ensure it matches any settings that may have changed (e.g. mqtt.client.port) since it was last started.Types of changes
Paste Link to the issue
#3345
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments