Bug #17641

Speedup vm removal

Added by Guido Günther 3 months ago. Updated 2 months ago.

Status:Closed
Priority:Normal
Assigned To:Guido Günther
Category:Compute resources - VMware
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4104
Story points-
Velocity based estimate-
Release1.14.1Release relationshipAuto

Description

Use force when destroying VMs

There's no point in waiting several seconds for any guest utils to shut
down the VM when we want to get rid of it as quickly as possible. This
also works around cases like
2016-12-12T10:33:22 [app] [W] Failed to destroy a compute foo (VMware) instance bar.example.com: ToolsUnavailable: Der Vorgang kann nicht abgeschlossen werden, weil VMware Tools auf dieser virtuellen Maschine nicht ausgeführt wird.
 | RbVmomi::Fault: ToolsUnavailable: Der Vorgang kann nicht abgeschlossen werden, weil VMware Tools auf dieser virtuellen Maschine
nicht ausgeführt wird. | /usr/share/foreman/vendor/ruby/2.1.0/gems/rbvmomi-1.8.2/lib/rbvmomi/connection.rb:61:in `parse_response' | /usr/share/foreman/vendor/ruby/2.1.0/gems/rbvmomi-1.8.2/lib/rbvmomi/connection.rb:90:in `call' | /usr/share/foreman/vendor/ruby/2.1.0/gems/rbvmomi-1.8.2/lib/rbvmomi/basic_types.rb:205:in `_call' | /usr/share/foreman/vendor/ruby/2.1.0/gems/rbvmomi-1.8.2/lib/rbvmomi/basic_types.rb:74:in `block (2 levels) in init' | /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-1.34.0/lib/fog/vsphere/requests/compute/vm_power_off.rb:17:in `vm_power_off' | /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-1.34.0/lib/fog/vsphere/models/compute/server.rb:94:in `stop' | /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-1.34.0/lib/fog/vsphere/models/compute/server.rb:107:in `destroy' | /usr/share/foreman/app/models/compute_resource.rb:155:in `destroy_vm' | /usr/share/foreman/app/models/concerns/orchestration/compute.rb:164:in `delCompute' | /usr/share/foreman/app/models/concerns/orchestration.rb:168:in `execute'
where VMWare misdetecs the Openvm tools status.

Associated revisions

Revision 6816de9b
Added by Guido Günther 2 months ago

Fixes #17641 - Use force when destroying VMs

There's no point in waiting several seconds for any guest utils to
shut down the VM when we want to get rid of it as quickly as
possible.

This also works around cases like where VMWare misdetects
the openvm-tools status.

History

#1 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Guido Günther
  • Pull request https://github.com/theforeman/foreman/pull/4104 added

#2 Updated by Guido Günther 2 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal 2 months ago

  • Category changed from Compute resources to Compute resources - VMware
  • Release set to 1.14.1

Also available in: Atom PDF