-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix build error due to deleted module. Add pause_before to packer-basic-example. Shave other yaks. #775
Conversation
Without this, we sometimes get build failures such as: ``` TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:17Z logger.go:66: 1611935117,,ui,message, amazon-ebs: Reading package lists... TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:17Z logger.go:66: 1611935117,,ui,message, amazon-ebs: Reading package lists... TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:17Z logger.go:66: 1611935117,,ui,message, amazon-ebs: Building dependency tree... TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:17Z logger.go:66: 1611935117,,ui,message, amazon-ebs: Reading state information... TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:17Z logger.go:66: 1611935117,,ui,message, amazon-ebs: Calculating upgrade... TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:17Z logger.go:66: 1611935117,,ui,message, amazon-ebs: The following packages have been kept back: TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:17Z logger.go:66: 1611935117,,ui,message, amazon-ebs: linux-aws linux-headers-aws linux-image-aws TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:18Z logger.go:66: 1611935118,,ui,message, amazon-ebs: The following packages will be upgraded: TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:18Z logger.go:66: 1611935118,,ui,message, amazon-ebs: sudo tzdata TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:18Z logger.go:66: 1611935118,,ui,error,==> amazon-ebs: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial-backports_universe_i18n_Translation-en - open (2: No such file or directory) TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:18Z logger.go:66: 1611935118,,ui,error,==> amazon-ebs: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial-backports_universe_binary-amd64_Packages - open (2: No such file or directory) TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:18Z logger.go:66: 1611935118,,ui,message, amazon-ebs: 2 upgraded%!!(MISSING)(PACKER_COMMA) 0 newly installed%!!(MISSING)(PACKER_COMMA) 0 to remove and 3 not upgraded. TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:18Z logger.go:66: 1611935118,,ui,error,==> amazon-ebs: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial-backports_main_i18n_Translation-en - open (2: No such file or directory) TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:18Z logger.go:66: 1611935118,,ui,error,==> amazon-ebs: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-amd64_Packages - open (2: No such file or directory) TestBuildPackerArtifactWithGit/ref-sha 2021-01-29T15:45:18Z logger.go:66: 1611935118,,ui,error,==> amazon-ebs: E: Could not open file ``` I _think_ this is due to the issue where you run `apt` too soon after boot...
Build failed because we were relying on the |
This is currently blocked due to gruntwork-io/fetch#87. |
FYI - gruntwork-io/fetch#87 has been fixed and released. |
This pulls in the latest version of fetch, which has a fix for the --branch param.
Indeed! I just released https://github.com/gruntwork-io/gruntwork-installer/releases/tag/v0.0.33 too, and now have updated this PR to use it to see if it fixes the build. |
Yay, tests passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for the review! Merging now. |
Yay! |
This PR fixes multiple issues:
Fix a build failure where a module we rely on in CI was deleted.
Add
pause_before
topacker-basic-example
. Without this, we sometimes get build failures such as:I think this is due to the issue where you run
apt
too soon after boot...Update
gruntwork-installer
version to pick up a new version offetch
that fixes a bug with the--branch
argument.Pick instance types dynamically for Packer builds, rather than hard-coding
t2.micro
, ast2.micro
isn't available in all regions.Add more retries for yet more transient provider download issues.