From 07d10147b3a803241b2e16c9cdbe9db8ba91131f Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 16 Jun 2015 16:17:31 -0500 Subject: [PATCH] Move interface wait time to netconfig task For a workaround for bug 1458625, a 32 second sleep was added to the url_available function that is run as part of the connectivity_tests task that is run after netconfig. This wait should be part of the netconfig task where the delay is needed when bringing up a new bridge in ubuntu. This will help ensure that the interfaces are ready after the netconfig task if the url_available task is removed or tasks are run in a different order. Change-Id: Ie715d6bf1622d33dd10b15c5bea74e05f1bba858 Related-Bug: 1458625 Closes-Bug: 1458954 --- .../lib/puppet/parser/functions/url_available.rb | 4 ---- .../puppet/osnailyfacter/modular/netconfig/netconfig.pp | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/url_available.rb b/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/url_available.rb index 80e092d118..4185dd7260 100644 --- a/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/url_available.rb +++ b/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/url_available.rb @@ -93,10 +93,6 @@ function. Must be of type String or Hash." end end - #Add sleep before checking for repos - #as Ubuntu waits 32 seconds for the - #bridge to become ready - sleep 32 # if passed an array, iterate through the array an check each element if url.instance_of? Array url.each do |u| diff --git a/deployment/puppet/osnailyfacter/modular/netconfig/netconfig.pp b/deployment/puppet/osnailyfacter/modular/netconfig/netconfig.pp index 3db7a8129a..298a4d17c2 100644 --- a/deployment/puppet/osnailyfacter/modular/netconfig/netconfig.pp +++ b/deployment/puppet/osnailyfacter/modular/netconfig/netconfig.pp @@ -68,3 +68,12 @@ if !defined(Service['irqbalance']) { require => Package['irqbalance'], } } + +# We need to wait at least 30 seconds for the bridges and other interfaces to +# come up after being created. This should allow for all interfaces to be up +# and ready for traffic before proceeding with further deploy steps. LP#1458954 +exec { 'wait-for-interfaces': + path => '/usr/bin:/bin', + command => 'sleep 32', + require => Class['l23network'], +}