openrc: retry initialisation if it fails#63
Conversation
The kernel module can take some time to be ready, and 1 second is often not long enough
|
This seems like it would function much better than my old solution: #46
Would be ideal but i haven't figured out a good way to do it yet either. Do you perhaps know a way to do that @luke-jr ? However looking at the suddenly increasing complexity of the temporary fix for this problem i feel myself sliding more towards the sentiment that Vaeth might have been correct when he stated:
I wouldn't want to run into this bug a third time twenty years down the line when it takes 11 seconds for zram to be ready since the module loading for zram seems to have gotten slower with newer kernel releases causing this issue to reappear. |
|
Even without modprobe support, there's still a potential race. The possiblity it takes more than 10 seconds is why I made it configurable |
|
After some more testing Reproduces the issue today as opposed to the 2025 behavior where it didn't. Meaning it no longer matters if the module has already finished loading. So specifically creating the devices and then trying to use them before they are ready is the issue for: #62 So this pull request is the best fix available until a good way to check and then wait for when the device is ready is found. Though to be clear i have not actually tested your code yet. |
The kernel module can take some time to be ready, and 1 second is often not long enough
Probably fixes #62