sandia-minimega / minimega

minimega
GNU General Public License v3.0
148 stars 66 forks source link

minimega: disk inject failing on Ubuntu 20.04 Focal #1425

Closed activeshadow closed 3 years ago

activeshadow commented 4 years ago

Describe your environment

  1. minimega version - minimega 50f959ee87423ae6d39d08f2094cc48f09bcaa0a 2019-08-29
  2. Linux distro/version - `Ubuntu 20.04 Focal
  3. Go compiler version - N/A
  4. VM types - kvm

Describe the bug Running disk inject in minimega hangs. Further investigation suggests it's hanging at the point where the network block device should be mounted to the temporary folder, since (for example) /dev/nbd0p1 exists but the mount does not. The minimega debug logs show a log for the qcow2 getting connected to the network block device, but no logs are created for mounting the device.

Stepping though the steps to mount a qcow2 image manually works just fine.

To Reproduce Steps to reproduce the behavior:

  1. Create a snapshot of an existing qcow2 image using disk snapshot.
  2. Attempt to inject a file into the snapshot created in step 1 using disk inject <path/to/snapshot> files <some files>

Expected behavior The call to disk inject should return instead of hanging minimega.

Given I can manually mount a qcow2 image via a network block device, I'm inclined to think this is a minimega issue, but from what I can tell the minimega code is shelling out to run exactly the same commands I'm running manually.

activeshadow commented 4 years ago

Is anyone else seeing this behavior on Ubuntu 20.04?

mkunz7 commented 3 years ago

Hmm. I've never tried injecting into a snapshot before. Seems to be working for me on 20.04. I don't think I'm doing anything special, maybe it's something with the image you are using? Are you specifying the partition?

image

activeshadow commented 3 years ago

Thanks @mkunz7 for testing this. I'll try it again... it's been a while.

aherna commented 3 years ago

@activeshadow is this still an issue? I have instances where we do disk inject on 20.04, and 20.10

activeshadow commented 3 years ago

@activeshadow is this still an issue? I have instances where we do disk inject on 20.04, and 20.10

@aherna I haven't tried in a while, actually. If it's working for you then feel free to close the issue since, if still broken for me, it's a localized bug.