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

Retry for upload windows-update script #101

Open
garimakhulbe02 opened this issue Jul 29, 2021 · 2 comments
Open

Retry for upload windows-update script #101

garimakhulbe02 opened this issue Jul 29, 2021 · 2 comments

Comments

@garimakhulbe02
Copy link

garimakhulbe02 commented Jul 29, 2021

The packer builds are failing at windows-update script upload.

2021/07/22 13:54:29 machine readable: azure-arm,error []string{"Error uploading file to $env:TEMP\\winrmcp---.tmp: Couldn't create shell: unknown error Post \"https://-------/wsman\": EOF"}
PACKER ERR ==> Builds finished but no artifacts were created.
PACKER OUT --> azure-arm: Error uploading file to $env:TEMP\winrmcp--------.tmp: Couldn't create shell: unknown error Post "https://-------/wsman": EOF
PACKER ERR 2021/07/22 13:54:29 [INFO] (telemetry) Finalizing.

I suspect reason is /tmp script gets deleted during multiple windows restart or updates. Upload does not have retry so it failed after trying once if I understood correctly. Check here - packer-windows-update/provisioner.go.

I saw similar errors for powershell provisioner but it is retryable so it started upload again. This also gets confirm from packer-powershell/provisioner.go, where both upload and run are retryable.

We need to add similar retry for upload in packer-windows-update. What do you think?

@rgl
Copy link
Owner

rgl commented Jul 29, 2021

I never say windows delete anything from temp before. Did the update plugin do a windows restart before you saw that error?

Having the retry would be welcome indeed 🙂

@rgl
Copy link
Owner

rgl commented Aug 1, 2021

Please try v0.14.0 and let us known how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants