Ubuntu 14.04: Slow network boot prevents glusterfs volumes to mount

Written by - 1 comments

Published on - Listed in Linux


On a physical server with Ubuntu 14.04 LTS installed and a rather complicated network setup (including vlan tags and virtual bridges) I experienced very slow booting as soon as the boot process was about to start the network devices.

Unfortunately this slow starting up of the network devices prevented to mount the GlusterFS volumes automatically, as they require the network to mount the volumes. Here's the console log:

[...]
 * Starting configure network device security                            [ OK ]
 * Starting configure network device                                     [ OK ]
 * Starting configure network device security                            [ OK ]
 * Starting configure network device                                     [ OK ]
 * Starting configure network device security                            [ OK ]
 * Starting configure network device                                     [ OK ]
 * Starting Mount network filesystems                                    [ OK ]
 * Stopping Mount network filesystems                                    [ OK ]
 * Starting configure virtual network devices                            [ OK ]
Waiting for network configuration...
 * Starting Waiting for state                                            [fail]
 * Stopping Waiting for state                                            [ OK ]
 * Starting Block the mounting event for glusterfs filesystems until the network interfaces are running                                                   [fail]
 * Stopping Mount filesystems on boot
Waiting up to 60 more seconds for network configuration...
[...]

I was looking for the reason why the system waits several times "Waiting ... for network configuration".
Through this forum post I found that these outputs come from /etc/init/failsafe.conf:

[...]
    # 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..." || :
[...]

What the hell? There's just a bunch of sleep and not doing anything (reminds me of the Autobahn working areas in Switzerland). So during 2 minutes the system is just sleeping, trying to wait for something, blocking the end of the booting process.

I commented/disabled the first "sleep 20" and set the other sleeps to 5 seconds each. The system now boots up much faster and even automatically mounts the glusterfs volume:

[...]
 * Starting configure network device security                            [ OK ]
 * Starting configure network device                                     [ OK ]
 * Starting configure network device security                            [ OK ]
 * Starting configure network device                                     [ OK ]
 * Starting configure network device security                            [ OK ]
 * Starting configure network device                                     [ OK ]
Waiting up to 5 more seconds for network configuration...
 * Starting Mount network filesystems                                    [ OK ]
 * Stopping Mount network filesystems                                    [ OK ]
 * Starting configure virtual network devices                            [ OK ]
Booting system without full network configuration...
[...]

mount | grep fuse.glusterfs
localhost:/vol1 on /mnt type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)

I will probably comment/disable the "$PLYMOUTH message" lines, too. The network configuration is just fine after a few seconds.


Add a comment

Show form to leave a comment

Comments (newest first)

Keith from Zambia wrote on Mar 20th, 2015:

Great post, after days of frustration. Thanks.


RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Observability   Office   OpenSearch   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder