From 5d350aca3628f1f48d4c9fd99184a455068c8227 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 9 Jan 2019 14:25:01 -0500 Subject: [PATCH] Put in piece of an old commit to sync up with master Currently Table.pm has a partial revert. Rectify this to sync back up with xcat.org in optimism that the problem has been fixed (based on some examination of changes since the mistake) --- perl-xCAT/xCAT/Table.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 1db623b31..59781b55e 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -2766,6 +2766,17 @@ sub getNodeAttribs } $self->trace_db(START_TYPE); + if (!defined($self->{dbh})) { + xCAT::MsgUtils->message("S", "xcatd: DBI is missing, Please check the db access process."); + return undef; + } + if ($dbworkerpid > 0) { #TODO: should this be moved outside of the DB worker entirely? I'm thinking so, but I don't dare do so right now... + #the benefit would be the potentially computationally intensive substitution logic would be moved out and less time inside limited + #db worker scope + return dbc_call($self, 'getNodeAttribs', $node, \@attribs, %options); + } + $self->trace_db(START_TYPE); + if (!defined($self->{dbh})) { xCAT::MsgUtils->message("S", "xcatd: DBI is missing, Please check the db access process."); return undef;