2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Fix erroneous 'noping' in various circumstances (#4102)

nmap's raw IP facility is prone to mistakes in various
environments.  Disable the raw IP handling by
telling nmap to run as if it didn't have privilege
Note this was already done back in:

commit fb02c18853dd2004ed936c77afabd310d7f115dd
Author: jjohnson2 <jjohnson2@lenovo.com>
Date:   Fri Mar 20 10:58:26 2015 -0400

But it was broken since then..
This commit is contained in:
Jarrod Johnson 2017-10-16 23:01:44 -04:00 committed by yangsong
parent 54404030b6
commit f93ca55b24

View File

@ -199,7 +199,7 @@ sub nmap_pping {
@nmap_options = xCAT::TableUtils->get_site_attribute("nmapoptions");
$more_options = $nmap_options[0];
}
open(FPING, "nmap -PE --system-dns --send-ip -sP $more_options " . join(' ', @$nodes) . " 2> /dev/null|") or die("Cannot open nmap pipe: $!");
open(FPING, "nmap -PE --system-dns --unprivileged --send-ip -sP $more_options " . join(' ', @$nodes) . " 2> /dev/null|") or die("Cannot open nmap pipe: $!");
my $node;
while (<FPING>) {
if (/Host (.*) \(.*\) appears to be up/) {