Packer build works intermittently

9 views
Skip to first unread message

Anil Wadghule

unread,
Oct 15, 2019, 11:04:55 AM10/15/19
to Packer
Packer has been so unreliable to me

On multiple builds, it says "Unable to locate package libconfig-dev"
and also other packages as well but after trying builds multiple times, it does find packages this is really irritating me

Anyone here knows why it is so?
Here is a packer json file

this work intermittently folks. it fails most of the times.. it works like once in a 4th try.

Why does it do that? Halp!

Thanks,
Anil

Megan Marsh

unread,
Oct 15, 2019, 1:21:09 PM10/15/19
to packe...@googlegroups.com
This is probably due to a race with cloud-init. I've experienced similar when trying to use apt with AWS, and I've been able to reduce the issue by adding small sleeps in between my various calls. 

You could also try adding a sleep before you call your update, either by coding it inline or by adding a "pause_before" to your provisioner. 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/283670dd-b486-4701-902c-5b8f3b5aeef2%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages