2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-22 11:10:24 +00:00

Merge pull request #5557 from immarvin/onissue

capture retrieve_fd fatal error, log the underlie message
This commit is contained in:
zet809
2018-08-27 17:17:06 +08:00
committed by GitHub

View File

@@ -8239,7 +8239,13 @@ sub loadsdrcache {
if (!open($fh, "<$file")) {
return (1);
}
$r = retrieve_fd($fh);
eval {
$r = retrieve_fd($fh);
}
if($@){
xCAT::MsgUtils->message("S", "loadsdrcache: Fatal error while retrieving data from $file, $@");
return 1;
}
unless ($r) { close($fh); return 1; }
unless ($r->{xcat_sdrcacheversion} and $r->{xcat_sdrcacheversion} == $cache_version) { close($fh); return 1; } #version mismatch