Skip to content

Set restart policy of the anthias-wifi-connect service to on-failure.#1797

Open
nicomiguelino wants to merge 1 commit intoScreenly:masterfrom
nicomiguelino:fix-1796
Open

Set restart policy of the anthias-wifi-connect service to on-failure.#1797
nicomiguelino wants to merge 1 commit intoScreenly:masterfrom
nicomiguelino:fix-1796

Conversation

@nicomiguelino
Copy link
Copy Markdown
Contributor

@nicomiguelino nicomiguelino requested a review from a team as a code owner April 13, 2023 20:05
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@nicomiguelino
Copy link
Copy Markdown
Contributor Author

nicomiguelino commented Apr 13, 2023

@vpetersson, here are the statuses of the services after deploying the changes to my own fleet.

image

I checked the anthias-wifi-connect logs, and it seems that the service is not restarting every boot.
The only time that it was started is when the changes were deployed (for the first time).

Would it be better to start the service every device boot?

@vpetersson
Copy link
Copy Markdown
Contributor

Would it be better to start the service every device boot?

Yes, if you're able to prevent a restart loop.

@nicomiguelino
Copy link
Copy Markdown
Contributor Author

Okay, thanks. One drawback of using on-failure is that the service will not start again if it exits with a zero (successful).

It is possible to start anthias-wifi-connect service from the viewer service via the Supervisor API.

@vpetersson
Copy link
Copy Markdown
Contributor

Okay, thanks. One drawback of using on-failure is that the service will not start again if it exits with a zero (successful).

That's the desired behavior.

It is possible to start anthias-wifi-connect service from the viewer service via the Supervisor API.

That's a good point. However, I'm curious what the behavior is on Raspbian OS. Does it start once per boot, or only once in total?

@nicomiguelino
Copy link
Copy Markdown
Contributor Author

The behavior in RPi OS is different from that in balenaOS.

In RPi OS, if the restart policy is set to default (no), it will never restart again, unless we'll explicitly start it. I've created a systemd service to start the anthias-wifi-connect service during startup.

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.

Set the restart policy of the anthias-wifi-connect service to on-failure for devices running balenaOS.

2 participants