Bug 1458743 - vagrant fails to add box if the previous attempt failed
Summary: vagrant fails to add box if the previous attempt failed
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-05 11:28 UTC by Tomas Krizek
Modified: 2017-06-05 13:38 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-05 13:38:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas Krizek 2017-06-05 11:28:47 UTC
Description of problem:
During vagrant box add, after the box was successfully downloaded, I ran out of disk space while the box was unpacking. Vagrant failed as expected with the following error.

The box failed to unpackage properly. Please verify that the box                                                                                                                    [480/895]
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):

x ./metadata.json
x ./Vagrantfile
x ./box.img: Write failed
bsdtar: Error exit delayed from previous errors.

Once I cleaned up my disk space and attempted to add the box again, but it kept failing with:

==> box: Box download is resuming from prior download progress
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

The requested URL returned error: 416


Version-Release number of selected component (if applicable): vagrant-1.8.5-3.fc25.noarch


How reproducible: deterministic


Steps to Reproduce:
1. make enough disk space for box download, but not enough for box unpacking
2. vagrant box add $BOX
3. clean up disk to have enough space for unpacking
4. vagrant box add $BOX

Actual results: vagrant fails to add the box after the disk is cleaned up to have enough space


Expected results: vagrant successfully adds the box when there's enough disk space


Additional info: This upstream issue seems similar and it also mentions a workaround https://github.com/mitchellh/vagrant/issues/4479

Workaround: rm -rf .vagrant.d/tmp

Comment 1 Vít Ondruch 2017-06-05 11:54:51 UTC
Hi Tomáš,

Any chance to reproduce the behavior with either F26+ and Vagrant 1.9.1 or even with the upstream RPM?

Comment 2 Vít Ondruch 2017-06-05 11:56:29 UTC
Actually, it would be even better if you are able to reproduce the issue with "--debug" flag, since it would give more clue, where the Vagrant failed.

Comment 3 Tomas Krizek 2017-06-05 12:45:56 UTC
The issue can't be reproduced with vagrant-1.9.1-2.fc26.noarch. If the box add command fails, it removes tmp automatically so the next time the process starts from scratch and works as expected.

Feel free to close this for F25, since the workaround is easy.

Comment 4 Vít Ondruch 2017-06-05 13:38:15 UTC
(In reply to Tomas Krizek from comment #3)
> Feel free to close this for F25, since the workaround is easy.

Thx for testing. I'm closing it, since this is upstream issue. But please let me know if you by a chance identify specific patch fixing this issue. We might consider backporting it.


Note You need to log in before you can comment on or make changes to this bug.