Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14199 closed defect (fixed)

startup too fast, or interface-bring up too slow for daemons

Reported by: bittorf@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: Cc:

Description

since converting some init-jobs to procd-style
with r38023, something with the timing has changed.

e.g. the init-script of OLSR tries to early
adding the interfaces and refuses to add interface
which are not up yet. (they cannot be validated
by the rc.common-function network_get_device() in
line 564 of olsr-init-script)

this is the output of my custom-log in olsrd-init:

up: 21.83 6.14 message: interface wlan not up, retry
up: 21.85 6.14 message: interface wlan not up, retry
up: 21.88 6.14 message: interface wlan not up, retry
up: 21.90 6.14 message: interface wlan not up, retry
up: 21.92 6.14 message: interface wlan not up, retry
up: 21.94 6.14 message: interface wlan not up, retry
up: 21.96 6.14 message: interface wlan not up, retry
up: 21.99 6.14 message: interface wlan not up, retry
up: 22.01 6.14 message: interface wlan not up, retry
up: 22.03 6.14 message: interface wlan not up, retry
up: 22.05 6.14 message: interface wlan not up, retry
up: 22.08 6.14 message: interface wlan not up, retry
up: 22.10 6.14 message: interface wlan not up, retry
up: 22.12 6.14 message: interface wlan not up, retry
up: 22.15 6.14 message: interface wlan not up, retry
up: 22.20 6.14 message: interface wlan not up, retry
up: 22.25 6.14 message: interface wlan not up, retry
up: 22.29 6.14 message: interface wlan not up, retry
up: 22.35 6.14 message: interface wlan not up, retry
up: 22.43 6.14 message: interface wlan not up, retry
up: 22.56 6.14 message: interface wlan not up, retry
up: 22.66 6.14 message: interface wlan not up, retry
up: 22.76 6.14 message: interface wlan not up, retry
up: 22.93 6.14 message: interface wlan not up, retry
up: 23.05 6.14 message: interface wlan not up, retry
up: 23.16 6.14 message: interface wlan not up, retry
up: 23.27 6.14 message: interface wlan not up, retry
up: 23.34 6.14 message: interface wlan not up, retry
up: 23.41 6.14 message: interface wlan not up, retry
up: 23.47 6.14 message: interface wlan not up, retry
up: 24.07 6.14 message: interface wlanRADIO1 not up, retry
up: 24.12 6.14 message: interface wlanRADIO1 not up, retry
up: 24.17 6.14 message: interface wlanRADIO1 not up, retry
up: 24.21 6.14 message: interface wlanRADIO1 not up, retry
up: 24.27 6.14 message: interface wlanRADIO1 not up, retry
up: 24.32 6.14 message: interface wlanRADIO1 not up, retry
up: 24.37 6.14 message: interface wlanRADIO1 not up, retry
up: 24.42 6.14 message: interface wlanRADIO1 not up, retry
up: 24.47 6.14 message: interface wlanRADIO1 not up, retry
up: 24.52 6.14 message: interface wlanRADIO1 not up, retry
up: 24.94 6.14 message: wlan+wlanRADIO1 ready, olsr-startup ok

Attachments (0)

Change History (10)

comment:1 Changed 4 years ago by jow

Procd simply exposes the underlying problem of such naively written init scripts. The only solutions to this particular problem are either:
1) have on olsr facility to add interfaces at runtime
2) regenerate config and restart olsrd from hotplug whenever a covered iface comes up

comment:2 Changed 4 years ago by Henning

OLSRd should allow to add an interface which is offline, because it tracks the interface status anyways if it gets up/down.

As long as the interface already exists (up/down/whatever) it should be okay. We even have a configuration setting to tell OLSRd if it should exit during startup if it has no interfaces which are up or if it should continue.

comment:3 follow-up: Changed 4 years ago by jow

The problem is not related to olsr but solely confined to the openwrt init script for olsrd

comment:4 in reply to: ↑ 3 Changed 4 years ago by Henning

Replying to jow:

The problem is not related to olsr but solely confined to the openwrt init script for olsrd

Ahh sorry, misunderstood your comment.

comment:5 Changed 4 years ago by bittorf@…

i will fix the init-script and report.

comment:6 Changed 4 years ago by anonymous

if i want to use from /lib/functions/network.sh

network_get_device IFNAME "wlan2"

i always get no result during bootup, if i add "sleep 30", then it works 8-)

comment:7 Changed 4 years ago by jow

And this is exactly my point, you can't expect network to be configured at init time and adding arbritary sleep delays is no solution either. Olsrd config generation must be triggered from hotplug.

This would also properly support usb based wireless or ethernet dongles.

comment:8 Changed 4 years ago by bittorf@…

please close ticket, i have commited a fix:

https://github.com/openwrt-routing/packages/commit/6bdbd50aaf0344c1c17deabb5393a8f8f622af4f
https://github.com/openwrt-routing/packages/commit/8ffcb5e3e5c77e9af7e2bc410e18132c8d6c611c

comment:9 Changed 4 years ago by blogic

  • Resolution set to fixed
  • Status changed from new to closed

comment:10 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.