Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails due to unable to resolve raw.githubusercontent.com error when fetching vagrant public key #1576

Open
Sn0wCrack opened this issue Aug 19, 2024 · 0 comments
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@Sn0wCrack
Copy link

Version

Current main branch as of 2024-08-19

Environment

Mac M1 running Sonoma (14.6.1) with VMware Fusion (13.5.2)

Scenario

Build ubuntu-22.04 (or ubuntu-24.04) box as standard for solely VMware.

Steps to Reproduce

packer build -only=vmware-iso.vm -var-file=os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl ./packer_templates

Wait until the "_common/vagrant.sh" script begins to run and an error should occur when it attempts to download the common vagrant user public key stating it cannot resolve raw.githubusercontent.com

This occurs in the following location: https://github.com/chef/bento/blob/main/packer_templates/scripts/_common/vagrant.sh#L9

Expected Result

The networking should be available in the VM at this point and the build for the packer file.

Actual Result

Build fails to to being unable to resolve raw.githubusercontent.com when attempting to download the vagrant user public key.

Troubleshooting

In my case I edited the _common/vagrant.sh file and added a sleep 30 to the top of the script, which fixes my issue.

I believe either the ubuntu/update_ubuntu.sh script rebooting the VM or the ubuntu/networking_ubuntu.sh script editing the netplan file have something to do with this, one of them making the network unavailable in the VM for a brief period while _common/vagrant.sh runs.

Essentially some kind of race condition due to things processing the background and the scripts executing too fast.

@Sn0wCrack Sn0wCrack added the Status: Untriaged An issue that has yet to be triaged. label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant