manifest-tool command not found
manifest-tool
command not found when building multiarch images.
Symptoms
The multiarch image build fails as indicated in the following error message:
TASK [icp-registry-image-push : Building multiarch images] *****************************************
FAILED - RETRYING: Building multiarch images (3 retries left).
FAILED - RETRYING: Building multiarch images (2 retries left).
FAILED - RETRYING: Building multiarch images (1 retries left).
fatal: [9.37.136.40 -> 9.37.136.40]: FAILED! => changed=true
attempts: 3
cmd: |-
export NO_PROXY=spectrumdiscover:8500
rc=0
for image in $(cat /tmp/image-registry/image-list.txt | sort -u); do
manifest-tool push from-args --platforms linux/amd64,linux/ppc64le,linux/s390x --template spectrumdiscover:8500/ibmcom/${image//:/-ARCH:} --target spectrumdiscover:8500/ibmcom/$image --ignore-missing
if [[ $? -ne 0 ]] && [[ ! "$image" =~ (icp-helm-api|icp-helm-rudder|icp-cert-gen) ]]; then
echo "Build multiarch image failed for $image"
rc=1
fi
done
exit $rc
delta: '0:00:00.082852'
end: '2018-09-11 13:12:24.034750'
msg: non-zero return code
rc: 1
start: '2018-09-11 13:12:23.951898'
stderr: |-
/bin/bash: line 3: manifest-tool: command not found
/bin/bash: line 3: manifest-tool: command not found
/bin/bash: line 3: manifest-tool: command not found
Causes
manifest-tool
defaults to system path, /usr/local/bin
. However, /usr/local/bin
is not in the system environment PATH. For example:
# env | grep PATH
PATH=/sbin:/bin:/usr/sbin:/usr/bin
Resolving the problem
- In the first master node, copy
manifest-tool
from path,/usr/bin/manifest-tool
to path,/usr/local/bin/manifest-tool
. - Reinstall the whole ICP cluster.