Have a clause for udp service to use to skip dispatch function
-correct rcons shell syntax -Move Table objects in MacMap to exist in a lifetime amenable to SQL server reality git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@376 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
888f28a295
commit
a9fc0b885e
@ -74,8 +74,6 @@ sub new {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
|
||||
$self->{switchtab} = xCAT::Table->new('switch', -create => 1);
|
||||
$self->{sitetab} = xCAT::Table->new('site');
|
||||
bless ($self, $class);
|
||||
return $self;
|
||||
}
|
||||
@ -111,8 +109,10 @@ sub find_mac {
|
||||
}
|
||||
|
||||
sub refresh_table {
|
||||
$self->{mactable}={};
|
||||
my $self = shift;
|
||||
$self->{mactable}={};
|
||||
$self->{switchtab} = xCAT::Table->new('switch', -create => 1);
|
||||
$self->{sitetab} = xCAT::Table->new('site');
|
||||
my $community = "public";
|
||||
my $tmp = $self->{sitetab}->getAttribs({key=>'snmpc'},'value');
|
||||
if ($tmp and $tmp->{value}) { $community = $tmp->{value} }
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/sh
|
||||
CONSERVER=`nodels $1 nodehm.conserver`
|
||||
if [ -z $CONSERVER ]; then
|
||||
if [ -z "$CONSERVER" ]; then
|
||||
CONSERVER=$XCATHOST
|
||||
fi
|
||||
if [ -z $CONSERVER ]; then
|
||||
if [ -z "$CONSERVER" ]; then
|
||||
CONSERVER=localhost
|
||||
fi
|
||||
#NOTE: IPv6 is not good with the below if going by IP, needs more sophisticated
|
||||
|
@ -75,6 +75,7 @@ ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/chvm
|
||||
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/tabgrep
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lsslp
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/tabdump
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/packimage
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/makedns
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/gettab
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/nodeadd
|
||||
|
@ -20,6 +20,7 @@ if (xCAT::Utils->isLinux()) {
|
||||
eval { require IO::Socket::INET };
|
||||
}
|
||||
|
||||
my $dispatch_requests = 1; # govern whether commands are dispatchable
|
||||
use IO::Socket;
|
||||
use IO::Handle;
|
||||
use IO::Select;
|
||||
@ -219,7 +220,7 @@ sub do_udp_service { #This function opens up a UDP port
|
||||
#Also, this throttles to handle one message at a time, so no forking either
|
||||
#Explicitly, to handle whatever operations nodes periodically send during discover state
|
||||
#Could be used for heartbeating and such as desired
|
||||
|
||||
$dispatch_requests=0;
|
||||
my $socket;
|
||||
my $select = new IO::Select;
|
||||
if (xCAT::Utils->isLinux()) {
|
||||
@ -544,8 +545,11 @@ sub plugin_command {
|
||||
$req->{node}=\@nodes;
|
||||
}
|
||||
no strict "refs";
|
||||
dispatch_request($req,$callback,$modname);
|
||||
#${"xCAT_plugin::".$modname."::"}{process_request}->($req,$callback,\&do_request);
|
||||
if ($dispatch_requests) {
|
||||
dispatch_request($req,$callback,$modname);
|
||||
} else {
|
||||
${"xCAT_plugin::".$modname."::"}{process_request}->($req,$callback,\&do_request);
|
||||
}
|
||||
$$progname=$oldprogname;
|
||||
if ($sock) {
|
||||
close($parent_fd);
|
||||
|
Loading…
Reference in New Issue
Block a user