image-builder icon indicating copy to clipboard operation
image-builder copied to clipboard

Ensure functions don't check for the correct version of binaries

Open jsturtevant opened this issue 5 years ago • 2 comments

Received an error during building the an image. The ensure-ansible checks for Ansible to be installed but doesn't check the minimum version like the ensure-goss.sh script does. The output had Right version of binary present so I didn't initially notice that I had an older version of Packer:

make build-azure-vhd-ubuntu-1804                     
hack/ensure-ansible.sh  
hack/ensure-packer.sh                                                                                                                    
hack/ensure-jq.sh                                                                                                                        
hack/ensure-azure-cli.sh                                                                                                                 
hack/ensure-goss.sh                                                                                                                      
Right version of binary present                                                                                                         
 ./image-builder/images/capi/packer/azure/scripts/init-vhd.sh && packer build -var-file="/image-builder/images/capi/packer/config/kubernetes.json"  -var-file="/image-builder/images/capi/packer/config/cni.json"  -var-file="/image-builder/images/capi/packer/config/containerd.json"  -var-file="/image-builder/images/capi/packer/config/ansible-args.json"  -var-file="/image-builder/images/capi/packer/config/goss-args.json"  -var-file="/image-builder/images/capi/packer/config/common.json"  -color=true -var-file="/image-builder/images/capi/packer/azure/azure-config.json" -var-file="/image-builder/images/capi/packer/azure/azure-vhd.json" -var-file="/image-builder/images/capi/packer/azure/ubuntu-1804.json" -only="vhd-ubuntu-1804"  packer/azure/packer.json 

<snip>
 
Error initializing core: error interpolating default value for 'containerd_url': template: root:1:71: executing "root" at <user `containerd_ver...>: error calling user: test                                                                                                     
make: *** [Makefile:254: build-azure-vhd-ubuntu-1804] Error 1

After upgrading to 1.6 this error went away.

Reproduce

# install older version of package
sudo apt install packer=1.3.4+dfsg-4 -V
# build an image
make build-azure-vhd-ubuntu-1804    

Other info

The ensure scripts haver versions in them. Is there a minimum of each tool or should there be a hard check for the versions that are in the ensure scripts?

jsturtevant avatar Sep 14 '20 22:09 jsturtevant

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Dec 13 '20 23:12 fejta-bot

/lifecycle frozen

detiber avatar Jan 06 '21 16:01 detiber