[CentOS] Bypassing 'A stop job is running' when rebooting CentOS 7

Wed May 22 14:40:08 UTC 2019
James Pearson <james-p at moving-picture.com>

mark wrote:
> James Pearson wrote:
>> James Pearson wrote:
>>> I'm currently trying to reboot a CentOS 7.5 workstation (to complete an
>>>   upgrade to 7.6), but it is 'stuck' while shutting down with 'A stop
>>> job is running for ...' - the counter initially gave a limit of '1min
>>> 30s' -
>>> but each time it reaches that limit, it just adds on ~90 seconds to the
>>> limit ...
>>> Currently the limit is '25min 33s'
>>> I'm in no hurry to have this workstation operational, but I guess at
>>> some point I will have to power cycle it ...
>>> Does anyone know how to bypass this? - or at least stop it increasing
>>> the limit each time it is reached?
>>> It does seems rather pointless to keep increasing the limit like this
>>> ...
>> It _finally_ gave up at 30 mins and rebooted
> One question: did it have a mounted nfs filesystem?

All our boxes have NFS mounted files systems - and usually this isn't a 
problem - reboots work without an issue

In this case, it appeared to be 'stuck' on a local file bind mounted 
over a file on an NFS mounted file system

But that isn't really the point - I don't really want to have to wait a 
maximum of 30 minutes for the reboot to give up waiting for 'whatever'

Poking about a bit, I see that /usr/lib/systemd/system/reboot.target has 
the line:


(there is a similar JobTimeoutSec=30min in poweroff.target)

I'm guessing I could create something like 
/etc/systemd/system/reboot.target.d/override.conf containing something like:


Now I need to see if I can reproduce the issue and see if this setting 
works ...

James Pearson