grub_proc.communicate timeout is too short at 2 seconds
Description
Problem/Justification
None
Impact
None
SmartDraw Connector
Katalon Manual Tests (BETA)
Activity
Show:
Vincent Royer April 7, 2020 at 12:19 AM
so any way to run my vm without waiting for U2?

Waqar Ahmed April 6, 2020 at 11:43 PM
the fix would be available in U2 ; )
Vincent Royer April 6, 2020 at 11:30 PM
This is odd, the fix seems to not be working for one of my vms.
11.3U1

Bug Clerk March 10, 2020 at 10:17 AM

stephen gelardi March 9, 2020 at 10:11 PM
you will see alot of entries in middlewared.log up until I fixed the issue.
E.g.
middlewared.log:[2020/03/07 22:50:59] (DEBUG) middlewared.start_on_boot():1214 - Failed to start VM RancherOS: [EFAULT] grub-bhyve timed out, please check your grub config.
Complete
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee

Reporter

Components
Fix versions
Affects versions
Priority
More fields
Time tracking
More fields
Time trackingKatalon Platform
Linked Test Cases, Katalon Defect Results, Katalon Studio Test Results
Katalon Platform
Linked Test Cases, Katalon Defect Results, Katalon Studio Test Results
Created March 7, 2020 at 10:08 PM
Updated July 1, 2022 at 4:50 PM
Resolved March 10, 2020 at 10:17 AM
Some VMs I have failed to start on initial boot up of the server with:
"grub-bhyve timed out, please check your grub config."
Even though the timeout in the grub file for the VM is set to 0
If the VM is manually started after FreeNAS is up, there is no problem booting the system.
It appears that the 2s second time out is to low and should be a bit higher.
The fix is to change line 280 of:
`/usr/local/lib/python3.7/site-packages/middlewared/plugins/vm.py`
from 2 seconds:
```
```python
try:
await asyncio.wait_for(self.grub_proc.communicate(), 2)
```
to 5 seconds:
```python
try:
await asyncio.wait_for(self.grub_proc.communicate(), 5)
```
Could we get this minor change into the next update?