[CentOS] Solved: NFSroot over wifi in CentOS 7 - graceful shutdown problem

Thu Aug 13 07:33:37 UTC 2020
Dmitry E. Mikhailov <d.mikhailov at infocommunications.ru>

On 8/3/20 6:50 PM, Simon Matter via CentOS wrote:
>> Hi,
>>
>> I've got a task to have a small number of laptops netboot Linux over
>> WiFi. The kernel is loaded off the USB stick of cource, it's off topic
>> for now.
>>
>> The WPA-supplicant daemon is started early by dracut off initrd. It
>> works. Mostly.
>>
>> The problem is that upon shutdown systemd terminates all the processes
>> FIRST and unmounts filesystems NEXT.
>>
>> Guess what? Upon termination, wpa-supplicant brings the wireless
>> interface down and the system hangs being unable to unmount now-defunct
>> NFSroot.
> Short answer:
> 
> Looks like this should be fixed in systemd or its configuration.
> 
> Long answer is the one I already gave you on centos-devel. I post it here
> because someone may have deeper knowledge of what exactly goes on:
> 
> What I'm wondering here is, do you see the hangs because of wpa_supplicant
> was terminated and therefore also the wireless interface is down, or do
> you see the hangs because networking is already completely down.
It's because of wpa_supplicant. When I run the same config over wired 
network, it shuts down gracefully.

A dirty solution I found is to kill (-9) wpa_supplicant daemon right 
before shutdown. WiFi keeps running for a second it requires to do a 
graceful NFS unmount.

Best regards,
	Dmitry Mikhailov