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

add_vagrant_box.sh: Fix incorrect vagrant box updates #14527

Merged
merged 2 commits into from
Jan 5, 2021

Conversation

pchaigno
Copy link
Member

@pchaigno pchaigno commented Jan 5, 2021

When running add_vagrant_box.sh with aria2c and a package.box file already present in the destination directory, the script ends up adding the existing .box file instead of the downloaded one. This can also happen if several VM images are downloaded during the same run of add_vagrant_box.sh.

01/05 17:00:15 [NOTICE] Download complete: /home/qmo/tmp/package.3.box
Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
138a73|OK  |   4.5MiB/s|/home/qmo/tmp/package.3.box
Status Legend:
(OK):download completed.
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'cilium/ubuntu-4-19' (v0) for provider:
    box: Unpacking necessary files from: file:///home/qmo/tmp/package.box

We can easily fix this by instructing aria2c to overwrite any existing package.box file.

When running add_vagrant_box.sh with aria2c and a package.box file
already present in the destination directory, the script ends up adding
the existing .box file instead of the downloaded one. This can also
happen if several VM images are downloaded during the same run of
add_vagrant_box.sh.

    01/05 17:00:15 [NOTICE] Download complete: /home/qmo/tmp/package.3.box
    Download Results:
    gid   |stat|avg speed  |path/URI
    ======+====+===========+=======================================================
    138a73|OK  |   4.5MiB/s|/home/qmo/tmp/package.3.box
    Status Legend:
    (OK):download completed.
    ==> box: Box file was not detected as metadata. Adding it directly...
    ==> box: Adding box 'cilium/ubuntu-4-19' (v0) for provider:
        box: Unpacking necessary files from: file:///home/qmo/tmp/package.box

We can easily fix this by instructing aria2c to overwrite any existing
package.box file.

Suggested-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Paul Chaignon <paul@cilium.io>
Suggested-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno added the release-note/misc This PR makes changes that have no direct user impact. label Jan 5, 2021
@pchaigno pchaigno requested a review from qmonnet January 5, 2021 18:03
@pchaigno pchaigno requested a review from a team as a code owner January 5, 2021 18:03
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.10.0 Jan 5, 2021
@joestringer joestringer merged commit 00d7b75 into master Jan 5, 2021
@joestringer joestringer deleted the pr/pchaigno/fix-incorrect-vagrant-box-updates branch January 5, 2021 18:26
aditighag pushed a commit that referenced this pull request Jan 7, 2021
We prevented aria2c to rename the downloaded "package.box" at one
location, to avoid unpacking the wrong file in case there was already a
package.box in the download directory and the new one has been renamed.
But we did so for one of the two possible aria2c invocations in the
script. Let's make sure we do it everytime aria2c is used. And let's
suppress summaries displayed at regular intervals by aria2c, to avoid
cluttering console output.

Fixes: #14527
Fixes: f763fef ("add_vagrant_box.sh: Fix bug causing download of incorrect VM images")
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants