wg interfaces have no up/down op status, but the interface script needs to call set_state(self, state) to execute ip link up wg.. which is an administrative link up, not an operational.
320 while self.get_state() != state: 321 cnt += 1 322 if cnt == 50: 323 print('Interface {} could not be brought up in time ...'.format(self._ifname)) 324 break 325 326 # sleep 250ms 327 sleep(0.250)
Causes the delay, since the wg interface will allways have state unknown.
(up) wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
vs
(down) wg0: <POINTOPOINT,NOARP> mtu 1420 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
vyos@wg02# commit
[ interfaces wireguard wg0 ]
Interface wg0 could not be brought up in time ...