Skip to content

Commit

Permalink
B #: fix minor lxd monitoring bug (OpenNebula#183)
Browse files Browse the repository at this point in the history
(cherry picked from commit ff8980c)
  • Loading branch information
Christian González authored and rsmontero committed Sep 4, 2020
1 parent 4516352 commit aa379a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/im_mad/remotes/lib/probe_db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def to_status
last = @db.execute("SELECT MAX(timestamp) from #{@dataset}").flatten![0]
last ||= @mtime.to_i

return sync_status(@host, @host_id) if last == 0 || time > (last + @conf[:sync])
return sync_status(@host, @host_id) if last == 0 || time > (last + @conf[:sync].to_i)

status_str = ''
monitor_ids = []
Expand Down
2 changes: 1 addition & 1 deletion src/im_mad/remotes/lxd-probes.d/vm/status/state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def self.state_info(*)

begin
config = REXML::Document.new(xml_txt).root
sync = config.elements['PROBES_PERIOD/SYNC_STATE_VM'].text.to_s
sync = config.elements['PROBES_PERIOD/SYNC_STATE_VM'].text.to_i
rescue StandardError
sync = 180
end
Expand Down

0 comments on commit aa379a1

Please sign in to comment.