From: Thierry Parmentelat Date: Sat, 11 Apr 2015 12:22:21 +0000 (+0200) Subject: lbuild-nightly.sh does not include build.common X-Git-Tag: 5.3.9~51 X-Git-Url: http://git.onelab.eu/?p=build.git;a=commitdiff_plain;h=f2f9c7a7c7acce2767aa68181b38c95320b87abe lbuild-nightly.sh does not include build.common --- diff --git a/build.common b/build.common index fe74e127..073e597e 100644 --- a/build.common +++ b/build.common @@ -751,15 +751,3 @@ function yumconf_exclude () { $yumexclude_line" $repo } -######################################## -# workaround for broken lxc-enter-namespace -# 1st version was relying on virsh net-dhcp-leases -# however this was too fragile, would not work for fedora14 containers -function guest_ipv4() { - lxc=$1; shift - - mac=$(virsh -c lxc:/// domiflist $lxc | egrep 'network|bridge' | awk '{print $5;}') - # sanity check - [ -z "$mac" ] && return 0 - arp -en | grep "$mac" | awk '{print $1;}' -} diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 4f6a9642..8a303f9f 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -710,6 +710,20 @@ PROFILE EOF } +######################################## +# workaround for broken lxc-enter-namespace +# 1st version was relying on virsh net-dhcp-leases +# however this was too fragile, would not work for fedora14 containers +# WARNING: this code is duplicated in lbuild-nightly.sh +function guest_ipv4() { + lxc=$1; shift + + mac=$(virsh -c lxc:/// domiflist $lxc | egrep 'network|bridge' | awk '{print $5;}') + # sanity check + [ -z "$mac" ] && return 0 + arp -en | grep "$mac" | awk '{print $1;}' +} + function wait_for_ssh () { set -x set -e diff --git a/lbuild-nightly.sh b/lbuild-nightly.sh index 1eb39c8b..fd7809a5 100755 --- a/lbuild-nightly.sh +++ b/lbuild-nightly.sh @@ -52,6 +52,20 @@ function logfile () { echo /vservers/$slice.log.txt } +######################################## +# workaround for broken lxc-enter-namespace +# 1st version was relying on virsh net-dhcp-leases +# however this was too fragile, would not work for fedora14 containers +# WARNING: this code is duplicated in lbuild-initvm.sh +function guest_ipv4() { + lxc=$1; shift + + mac=$(virsh -c lxc:/// domiflist $lxc | egrep 'network|bridge' | awk '{print $5;}') + # sanity check + [ -z "$mac" ] && return 0 + arp -en | grep "$mac" | awk '{print $1;}' +} + # wrap a quick summary of suspicious stuff # this is to focus on installation that go wrong # use with care, a *lot* of other things can go bad as well