[Spacewalk-list] monitoring-data-cleanup fails: "Already in transaction"

David Nutter davidn at bioss.ac.uk
Mon May 16 10:17:25 UTC 2011


Hi,

Spacewalk 1.4, CentOS 5.6. Here's what I get when I run:

  /usr/bin/monitoring-data-cleanup --no-delete-unmatched --keep-monitoring-data "1 month"

  Deleting probes data older than 10:50:35 Apr 16, 2011...
  RHN::Exception: DBD::Oracle::db begin_work failed: Already in a transaction
    RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 228 RHN::Exception::DB::throw
    main /usr/bin/monitoring-data-cleanup 128 RHN::DB::handle_error

Stripping monitoring-data-cleanup down to the following gives the same
error: 

----------------------------------------------
#!/usr/bin/perl
use strict;
use lib '/etc/rc.d/np.d';
use NOCpulse::NOCpulseini;
use PhysCluster;

my $cluster = PhysCluster->newInitialized('/etc/rhn/cluster.ini');
my $localConfig = $cluster->get_LocalConfig;
my $ini = NOCpulse::NOCpulseini->new;

if (%$localConfig) {
        $ini->connect();
} else {
        print "Error: This script can be run only on monitoring
        backend.\n";
        exit 1;
}

$ini->dbh->begin_work;
-----------------------------------------------

Any ideas where I should start looking? I can't see anything in
RHN/DB.pm that would lead to a transaction being created implicitly
during connect(). Also, if I do:

$ini->dbh->rollback;
$ini->dbh->begin_work;

I still get the error on begin_work. There don't seem to be any
transactions pending in v$transaction. Any thoughts?

Regards,

-- 
David Nutter  				Tel: +44 (0)131 650 4888
BioSS, JCMB, King's Buildings, Mayfield Rd, EH9 3JZ. Scotland, UK 

Biomathematics and Statistics Scotland (BioSS) is formally part of The
James Hutton Institute (JHI), a registered Scottish charity No. SC041796
and a company limited by guarantee No. SC374831




More information about the Spacewalk-list mailing list