Don't send email on authorized system reboot
Lenovo TS140, 16G memory, two mirrored drives (8TB and 6TB). System has been running FN releases for two plus years. 11.1 beta installed three days ago.
Click Reboot in GUI left panel. Click Reboot in pop-up warning. System reboots, but sends email:
Subject: Unauthorized system reboot
Body: System booted at Sun Oct 29 17:39:15 2017 was not shut down properly.
Attached debug files taken before and after reboot.
#5 Updated by Vladimir Vinogradenko about 1 year ago
- Status changed from Unscreened to 15
- Assignee changed from Vladimir Vinogradenko to William Grzybowski
After we stop
/var/run/devd.seqpacket.pipe is being kept. Because no one is on the writing side, https://github.com/freenas/freenas/blob/master/src/middlewared/middlewared/plugins/device.py#L80 returns None immediately and
devd_listen restarts immediately leaving asyncio no chance to execute other tasks. So, after
devd stops, middleware hangs completely — it does not process incoming requests and also has no opportunity to terminate properly.
I think we can just add
await asyncio.sleep(1) before
break, or it is not there for reason?
#6 Updated by William Grzybowski about 1 year ago
- Assignee changed from William Grzybowski to Vladimir Vinogradenko
Isso no reason to not do that but I am unsure of the problem. Shouldn't the "await read" and/or "await asyncio.open_unix_connection" give a chance for that to happen?
I am think the real problem here is that its looping non-stop because line = b'' and we should really change from "if line is None:" to "if line == b'':" or "if not line:" ?