Bug #12063
closedunable to destroy libvirt vm
Description
[W] Failed to destroy a compute h01.sat.lab (Libvirt) instance fdev19.sat.lab.tlv.redhat.com: wrong number of arguments (0 for 1) | ArgumentError: wrong number of arguments (0 for 1) | /home/foreman/gems/gems/fog-libvirt-0.0.2/lib/fog/libvirt/requests/compute/volume_action.rb:6:in `delete' | /home/foreman/gems/gems/fog-libvirt-0.0.2/lib/fog/libvirt/requests/compute/volume_action.rb:6:in `volume_action' | /home/foreman/gems/gems/fog-libvirt-0.0.2/lib/fog/libvirt/models/compute/volume.rb:45:in `destroy' | /home/foreman/gems/gems/fog-libvirt-0.0.2/lib/fog/libvirt/models/compute/server.rb:89:in `block in destroy' | /home/foreman/gems/gems/fog-libvirt-0.0.2/lib/fog/libvirt/models/compute/server.rb:89:in `each' | /home/foreman/gems/gems/fog-libvirt-0.0.2/lib/fog/libvirt/models/compute/server.rb:89:in `destroy' | /home/foreman/git/foreman/app/models/compute_resources/foreman/model/libvirt.rb:41:in `destroy_vm'
Updated by Dominic Cleal almost 9 years ago
The bug looks deeper than the stack trace indicates (silenced?), perhaps in ruby-libvirt, but most likely not Foreman.
Same as #9946?
Updated by Maximilian Gaß almost 7 years ago
I think this is a problem with virtual machines not created from Foreman. Fog-Libvirt fails to understand volume tags as written by virt-install.
For example, my XML might say:
<source dev='/dev/vg1/foobar'/>
fog-libvirt expects the <source> tag to have a file attribute though
The volume metadata is then incomplete:
volumes=[ <Fog::Compute::Libvirt::Volume id=nil, pool_name="vg1", key=nil, name="fog-764556483518616", path=nil, capacity="10G", allocation="1G", format_type="raw", backing_volume=nil >],
Volumes are deleted by key, but as you can see, "key" is nil
Updated by Oliver Freyermuth about 6 years ago
- Triaged set to No
I observe exactly the same.
I had to patch fog as follows:
https://github.com/fog/fog/issues/3285#issuecomment-98696583
to be able to create VMs with Ceph-RBD backed volumes.
However, now I am unable to delete them.
Updated by Oliver Freyermuth almost 5 years ago
The code snippet in this PR comment against fog-libvirt:
https://github.com/fog/fog-libvirt/pull/56#issuecomment-539211907
fixes my issues, and I plan to upstream it after response on how to proceed.
It also lets RBD volumes show up correctly in foreman with their provisioned and allocated size.
Updated by Oliver Freyermuth almost 5 years ago
This is now part of fog-libvirt 0.7.0, so all that's left is upgrading the version in Foreman ;-).
Updated by The Foreman Bot almost 5 years ago
- Status changed from New to Ready For Testing
- Assignee set to Anonymous
- Pull request https://github.com/theforeman/foreman-packaging/pull/4242 added
Updated by The Foreman Bot almost 5 years ago
- Pull request https://github.com/theforeman/foreman-packaging/pull/4243 added
Updated by The Foreman Bot almost 5 years ago
- Pull request https://github.com/theforeman/foreman/pull/7136 added
Updated by Anonymous almost 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 8c53f84f36d247571caf075d9c9c8b57ecc9e517.
Updated by The Foreman Bot almost 5 years ago
- Pull request https://github.com/theforeman/foreman-packaging/pull/4272 added
Updated by The Foreman Bot almost 5 years ago
- Pull request https://github.com/theforeman/foreman-packaging/pull/4273 added