Tâche #8396
Distribution EOLE - Scénario #9446: Divers 2.4
Attente configuration réseau avec adresse IP fixe
Description
Le serveur 2.4 a beau être en IP fixe et sur le réseau EOLE, on se tape les 2 minutes d'attente décrites dans #7898 !
Waiting for network configuration... Waiting up to 60 more seconds for network configuration...
Demandes liées
Historique
#1 Mis à jour par Klaas TJEBBES il y a presque 10 ans
- Distribution changé de EOLE 2.3 à EOLE 2.4
#2 Mis à jour par Daniel Dehennin il y a presque 10 ans
- Description mis à jour (diff)
#3 Mis à jour par Daniel Dehennin il y a presque 10 ans
- Echéance mis à 04/07/2014
- Statut changé de Nouveau à En attente d'informations
- Début mis à 25/06/2014
Je ne reproduit pas le problème sur un EOLE base, instancié ou non.
Est-il possible de décrire les étapes nécessaires à la reproduction de ce bug ?
#4 Mis à jour par Daniel Dehennin il y a presque 10 ans
- Sujet changé de Attente DHCP au premier boot suivant l'Upgrade-Auto à Attente configuration réseau avec adresse IP fixe
#5 Mis à jour par Daniel Dehennin il y a presque 10 ans
Le problème vient d’un signal non émit par le script if-up.d/upstart
:
#!/bin/sh MARK_DEV_PREFIX="/run/network/ifup." MARK_STATIC_NETWORK_EMITTED="/run/network/static-network-up-emitted" set -e # lo emission handled by /etc/init/network-interface.conf if [ "$IFACE" != lo ]; then initctl emit -n net-device-up \ "IFACE=$IFACE" \ "LOGICAL=$LOGICAL" \ "ADDRFAM=$ADDRFAM" \ "METHOD=$METHOD" fi get_auto_interfaces() { # write to stdout a list of interfaces configured as 'auto' in interfaces(5) local found="" # stderr redirected as it outputs things like: # Ignoring unknown interface eth0=eth0. found=$(ifquery --list --allow auto 2>/dev/null) || return set -- ${found} echo "$@" } all_interfaces_up() { # return true if all interfaces listed in /etc/network/interfaces as 'auto' # are up. if no interfaces are found there, then "all [given] were up" local prefix="$1" iface="" for iface in $(get_auto_interfaces); do # if cur interface does is not up, then all have not been brought up [ -f "${prefix}${iface}" ] || return 1 done return 0 } # touch our own "marker" indicating that this interface has been brought up. : > "${MARK_DEV_PREFIX}$IFACE" if all_interfaces_up "${MARK_DEV_PREFIX}" && mkdir "${MARK_STATIC_NETWORK_EMITTED}" 2>/dev/null; then initctl emit --no-wait static-network-up fi
Ce script envoi un signal qui est intercepté par /etc/init/failsafe.conf
, tant que le signal n’est pas envoyé, ce dernier bloque avec les messages indiqués :
# failsafe description "Failsafe Boot Delay" author "Clint Byrum <clint@ubuntu.com>" start on filesystem and net-device-up IFACE=lo stop on static-network-up or starting rc-sysinit emits failsafe-boot console output script # Determine if plymouth is available if [ -x /bin/plymouth ] && /bin/plymouth --ping ; then PLYMOUTH=/bin/plymouth else PLYMOUTH=":" fi # The point here is to wait for 2 minutes before forcibly booting # the system. Anything that is in an "or" condition with 'started # failsafe' in rc-sysinit deserves consideration for mentioning in # these messages. currently only static-network-up counts for that. sleep 20 # Plymouth errors should not stop the script because we *must* reach # the end of this script to avoid letting the system spin forever # waiting on it to start. $PLYMOUTH message --text="Waiting for network configuration..." || : sleep 40 $PLYMOUTH message --text="Waiting up to 60 more seconds for network configuration..." || : sleep 59 $PLYMOUTH message --text="Booting system without full network configuration..." || : # give user 1 second to see this message since plymouth will go # away as soon as failsafe starts. sleep 1 exec initctl emit --no-wait failsafe-boot end script post-start exec logger -t 'failsafe' -p daemon.warning "Failsafe of 120 seconds reached."
#6 Mis à jour par Daniel Dehennin il y a presque 10 ans
En ajoutant des logs on voit que l’alias sur eth0
n’est pas prise en compte par les ubunturies alors que tout est bien monté:
#!/bin/sh MARK_DEV_PREFIX="/run/network/ifup." MARK_STATIC_NETWORK_EMITTED="/run/network/static-network-up-emitted" set -e LOG_FILE="/tmp/upstart-net.log" PIPE="${LOG_FILE}.fifo" rm -f ${PIPE} mkfifo ${PIPE} tee -a <${PIPE} "${LOG_FILE}" & exec 1>&- exec 2>&- exec 1> ${PIPE} exec 2> ${PIPE} date +%Y-%m-%d-%H:%M:%S date +%Y-%m-%d-%H:%M:%S | sed -e 's,.,-,g' echo "IFACE=${IFACE}" echo # lo emission handled by /etc/init/network-interface.conf if [ "$IFACE" != lo ]; then initctl emit -n net-device-up \ "IFACE=$IFACE" \ "LOGICAL=$LOGICAL" \ "ADDRFAM=$ADDRFAM" \ "METHOD=$METHOD" fi get_auto_interfaces() { # write to stdout a list of interfaces configured as 'auto' in interfaces(5) local found="" # stderr redirected as it outputs things like: # Ignoring unknown interface eth0=eth0. found=$(ifquery --list --allow auto 2>/dev/null) || return set -- ${found} echo "$@" } all_interfaces_up() { # return true if all interfaces listed in /etc/network/interfaces as 'auto' # are up. if no interfaces are found there, then "all [given] were up" local prefix="$1" iface="" for iface in $(get_auto_interfaces); do # if cur interface does is not up, then all have not been brought up echo "Check for '${prefix}${iface}'" if [ -f "${prefix}${iface}" ] then echo "OK ${prefix}${iface}" else echo "NOK ${prefix}${iface}" fi [ -f "${prefix}${iface}" ] || return 1 done return 0 } # touch our own "marker" indicating that this interface has been brought up. : > "${MARK_DEV_PREFIX}$IFACE" if all_interfaces_up "${MARK_DEV_PREFIX}" && mkdir "${MARK_STATIC_NETWORK_EMITTED}" 2>/dev/null; then echo "All interfaces are up" initctl emit --no-wait static-network-up else echo "Not all interfaces are up:" ls -1tr ${MARK_DEV_PREFIX}* fi rm -f ${PIPE}
Pendant les messages Waiting for network
:
root@amon:~# ifconfig eth0 Link encap:Ethernet HWaddr 02:00:c0:a8:01:12 inet adr:192.168.0.2 Bcast:192.168.0.255 Masque:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Packets reçus:213 erreurs:0 :0 overruns:0 frame:0 TX packets:247 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 Octets reçus:25953 (25.9 KB) Octets transmis:32443 (32.4 KB) eth0:1 Link encap:Ethernet HWaddr 02:00:c0:a8:01:12 inet adr:192.168.1.2 Bcast:192.168.1.255 Masque:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth1 Link encap:Ethernet HWaddr 02:00:c0:a8:0a:01 inet adr:192.168.2.2 Bcast:192.168.2.255 Masque:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Packets reçus:2 erreurs:0 :0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 Octets reçus:493 (493.0 B) Octets transmis:0 (0.0 B) eth1:1 Link encap:Ethernet HWaddr 02:00:c0:a8:0a:01 inet adr:192.168.3.2 Bcast:192.168.3.255 Masque:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 lo Link encap:Boucle locale inet adr:127.0.0.1 Masque:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 Packets reçus:44 erreurs:0 :0 overruns:0 frame:0 TX packets:44 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 Octets reçus:3128 (3.1 KB) Octets transmis:3128 (3.1 KB)
Une fois le serveur complètement démarré :
2014-06-25-16:12:11 ------------------- IFACE=lo Check for '/run/network/ifup.lo' OK /run/network/ifup.lo Check for '/run/network/ifup.eth0' NOK /run/network/ifup.eth0 Not all interfaces are up: /run/network/ifup.lo 2014-06-25-16:12:12 ------------------- IFACE=eth1 2014-06-25-16:12:12 ------------------- IFACE=eth0 Check for '/run/network/ifup.lo' OK /run/network/ifup.lo Check for '/run/network/ifup.eth0' OK /run/network/ifup.eth0 Check for '/run/network/ifup.eth0:1' NOK /run/network/ifup.eth0:1 Not all interfaces are up: Check for '/run/network/ifup.lo' OK /run/network/ifup.lo Check for '/run/network/ifup.eth0' OK /run/network/ifup.eth0 Check for '/run/network/ifup.eth0:1' NOK /run/network/ifup.eth0:1 Not all interfaces are up: /run/network/ifup.lo /run/network/ifup.eth1 /run/network/ifup.eth0 /run/network/ifup.lo /run/network/ifup.eth1 /run/network/ifup.eth0 2014-06-25-16:12:12 ------------------- IFACE=eth1:1 Check for '/run/network/ifup.lo' OK /run/network/ifup.lo Check for '/run/network/ifup.eth0' OK /run/network/ifup.eth0 Check for '/run/network/ifup.eth0:1' NOK /run/network/ifup.eth0:1 Not all interfaces are up: /run/network/ifup.lo /run/network/ifup.eth1 /run/network/ifup.eth0 /run/network/ifup.eth1:1
#7 Mis à jour par Daniel Dehennin il y a presque 10 ans
Aucun problème en supprimant l’alias eth0:0
de /etc/network/interfaces
, l’alias eth1:0
ne pose pas de problème.
#8 Mis à jour par Daniel Dehennin il y a presque 10 ans
Je ne reproduit pas le problème sur un eolebase avec le /etc/network/interface
de l’amon problématique.
#9 Mis à jour par Luc Bourdot il y a plus de 9 ans
- Tâche parente mis à #9379
#10 Mis à jour par Joël Cuissinat il y a plus de 9 ans
- Restant à faire (heures) mis à 1.5
#11 Mis à jour par Joël Cuissinat il y a plus de 9 ans
- Statut changé de En attente d'informations à Nouveau
#12 Mis à jour par Joël Cuissinat il y a plus de 9 ans
- Echéance
04/07/2014supprimé - Début
25/06/2014supprimé - Temps estimé changé de 1.50 h à 3.00 h
- Tâche parente changé de #9379 à #9446
J'arrive à reproduire en prenant un Scribe 2.3 en IP fixe et en lançant Upgrade-Auto.
Ça le fait tant que le serveur "upgradé" n'est pas instancié.
#13 Mis à jour par Daniel Dehennin il y a plus de 9 ans
- Statut changé de Nouveau à En cours
- Début mis à 14/11/2014
#14 Mis à jour par Daniel Dehennin il y a plus de 9 ans
- Assigné à mis à Daniel Dehennin
#15 Mis à jour par Daniel Dehennin il y a plus de 9 ans
- Statut changé de En cours à Ne sera pas résolu
- Restant à faire (heures) changé de 1.5 à 0.0
Le problème ne se produit que lorsque le démarrage d’une interface échoue :
- L’interface est configurée en DHCP et qu’aucun serveur DHCP ne répond
- Le fichier de configuration
/etc/network/interfaces
n’est pas valide.
L’impacte étant minimal on ne fait rien.
Au besoin, on pourrait réduire le délai.