Skip to content

Commit

Permalink
grub: T6165: increase service TimeoutSec from 5 -> 60
Browse files Browse the repository at this point in the history
The PCEngines APU2 systems with mSATA disks tend to be very slow. This results
in a service startup error:

$ systemctl status vyos-grub-update
× vyos-grub-update.service - Update GRUB loader configuration structure
     Loaded: loaded (/lib/systemd/system/vyos-grub-update.service; enabled; preset: enabled)
     Active: failed (Result: timeout) since Sun 2024-03-24 08:48:10 UTC; 14min ago
   Main PID: 779 (code=killed, signal=TERM)
        CPU: 869ms

Mar 24 08:48:05 LR4.wue3 systemd[1]: Starting vyos-grub-update.service - Update GRUB loader configuration structure...
Mar 24 08:48:10 LR4.wue3 systemd[1]: vyos-grub-update.service: start operation timed out. Terminating.
Mar 24 08:48:10 LR4.wue3 systemd[1]: vyos-grub-update.service: Main process exited, code=killed, status=15/TERM
Mar 24 08:48:10 LR4.wue3 systemd[1]: vyos-grub-update.service: Failed with result 'timeout'.
Mar 24 08:48:10 LR4.wue3 systemd[1]: Failed to start vyos-grub-update.service - Update GRUB loader configuration structure.

Measunring on an APU2 system after boot and memory is "hot", it still needs
almost 17 seconds to complete the job

cpo@LR4.wue3:~$ time sudo /usr/libexec/vyos/system/grub_update.py
real    0m16.803s
user    0m0.018s
sys     0m0.028s

(cherry picked from commit 5a12645)
  • Loading branch information
c-po authored and mergify[bot] committed Mar 24, 2024
1 parent 3e41891 commit 875ac69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/systemd/vyos-grub-update.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Before=vyos-router.service
[Service]
Type=oneshot
ExecStart=/usr/libexec/vyos/system/grub_update.py
TimeoutSec=5
TimeoutSec=60
KillMode=process
StandardOutput=journal+console

[Install]
WantedBy=vyos-router.service
WantedBy=vyos-router.service

0 comments on commit 875ac69

Please sign in to comment.