mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 01:26:38 +00:00
parent
fec0b8a75d
commit
804b132605
@ -388,6 +388,26 @@ sub getipaddr
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 clearcache
|
||||
Workaround: Clear the IP address cache in case that the long running process
|
||||
(discovery/install monitor) could work as normal when the node's IP address
|
||||
is changed.
|
||||
Globals:
|
||||
cache: %::hostiphash
|
||||
Error:
|
||||
none
|
||||
Example:
|
||||
xCAT::NetworkUtils->clearcache();
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
sub clearcache
|
||||
{
|
||||
undef %::hostiphash;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 linklocaladdr
|
||||
Only for IPv6.
|
||||
Takes a mac address, calculate the IPv6 link local address
|
||||
|
@ -8,6 +8,7 @@ BEGIN
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
use xCAT::DiscoveryUtils;
|
||||
use xCAT::NetworkUtils;
|
||||
|
||||
sub handled_commands {
|
||||
return {
|
||||
@ -51,6 +52,8 @@ sub process_request {
|
||||
xCAT::MsgUtils->message("S", "xcat.discovery.aaadiscovery: ($mac) Got a discovery request, attempting to discover the node...");
|
||||
$req->{discoverymethod}->[0] = 'undef';
|
||||
$req->{_xcat_clientmac}->[0] = $mac;
|
||||
#Workaround (#4890) for IP changed cases.
|
||||
xCAT::NetworkUtils->clearcache();
|
||||
xCAT::DiscoveryUtils->update_discovery_data($req);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user