alfred: Fix state handling for startup and restart/reload of alfred#643
Merged
Conversation
Alfred can be stopped during a (re)start or reload when: * disabled = 1 * batman-adv interface is missing * MAC based EUI64 IPv6 link-local address not set It is assumed that procd detects that the procd instance definition disappeared and the currently running instance must be stopped. But all these checks were triggering an "exit" which then stopped the alfred init script and the wrapper from /lib/functions/procd.sh. And thus procd was never informed about the instances which should be changed. The correct handling is to return the result of the function instead of directly killing the init scripts. Fixes: 45db0e6 ("alfred: use procd") Signed-off-by: Sven Eckelmann <sven@narfation.org>
The alfred server always needs interfaces to operate on. But these interfaces might not exist at the moment when the daemon process is started. This situation stopped the startup process after the init scripts waited for a longer period of polling the system state. But alfred is able to deal with interfaces which disappeared at runtime but existed at startup. To force a similar behavior for the alfred startup, the parameter "--force" or "-f" is used. The extra polling code is therefore no longer needed in the init scripts. Signed-off-by: Sven Eckelmann <sven@narfation.org>
Member
|
@simonwunderlich This is now missing in openwrt-21.02 branch, as this has been created slightly before your merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@simonwunderlich
Alfred can be stopped during a (re)start or reload when:
It is assumed that procd detects that the procd instance definition disappeared and the currently running instance must be stopped. But all these checks were triggering an "exit" which then stopped the alfred init script and the wrapper from /lib/functions/procd.sh. And thus procd was never informed about the instances which should be changed.
The correct handling is to return the result of the function instead of directly killing the init scripts.
Fixes: 45db0e6 ("alfred: use procd")
The alfred server always needs interfaces to operate on. But these interfaces might not exist at the moment when the daemon process is started. This situation stopped the startup process after the init scripts waited for a longer period of polling the system state.
But alfred is able to deal with interfaces which disappeared at runtime but existed at startup. To force a similar behavior for the alfred startup, the parameter "--force" or "-f" is used. The extra polling code is therefore no longer needed in the init scripts.