Skip to content

Commit

Permalink
Merge branch 'master' into openstack-os-build
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorLowther committed Mar 19, 2012
2 parents 69e302e + f156de8 commit e26209b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion extra/install-chef.sh
Expand Up @@ -75,7 +75,11 @@ knifeloop() {
}

check_machine_role() {
knife node show "$FQDN" |grep -q "crowbar-${FQDN//./_}" && return 0
local count
for ((count=0; count <= 5; count++)); do
grep -q "crowbar-${FQDN//./_}" < <(knife node show "$FQDN" ) && return 0
sleep 10
done
die "Node machine-specific role got lost. Deploy failed."
}

Expand Down Expand Up @@ -361,6 +365,7 @@ do
COUNT=$(($COUNT + 1))
done
sleep 30 # This is lame - the queue can be empty, but still processing and mess up future operations.
check_machine_role

# transition though all the states to ready. Make sure that
# Chef has completly finished with transition before proceeding
Expand Down
3 changes: 2 additions & 1 deletion redhat-common/build_lib.sh
Expand Up @@ -40,6 +40,7 @@ make_repo_file() {
# $1 = name of repo
# $2 = Priority
# $3 = URL
[[ -f "$CHROOT/etc/yum.repos.d/repo-$1.repo" ]] && return
local repo=$(mktemp "/tmp/repo-$1-XXXX.repo")
cat >"$repo" <<EOF
[$1]
Expand All @@ -51,7 +52,7 @@ EOF
if [[ $RPM_PRIORITIES ]]; then
echo "priority=$2" >>"$repo"
fi
sudo cp "$repo" "$CHROOT/etc/yum.repos.d/"
sudo cp "$repo" "$CHROOT/etc/yum.repos.d/repo-$1.repo"
rm "$repo"
}

Expand Down

0 comments on commit e26209b

Please sign in to comment.