Ciò che è cambiato è che non vogliono più "rimbalzare" la rete. fermarsi e iniziare, funziona ancora. il riavvio non funziona più. Ho "risolto" questo "problema", cioè ho ripristinato il vecchio comportamento. Per tornare al comportamento precedente: prendi un file 13.10 /etc/init/networking.conf e sostituisci il file 14.04 con esso.
(modifica: chiarito che sostituisce quale)
Il processo è simile a questo:
(Just before this, I configured my /etc/network/interfaces for eth1 on a 192.168.117.x address)
"/etc/network/interfaces" 16L, 413C written
[email protected]:~# service networking restart
stop: Job failed while stopping
start: Job is already running: networking
[email protected]:~# echo "hmm, wth?"
hmm, wth?
[email protected]:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:d6:a8:19
inet addr:192.168.115.105 Bcast:192.168.115.255 Mask:255.255.255.0
inet6 addr: 2002:4077:9050:1234:a08c:29c1:ce9b:a57b/64 Scope:Global
inet6 addr: fe80::20c:29ff:fed6:a819/64 Scope:Link
inet6 addr: 2002:4077:9050:1234:20c:29ff:fed6:a819/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:646 errors:0 dropped:0 overruns:0 frame:0
TX packets:531 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:58748 (58.7 KB) TX bytes:75465 (75.4 KB)
(lo removed here)
[email protected]:~# cd /etc/init
[email protected]:/etc/init# diff networking.conf.1310 networking.conf.1404
13c13
< and (stopped udevtrigger or container)) or runlevel [2345]
---
> and (stopped udevtrigger or container)) or runlevel [2345] or stopped networking >RESULT=failed PROCESS=post-stop EXIT_STATUS=100
16a17,20
> if [ "$UPSTART_EVENTS" = "stopped" ] && [ "$UPSTART_JOB" = "networking" ] && [ "$EXIT_STATUS" = "100" ]; then
> exit 0
> fi
>
21a26,31
> if [ -z "$UPSTART_STOP_EVENTS" ]; then
> echo "Stopping or restarting the networking job is not supported."
> echo "Use ifdown & ifup to reconfigure desired interface."
> exit 100
> fi
[email protected]:/etc/init#
Fai lo stesso per /etc/init.d/networking script, che è ciò che il file /etc/init/networking.conf fa riferimento / chiama.
[email protected]:/etc/init# cp networking.conf.1310 networking.conf
[email protected]:/etc/init# cd ../init.d
[email protected]:/etc/init.d# diff networking.1404 networking.1310
15d14
< STATEDIR="$RUN_DIR/state"
21a21,27
> # Make sure that it's clear to the user that they shouldn't use this
> # script under upstart
> if init_is_upstart; then
> echo "ERROR: Calling a sysvinit script on a system using upstart isn't supported. Please use the 'service' command instead."
> exit 1
> fi
>
52,54d57
< if ! chown root:netdev "$RUN_DIR" ; then
< log_warning_msg "can't chown $RUN_DIR"
< fi
160,162d162
< if init_is_upstart; then
< exit 1
< fi
166c166
< state=$(ifquery --state)
---
> state=$(cat /run/network/ifstate)
[email protected]:/etc/init.d# cp networking.1310 networking
[email protected]:/etc/init.d# service networking restart
networking stop/waiting
networking start/running
[email protected]:/etc/init.d# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:d6:a8:19
inet addr:192.168.115.105 Bcast:192.168.115.255 Mask:255.255.255.0
inet6 addr: 2002:4077:9050:1234:a08c:29c1:ce9b:a57b/64 Scope:Global
inet6 addr: fe80::20c:29ff:fed6:a819/64 Scope:Link
inet6 addr: 2002:4077:9050:1234:20c:29ff:fed6:a819/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3398 errors:0 dropped:0 overruns:0 frame:0
TX packets:2545 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:318654 (318.6 KB) TX bytes:418804 (418.8 KB)
eth1 Link encap:Ethernet HWaddr 00:0c:29:d6:a8:23
inet addr:192.168.117.105 Bcast:192.168.117.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fed6:a823/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:98 errors:0 dropped:58 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20055 (20.0 KB) TX bytes:1226 (1.2 KB)
(lo removed)
[email protected]:/etc/init.d# echo "hah, it works! *8^)"
Hah, it works! *8^)
[email protected]:/etc/init.d#
(note: the steps where I scp'd the 1310 versions into the 1404 system are omitted for brevity).
Ovviamente c'è una ragione per cui hanno messo un'uscita difensiva lì dentro, ma non si preoccupano di produrre davvero molto bene ciò che sta succedendo.
Una voce entra in /var/log/upstart/networking.log quando provi, che assomiglia a:
Stopping or restarting the networking job is not supported.
Use ifdown & ifup to reconfigure desired interface.
Ma potrebbero davvero / dovrebbero avere un output come messaggio di dialogo quando si tenta di riavviare il servizio di rete. Ah bene. capito e anche un vecchio modo di aggirare.
EDIT: Ho trovato che questo causa un innesco non intenzionale dello script controllato da /etc/init/failsafe.conf che è indesiderabile in quanto causa un ritardo di timeout di 120 secondi in ogni avvio ... così come forse il mascheramento effettivo errori di configurazione / problemi di rete che l'aspetto di questo ritardo indicherebbe, ma è già visualizzato in ogni momento. (ad esempio, un cavo scollegato, che consentiva l'accesso a una condivisione di file di rete mappata in / etc / fstab, per esempio)
In ogni caso, capirò che cosa sta causando questo sempre il timeout, e postare una correzione quando la trovo.