Ubuntu Bionic Box Appears Corrupted

Bug #1862700 reported by Dave Mackey
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
cloud-images
Fix Released
Undecided
Pat Viafore

Bug Description

Attempted to update ubuntu/bionic64 to latest using vagrant but it failed with this error:

"The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

x box.ovf
x Vagrantfile
x metadata.json
x ubuntu-bionic-18.04-cloudimg.mf
x ubuntu-bionic-18.04-cloudimg.vmdk: Truncated tar archive
bsdtar: Error exit delayed from previous errors."

I removed the current box entirely and attempted to re-add it: `vagrant box add ubuntu/bionic64`, receive the same error.

To see if this was an issue with my computer I downloaded another Ubuntu box: `vagrant box add ubuntu/trusty64`, the latter was added without issues.

I ran the ubuntu/bionic64 add box again to see if it was a transitory issue, still the same error.

Looks like bionic64 was updated around an hour ago. Maybe corrupt?

Revision history for this message
Eric Blom (corncob) wrote :

Yes, it appears the *vagrant.box has an issue for 20200210. However, even when I try to add an older box using a command such as the following I get an error.

  vagrant init ubuntu/bionic64 \
    --box-version 20200121.0.0

I can see on the cloud-images.ubuntu.com server that the box file is suspiciously small.
* 20200210: 68 M
* 20200206: 307 M
* 20200204: 307 M
* 20200131: 307 M

Downloading an older box file and adding it manually works.
https://cloud-images.ubuntu.com/bionic/20200206/bionic-server-cloudimg-amd64-vagrant.box

2020
==> default: Adding box 'ubuntu/bionic64' (v20200115.0.0) for provider: virtualbox -- Fail
==> default: Adding box 'ubuntu/bionic64' (v20200116.1.0) for provider: virtualbox -- Fail
==> default: Adding box 'ubuntu/bionic64' (v20200130.1.0) for provider: virtualbox -- Fail
==> default: Adding box 'ubuntu/bionic64' (v20200131.0.0) for provider: virtualbox -- Fail
==> default: Adding box 'ubuntu/bionic64' (v20200206.0.0) for provider: virtualbox -- Fail
==> default: Adding box 'ubuntu/bionic64' (v20200210.0.0) for provider: virtualbox -- Fail
2019
==> default: Adding box 'ubuntu/bionic64' (v20191113.0.0) for provider: virtualbox -- Fail
==> default: Adding box 'ubuntu/bionic64' (v20190513.0.0) for provider: virtualbox -- Fail
==> default: Adding box 'ubuntu/bionic64' (v20190115.0.0) for provider: virtualbox -- Fail
2018
==> default: Adding box 'ubuntu/bionic64' (v20180426.0.0) for provider: virtualbox -- Fail

Revision history for this message
Dave Mackey (davemackey) wrote :

I'm seeing the same thing Eric. I tried installing several older versions and they all are giving me the same error.

I saw an old bug report over on [RedHat](https://bugzilla.redhat.com/show_bug.cgi?id=1458743) that seemed similar where they deleted .vagrant.d/tmp and this cleared up the issue, but tried this to no avail.

Revision history for this message
Dave Mackey (davemackey) wrote :

I was able to download the box linked to by Eric and add manually and that worked. For anyone else looking to do the same, after downloading you'll want to do the following from where the file was downloaded:

vagrant box add bionic-server-cloudimg-amd64-vagrant.box --name=ubuntu/bionic64

You could specify another name if desired...though I'm hoping that maybe it will see future upgrades since I named it identically to what it would be named if downloaded through the normal mechanisms...

Revision history for this message
Deny Dias (denydias) wrote :

I've tried all the way down until 201906. 'vagrant box add' reported the same error for each one of them. Although 20200210 file size looks strange indeed, I don't know if this is the case for other images.

For some of them I've downloaded manually using the same commands as 'vagrant box add --debug ubuntu/bionic64' does. The commands bellow are for 20200206, which appears to be good.

$ $VAGRANTPATH/embedded/bin/curl -q --fail --location --max-redirs 10 --verbose --user-agent 'Vagrant/2.2.7 (+https://www.vagrantup.com; ruby2.4.9)' --continue-at '-' --output $HOME/.vagrant.d/tmp/boxtest http://cloud-images.ubuntu.com/bionic/20200206/bionic-server-cloudimg-amd64-vagrant.box
$ mkdir $HOME/.vagrant.d/tmp/boxtestout
$ $VAGRANTPATH/embedded/bin/bsdtar --no-same-owner --no-same-permissions -v -x -m -s "|\\\\|/|" -C $HOME/.vagrant.d/tmp/boxtestout -f $HOME/.vagrant.d/tmp/boxtest
x box.ovf
x Vagrantfile
x metadata.json
x ubuntu-bionic-18.04-cloudimg.mf
x ubuntu-bionic-18.04-cloudimg.vmdk: Truncated tar archive
bsdtar: Error exit delayed from previous errors.

Even GNU tar complains:

$ tar -xvf bionic-server-cloudimg-amd64-vagrant.box -C out/
box.ovf
Vagrantfile
metadata.json
ubuntu-bionic-18.04-cloudimg.mf
ubuntu-bionic-18.04-cloudimg.vmdk
tar: Unexpected EOF in archive
tar: rmtlseek not stopped at a record boundary
tar: Error is not recoverable: exiting now

Yes, ubuntu/bionic64 20200210. But I think there's more.

Revision history for this message
Deny Dias (denydias) wrote :

Downloading with:

$ wget https://cloud-images.ubuntu.com/bionic/20200206/bionic-server-cloudimg-amd64-vagrant.box

And add as per Dave's suggestion:

$ vagrant box add bionic-server-cloudimg-amd64-vagrant.box --name=ubuntu/bionic64

WFM. Maybe vagrant's curl has some issues (at least in v2.2.7 I'm working with).

Revision history for this message
Nahuel (naui95) wrote :

Deny's suggestion worked perfectly on Vagrant 2.2.7 (and VB 6.0)

Revision history for this message
Eric Blom (corncob) wrote :

It looks to me like all box versions are redirected to current. For ubuntu/bionic this is why selecting an older box version doesn't work around ubuntu/bionic v20200210 being corrupt.

For ubuntu/trusty64 it means even if you ask for an old box you get the current box. I've filed bug 1862978. https://bugs.launchpad.net/cloud-images/+bug/1862978

Revision history for this message
Pat Viafore (patviafore) wrote :

Thank you everyone for the information.

We've revoked 20200210 so that users won't be able to download the corrupted image anymore. We've made sure the 20200206 serial is no longer pointing to current, but instead to our 20200206 serial.

I'm going to leave this bug open until a newer serial is published, just to make sure we don't run into further corruption issues.

Changed in cloud-images:
status: New → In Progress
assignee: nobody → Pat Viafore (patviafore)
Revision history for this message
Joshua Powers (powersj) wrote :

Hi,

Going through old bugs to check in on status.

This appears to have been fixed and we have had multiple releases of vagrant images since this was reported. As such I am marking this as 'Fix Released'.

If you disagree, please do feel free to follow-up in the bug here with additional notes or logs. Thanks!

Changed in cloud-images:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.