monitoring/SatConfig/general/InstallSoftwareConfig.pm | 1 + monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm | 9 +++++++++ 2 files changed, 10 insertions(+)
New commits: commit 5614fe2012180be8e0b847d192ef1b5e19cd502c Author: Jan Pazdziora jpazdziora@redhat.com Date: Wed Feb 1 13:19:33 2012 +0100
Now we use RHN::DBI, the database handle is brand new, let's disconnect as well.
Addressing Starting Monitoring ... Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=spaceschema at /etc/rc.d/np.d/SysVStep.pm line 287. Starting InstallSoftwareConfig ... [ OK ]
diff --git a/monitoring/SatConfig/general/InstallSoftwareConfig.pm b/monitoring/SatConfig/general/InstallSoftwareConfig.pm index b4c3a0b..0b77723 100644 --- a/monitoring/SatConfig/general/InstallSoftwareConfig.pm +++ b/monitoring/SatConfig/general/InstallSoftwareConfig.pm @@ -22,6 +22,7 @@ sub startActions $ini->connect(); $ini->fetch_nocpulseini('INTERNAL'); $ini->save(); + $ini->disconnect(); }; if ($@) { $self->addError($@); diff --git a/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm b/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm index 32d384e..f85b82d 100644 --- a/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm +++ b/monitoring/nocpulse-common/perl-API/NOCpulse/NOCpulseini.pm @@ -49,6 +49,15 @@ sub connect { return $dbh; }
+sub disconnect { + my $self = shift; + my $dbh = $self->dbh; + if (defined $dbh) { + $dbh->disconnect; + } + $self->dbh(undef); +} + sub save { my $self = shift; my $filename = shift || $self->filename;
spacewalk-commits@lists.fedorahosted.org