1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

M #-: Make probes more robust

This commit is contained in:
Ruben S. Montero 2020-05-10 23:57:07 +02:00
parent 392e28768e
commit c8251dc733
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
3 changed files with 11 additions and 3 deletions

View File

@ -67,7 +67,7 @@ module Firecracker
response = client.get('machine-config')
rescue StandardError, FirecrackerError
return
return {}
end
###################################################################
@ -89,7 +89,7 @@ module Firecracker
response = client.get('')
rescue StandardError, FirecrackerError
return
return {}
end
###################################################################

View File

@ -23,7 +23,11 @@ require 'fileutils'
class DSMonitor
def initialize(config)
@ds_location = config.elements['DATASTORE_LOCATION'].text.to_s
begin
@ds_location = config.elements['DATASTORE_LOCATION'].text.to_s
rescue
end
@ds_location ||= '/var/lib/one/datastores'
FileUtils.mkdir_p @ds_location

View File

@ -27,7 +27,11 @@ rescue StandardError => e
exit(-1)
end
begin
ds_location = config.elements['DATASTORE_LOCATION'].text.to_s
rescue
end
ds_location ||= '/var/lib/one/datastores'
Dir.chdir ds_location