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

Support many files in Vagrant box for libvirt #48

Merged

Conversation

LeConTesteur
Copy link

Hello,

I try to implement this issue hashicorp/packer#10627.
Now, we use this format for metadata.json :

{
  "disks": [
    {
      "path": "box_0.img",
      "format": "qcow2"
    },
    {
      "path": "box_1.img",
      "format": "qcow2"
    },
    {
      "path": "box_2.img",
      "format": "qcow2"
    }
  ],
  "provider": "libvirt"
}

I append new tests.

Closes #10627

@LeConTesteur LeConTesteur requested a review from a team as a code owner February 1, 2022 16:36
@LeConTesteur LeConTesteur force-pushed the dev/support_many_files branch from b6ec955 to 0c18dff Compare February 1, 2022 18:07
@hashicorp-cla
Copy link

hashicorp-cla commented Feb 17, 2022

CLA assistant check
All committers have signed the CLA.

@LeConTesteur LeConTesteur force-pushed the dev/support_many_files branch from 0c18dff to 56ef105 Compare February 20, 2022 16:53
@nywilken
Copy link
Contributor

@LeConTesteur @electrofelix apologies for the delayed review on this PR. I'm slating it for review so that a member of the team can follow up with the original issue and requested changes. Thanks again for pushing this plugin forward.

Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @LeConTesteur,

As I mentioned in the related issue, sorry for the delay in the review, and thanks for submitting this PR.

Given what we know about the qemu builder, which is the only one producing artifacts that will be processed by this code, there's currently only one image in the output, so we can rely on this to include only the image itself, and not the potential extra efivars.fd raw blob in the volume list.

Additionally, since we've taken so long to merge this, the code conflicts with a change made a while back on the filename check, so that'll have to be fixed before we can merge this PR.

Please let me know if you're still interested to work on this PR, I'll happily review the changes once you're ready.
Otherwise, please let me know and I can continue working on supporting this change.

post-processor/vagrant/libvirt.go Show resolved Hide resolved
post-processor/vagrant/libvirt.go Outdated Show resolved Hide resolved
post-processor/vagrant/libvirt_test.go Outdated Show resolved Hide resolved
post-processor/vagrant/libvirt_test.go Outdated Show resolved Hide resolved
@LeConTesteur LeConTesteur force-pushed the dev/support_many_files branch 2 times, most recently from 9136750 to 54e2ab3 Compare September 15, 2023 20:57
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @LeConTesteur,

Thanks for the reroll, with the discussion ongoing in the related issue, I'm more confident this code will work as intended, I just left a few suggestions/nits, but overall this looks good to me.

post-processor/vagrant/libvirt.go Outdated Show resolved Hide resolved
post-processor/vagrant/libvirt.go Outdated Show resolved Hide resolved
post-processor/vagrant/libvirt_test.go Show resolved Hide resolved
post-processor/vagrant/libvirt_test.go Outdated Show resolved Hide resolved
post-processor/vagrant/libvirt_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good to me now @LeConTesteur, thanks for rerolling this.

I'll merge the PR today

@lbajolet-hashicorp lbajolet-hashicorp merged commit d995c11 into hashicorp:main Sep 25, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What would be the impact if vagrant-libvirt supported multi disk machines?
4 participants