Repository navigation
Conversation
Yeah, technically this would work, but the user experience is not nice:
Those message are harmless, but we don't emit error (or notice messages) as a principle unless there is a real problem. So your solution unfortunately is not going to work, unless we somehow redesign the system to avoid those messages. But this doesn't seem like the right approach. The whole thing is a bit of a hack, and we shouldn't add scaffolding for it. A better option might be an asymmetrical Before/After option, which would only apply during shutdown (stop). There have been various times where something like this would have been useful, but we always managed to do with existing dependencies. Maybe it's time to revisit this. |
|
On 11/26/2015 08:37 PM, Zbigniew Jędrzejewski-Szmek wrote:
Agreed. However I think this is better than the current situation: I would
Yes it might be the right thing to do. However until this is done, I Thanks. |
…g JobTimeoutSec There was no need for such conversion and it was actually wrong since any device timeout less than a second was converted into 0 which means waits forever.
…shutdown For mount units generated by the fstab-generator, the ordering dep "Before=local-fs.target' was conditionnaly added depending on some options such as 'nofail' or 'noauto'. I don't see any reason to not add it when 'noauto' is passed. For the 'nofail' case, this allowed the local-fs.target unit to become active without the need to wait for the mount unit to timeout when the associated device node was missing. Removing this ordering dep had an unwanted side effect however: during shutdown, the affected mount units were not ordered against local-fs.target anymore and could be stopped at any times, specially before service units. This patch unconditionnaly set "Before=local-fs.target" and order all mount units to be stopped *after* local-fs.target is. The side effect is that the boot process will wait for the timeout to expire for missing disks even if the corresponding mount units have 'nofail' set. A following patch will restore the correct behaviour regarding 'nofail' by setting the smallest possible timeout value for the device units.
When 'nofail' is set, we shouldn't wait for the device timeout to expire. This was the case before but the way it was done was broken. This patch restores this behaviour by setting the smallest timeout value (1us) when 'nofail' is set. This also applies to swap units since they use the same path to setup device timeout.
3b9ddce to
4e90ab1
Compare
|
@keszybz I've updated the branch according to your feedback, Feel free to drop the workaround. |
|
Sorry, if I wasn't clear: this approach cannot be merged (apart from the first commit, which I now merged). I left the pull request open to discuss a better solution. |
|
On 11/27/2015 03:52 AM, Zbigniew Jędrzejewski-Szmek wrote:
As I wrote, the current behaviour is wrong and is worse: you'll also get IMHO, getting a harmless warning is still better...
You might have missed the new patch I added during my last update: "fstab-gen: don't convert device timeout into seconds when initializing As I wrote in my one of my previous comments, converting device timeout PS: I'm not sure you got notifications for my replies to your commit Thanks. |
|
Can one of the admins verify this patch? |
|
This PR is almsot year old and thus stale, and got rejected in its present form. Hence I am closing it now. If this is still relevant, please fix and rebase to current master, and either reopen this PR or open a new one. Thank you for understanding! |
This patchset to make sure we always stop mount/swap units (generated by the fstab-generator) after all service units during shutdown specially when 'nofail' or 'noauto' are used.