From a2da51211c655466b201dd6d3471c785d0cfdff8 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 13 Oct 2009 19:40:51 +0000 Subject: [PATCH] -Have DB worker release potentially conflicting DB handles on startup git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4375 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 3737732af..059f27f46 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -122,6 +122,15 @@ sub shut_dbworker { } sub init_dbworker { #create a db worker process +#First, release all non-db-worker owned db handles (will recreate if we have to) + foreach (values %{$::XCAT_DBHS}) + { #@{$drh->{ChildHandles}}) { + if ($_) { $_->disconnect(); } + $_->{InactiveDestroy} = 1; + undef $_; + } + + $dbworkerpid = fork; unless (defined $dbworkerpid) {