mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
(cherry picked from commit 014447a3d6870a577fc127e5dd6634f799444d4f)
This commit is contained in:
parent
93be1be5bb
commit
eda14afe8f
@ -4,4 +4,9 @@ require_relative '../../../lib/kvm'
|
||||
|
||||
KVM.load_conf
|
||||
|
||||
puts DomainList.wilds_info
|
||||
begin
|
||||
puts DomainList.info
|
||||
rescue StandardError => e
|
||||
STDERR.puts e.message
|
||||
exit(-1)
|
||||
end
|
||||
|
@ -4,4 +4,9 @@ require_relative '../../../lib/kvm'
|
||||
|
||||
KVM.load_conf
|
||||
|
||||
puts DomainList.info
|
||||
begin
|
||||
puts DomainList.info
|
||||
rescue StandardError => e
|
||||
STDERR.puts e.message
|
||||
exit(-1)
|
||||
end
|
||||
|
@ -26,5 +26,6 @@ begin
|
||||
|
||||
puts vmdb.to_status
|
||||
rescue StandardError => e
|
||||
puts e
|
||||
STDERR.puts e.message
|
||||
exit(-1)
|
||||
end
|
||||
|
@ -89,15 +89,18 @@ module ProcessList
|
||||
|
||||
def self.retrieve_names
|
||||
text, _e, s = KVM.virsh(:list, '')
|
||||
names = []
|
||||
|
||||
return names if s.exitstatus != 0
|
||||
if s.exitstatus != 0
|
||||
raise 'Error retrieving names. Check Libvirtd service is up.'
|
||||
end
|
||||
|
||||
lines = text.split(/\n/)[2..-1]
|
||||
|
||||
# rubocop:disable Style/RedundantAssignment
|
||||
names = lines.map do |line|
|
||||
line.split(/\s+/).delete_if {|d| d.empty? }[1]
|
||||
end
|
||||
# rubocop:enable Style/RedundantAssignment
|
||||
|
||||
names
|
||||
end
|
||||
|
@ -67,7 +67,6 @@ void MonitorDriverProtocol::_monitor_vm(message_t msg)
|
||||
NebulaLog::warn("MDP", "Failed to monitor VM for host " +
|
||||
to_string(msg->oid()) + ": " + msg->payload());
|
||||
|
||||
hm->error_monitor(msg->oid(), msg->payload());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -276,7 +275,6 @@ void MonitorDriverProtocol::_state_vm(message_t msg)
|
||||
NebulaLog::warn("MDP", "Failed to monitor VM state for host " +
|
||||
to_string(msg->oid()) + ": " + msg->payload());
|
||||
|
||||
hm->error_monitor(msg->oid(), msg->payload());
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user