]> git.proxmox.com Git - pve-ha-manager.git/commit - src/PVE/HA/Manager.pm
wrap possible problematic cfs_read_file calls in eval
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 Nov 2017 13:41:40 +0000 (14:41 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 9 Nov 2017 10:42:12 +0000 (11:42 +0100)
commitbf7febe3771d6f9a2aef97bcd6eab4ece098c5aa
tree1bd3877eb49fb5707ebedfc79425e4992727a024
parentf466005d20419dbfc1f9c03ab9f37fdd7d874ab1
wrap possible problematic cfs_read_file calls in eval

Wrap those calls to the cfs_read_file method, which may now also die
if there was a grave problem reading the file, into eval in all
methods which are used by the ha services.

The ones only used by API calls or CLI helpers are not wrapped, as
there it can be handled more gracefull (i.e., no watchdog is
running) and further, this is more intended to temporarily workaround
until we handle such an exception explicitly in the services - which
is a bit bigger change, so let's just go back to the old behavior for
now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/HA/Config.pm
src/PVE/HA/Manager.pm