Project

General

Profile

Bug #12063

unable to destroy libvirt vm

Added by Ohad Levy almost 5 years ago. Updated 9 months ago.


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'

Associated revisions

Revision 6617bbc2 (diff)
Added by Michael Moll 10 months ago

Refs #12063 - update fog-libvirt to 0.7.0

Revision 8c53f84f (diff)
Added by Michael Moll 9 months ago

Fixes #12063 - require fog-libvirt >= 0.7.0

Revision f1244f13 (diff)
Added by Michael Moll 9 months ago

Refs #12063 - require fog-libvirt >= 0.7.0

History

#1 Updated by Ohad Levy almost 5 years ago

  • Description updated (diff)

#2 Updated by Dominic Cleal almost 5 years ago

The bug looks deeper than the stack trace indicates (silenced?), perhaps in ruby-libvirt, but most likely not Foreman.

Same as #9946?

#3 Updated by Anonymous about 3 years ago

Ohad, what's the status here?

#4 Updated by Maximilian Gaß almost 3 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

#5 Updated by Oliver Freyermuth about 2 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.

#6 Updated by Oliver Freyermuth 10 months 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.

#7 Updated by Oliver Freyermuth 10 months ago

This is now part of fog-libvirt 0.7.0, so all that's left is upgrading the version in Foreman ;-).

#8 Updated by The Foreman Bot 10 months ago

  • Assignee set to Anonymous
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-packaging/pull/4242 added

#9 Updated by The Foreman Bot 10 months ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/4243 added

#10 Updated by The Foreman Bot 10 months ago

  • Pull request https://github.com/theforeman/foreman/pull/7136 added

#11 Updated by The Foreman Bot 9 months ago

  • Fixed in Releases 2.0.0 added

#12 Updated by Anonymous 9 months ago

  • Status changed from Ready For Testing to Closed

#13 Updated by The Foreman Bot 9 months ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/4272 added

#14 Updated by The Foreman Bot 9 months ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/4273 added

Also available in: Atom PDF