Skip to content

Commit

Permalink
B #6758: Fix QEMU_GA ping monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 authored and rsmontero committed Oct 18, 2024
1 parent 51ef95d commit f698097
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/im_mad/remotes/lib/kvm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module KVM
QEMU_GA = {
:enabled => false,
:commands => {
:vm_qemu_ping => "one-$vm_id \'{\"execute\":\"guest-ping\"}\'"
:vm_qemu_ping => "one-$vm_id \'{\"execute\":\"guest-ping\"}\' --timeout 5"
}
}

Expand Down Expand Up @@ -84,6 +84,10 @@ def self.load_conf

ga_conf_path = "#{__dir__}/../../etc/im/kvm-probes.d/guestagent.conf"
QEMU_GA.merge!(YAML.load_file(ga_conf_path))

QEMU_GA[:commands].each_key do |ga_info|
Domain::MONITOR_KEYS << ga_info
end
rescue StandardError
end

Expand Down Expand Up @@ -258,14 +262,6 @@ def to_one
''
end

def to_monitor
KVM::QEMU_GA[:commands].each_key do |ga_info|
MONITOR_KEYS << ga_info
end

super
end

private

# --------------------------------------------------------------------------
Expand Down

0 comments on commit f698097

Please sign in to comment.