Project

General

Profile

Actions

Bug #12063

closed

unable to destroy libvirt vm

Added by Ohad Levy over 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources - libvirt
Target version:
-

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'

Actions #1

Updated by Ohad Levy over 8 years ago

  • Description updated (diff)
Actions #2

Updated by Dominic Cleal over 8 years ago

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

Same as #9946?

Actions #3

Updated by Anonymous almost 7 years ago

Ohad, what's the status here?

Actions #4

Updated by Maximilian Gaß over 6 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

Actions #5

Updated by Oliver Freyermuth almost 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.

Actions #6

Updated by Oliver Freyermuth over 4 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.

Actions #7

Updated by Oliver Freyermuth over 4 years ago

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

Actions #8

Updated by The Foreman Bot over 4 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
Actions #9

Updated by The Foreman Bot over 4 years ago

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

Updated by The Foreman Bot over 4 years ago

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

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases 2.0.0 added
Actions #12

Updated by Anonymous over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #13

Updated by The Foreman Bot over 4 years ago

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

Updated by The Foreman Bot over 4 years ago

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

Also available in: Atom PDF