Project

General

Profile

Tâche #8396

Distribution EOLE - Scénario #9446: Divers 2.4

Attente configuration réseau avec adresse IP fixe

Added by Joël Cuissinat almost 7 years ago. Updated over 6 years ago.

Status:
Ne sera pas résolu
Priority:
Normal
Assigned To:
Start date:
11/14/2014
Due date:
% Done:

0%

Estimated time:
3.00 h
Spent time:
Remaining (hours):
0.0

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...

Related issues

Related to eole-common - Evolution #7898: Réduire le timeout d'attente DHCP au boot Classée sans suite

History

#1 Updated by Klaas TJEBBES almost 7 years ago

  • Distribution changed from EOLE 2.3 to EOLE 2.4

#2 Updated by Daniel Dehennin almost 7 years ago

  • Description updated (diff)

#3 Updated by Daniel Dehennin almost 7 years ago

  • Due date set to 07/04/2014
  • Status changed from Nouveau to En attente d'informations
  • Start date set to 06/25/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 Updated by Daniel Dehennin almost 7 years ago

  • Subject changed from Attente DHCP au premier boot suivant l'Upgrade-Auto to Attente configuration réseau avec adresse IP fixe

#5 Updated by Daniel Dehennin almost 7 years ago

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 Updated by Daniel Dehennin almost 7 years ago

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 Updated by Daniel Dehennin almost 7 years ago

Aucun problème en supprimant l’alias eth0:0 de /etc/network/interfaces, l’alias eth1:0 ne pose pas de problème.

#8 Updated by Daniel Dehennin almost 7 years ago

Je ne reproduit pas le problème sur un eolebase avec le /etc/network/interface de l’amon problématique.

#9 Updated by Luc Bourdot over 6 years ago

  • Parent task set to #9379

#10 Updated by Joël Cuissinat over 6 years ago

  • Remaining (hours) set to 1.5

#11 Updated by Joël Cuissinat over 6 years ago

  • Status changed from En attente d'informations to Nouveau

#12 Updated by Joël Cuissinat over 6 years ago

  • Due date deleted (07/04/2014)
  • Start date deleted (06/25/2014)
  • Estimated time changed from 1.50 h to 3.00 h
  • Parent task changed from #9379 to #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 Updated by Daniel Dehennin over 6 years ago

  • Status changed from Nouveau to En cours
  • Start date set to 11/14/2014

#14 Updated by Daniel Dehennin over 6 years ago

  • Assigned To set to Daniel Dehennin

#15 Updated by Daniel Dehennin over 6 years ago

  • Status changed from En cours to Ne sera pas résolu
  • Remaining (hours) changed from 1.5 to 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.

Also available in: Atom PDF