diff --git a/perl-xCAT-2.0/xCAT/Table.pm b/perl-xCAT-2.0/xCAT/Table.pm index 2b0895cb7..d606fa333 100644 --- a/perl-xCAT-2.0/xCAT/Table.pm +++ b/perl-xCAT-2.0/xCAT/Table.pm @@ -12,6 +12,7 @@ use DBI; #use strict; use Data::Dumper; +use Scalar::Util qw/weaken/; use xCAT::Schema; use xCAT::NodeRange; use Text::Balanced qw(extract_bracketed); @@ -246,7 +247,7 @@ sub new updateschema($self); if ($self->{tabname} eq 'nodelist') { - $self->{nodelist} = $self; + weaken($self->{nodelist} = $self); } else { @@ -1407,6 +1408,12 @@ sub close { my $self = shift; if ($self->{dbh}) { $self->{dbh}->disconnect(); } + undef $self->{dbh}; + if ($self->{tabname} eq 'nodelist') { + undef $self->{nodelist}; + } else { + $self->{nodelist}->close(); + } } #-------------------------------------------------------------------------- diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/rhel.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/rhel.pm index b5155b8b6..dde055b58 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/rhel.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/rhel.pm @@ -117,9 +117,9 @@ sub makenetboot { $callback->({error=>["No installdir defined in site table"],errorcode=>[1]}); return; } - my $srcdir = "/$installroot/$osver/$arch"; + my $srcdir = "/$installroot/$osver/$arch/Server"; unless ( -d $srcdir."/repodata" ) { - $callback->({error=>["copycds has not been run for $osver/$arch"],errorcode=>[1]}); + $callback->({error=>["copycds has not been run for $osver/$arch (/$installroot/$osver/$arch/Server/repodata not found"],errorcode=>[1]}); return; } my $yumconf;