vagrant tells the guest to run
https://omnitruck.chef.io/install.sh | bash ....
The install.sh tries to use wget (that's the preferred option)
# do_wget URL FILENAME
do_wget() {
echo "trying wget..."
wget -O "$2" "$1" 2>$tmp_dir/stderr
rc=$?
# check for 404
grep "ERROR 404" $tmp_dir/stderr 2>&1 >/dev/null
if test $? -eq 0; then
echo "ERROR 404"
http_404_error
fi
# check for bad return status or empty output
if test $rc -ne 0 || test ! -s "$2"; then
capture_tmp_stderr "wget"
return 1
fi
return 0
}
When the LANG variable is not set (which is the case for this debian box when the command is sent over ssh) wget seems to work but puts an error into the /tmp/install.xxx/stderr file which the omnitruck script spots and tells vagrant that chef_install failed.
This seems to be due to a ANSI -> UTF8 converstion done by wget. The download succeeds but the 404 in the log causes install.sh to fail and thus vagrant provisioning halts.
Seems like the install.sh script should use wget properly (wget returns 8 on a 404). The workaround was to tell vagrant to forward LANG from the local env
config.ssh.forward_env = ["LANG"]