2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-27 04:42:17 +00:00
Commit Graph

34 Commits

Author SHA1 Message Date
Daniel Hilst 86066cad78 test(ipv6): sixteen IPv6 assertions match source text, not behaviour
Sixteen assertions on this branch matched a regular expression against the
source of the code they test. Such an assertion passes when the code is moved
somewhere it never runs, and fails when the file is reformatted and nothing
has changed: a perltidy respace of updatenode.pm:1606 turned
updatenode_ipv6_endpoint.t red with the behaviour unchanged.

updatenode_ipv6_endpoint.t now runs updatenoderunps and updatenodesoftware
and reads the xdsh command each one dispatched. It also covers the service
node name that has no usable endpoint, which the regular expressions could
not reach.

anaconda.pm built the debug syslog kernel arguments inline inside two large
subs. Move each to its own sub, _netboot_syslog_kcmdline_args and
_install_syslog_kcmdline_args, and render them in the test. An unusable
server name now gives no syslog arguments, where it gave "syslog.server="
with nothing after it.

pping is a program with no sub API, so the nmap and fping command building
moves to xCAT::DSHCore as nmap_ping_command and fping_ping_command, and pping
stays the caller that forks and execs the list.

credentials_ipv6_callback.t read allowcred.awk as text, and ran gawk from a
.t. The awk program is covered by xCAT-test/bats/ipv6_allowcred_awk.bats,
which starts it and speaks the credential protocol to it over both families.
Stubbing Socket6 and IO::Socket::INET6 in %INC also unskips the four
_open_callback_socket assertions, which skipped where the suite runs.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 15:27:20 -03:00
Vinícius Ferrão 9649199fd3 fix(ipv6): centralize address-safe ping result matching
(cherry picked from commit c22a8c19721bc5c1392156508993d5123607b8d6)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 4a28c9d2da)
2026-10-26 15:27:17 -03:00
Vinícius Ferrão f05677d173 feat(ipv6): add EL10 IPv6-only provisioning support
An IPv6-only provisioning network cannot deploy a node. The discovery and
credential callbacks open IPv4 sockets, the kickstart and boot templates
render an IPv4 address into every endpoint, and makehosts drops an IPv6
value because hosts.pm gates on isIpv4addr.

NetworkUtils gains the address helpers the rest of the change uses:
format_host_port, parse_host_port and format_uri_host bracket an IPv6
literal, getNodeNetworkCfg6 reads the static IPv6 configuration of a node,
my_ip_facing_family selects the management-node address of one family,
getIPv6ReverseZone builds a nibble-aligned reverse zone, and
node_is_ipv6_only and ipv6_server_for_node answer the two questions the
plugins used to answer for themselves. credentials.pm opens the callback
socket through IO::Socket::INET6 when the modules are present and keeps the
IPv4 path when they are not. Template.pm and anaconda.pm render an IPv6
kickstart network line and bracketed endpoints. The postscripts and the
stateless xcatroot format every endpoint through the bracketing helpers.

xCAT-server requires perl-IO-Socket-INET6 and perl-Socket6 on EL, and
libio-socket-inet6-perl and libsocket6-perl on Debian.

(cherry picked from commits c0a69bb5a and caa8ca790)
Ported onto upstream master ee6b4f532. The two commits are folded because the
second refactors the first. Master is kept where it has a newer form of the
same thing: the getipaddr cache guard, the Kea control_socket_path helper, the
netboot method list, install_device_params, the modern_installer test and the
isValidIp validator, which replaces the isValidIPAddress this branch added.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 3928c04507)
2026-10-26 15:27:08 -03:00
Bin Xu 40d74ace1b Adding port 22 for unprivileged node ping (#4324) (#5699) 2018-10-12 17:01:37 +08:00
Jarrod Johnson f93ca55b24 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 fb02c18853
Author: jjohnson2 <jjohnson2@lenovo.com>
Date:   Fri Mar 20 10:58:26 2015 -0400

But it was broken since then..
2017-10-16 22:01:44 -05:00
Jarrod Johnson 54404030b6 Recognize alternative path to fping (#4100)
SLES12 places fping into /usr/sbin
2017-10-16 22:00:09 -05:00
ertaozh 1e3cf89cf4 Return error if no /usr/bin/fping is available 2017-02-22 21:39:48 -05:00
Mark Gurevich fb911143fe perltidy all perl files, part 2 2016-07-21 13:27:40 -04:00
wangxiaopeng ca7c9ad69a issue 1171: set SSL_verifycn_scheme => none for IO::Socket::SSL->new 2016-06-22 10:04:04 -04:00
bybai 8ed8818e74 fix issue pping cannot connect sqlsite under non-root user 2015-09-25 02:52:44 -04:00
jjohnson2 fb02c18853 Fix erroneous 'noping' in various circumstances
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
2015-03-20 10:58:26 -04:00
daniceexi eeec7c6d4f Continue the change for avoiding sslv3 2015-02-13 03:07:51 -05:00
linggao 73d08b58fa added nmapoptions in the site table to resolve network slow response issues in nmap. defect 4300 2014-10-22 18:36:59 -04:00
lissav e93507ecbd defect 4071 2014-04-16 10:13:31 -04:00
lissav f643ea5156 fix defect 3517
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16042 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-04-23 14:29:48 +00:00
immarvin e166962d49 support -i for the command
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15260 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-02-26 03:57:36 +00:00
zhaoertao 78dd04ac4a fix bug 3556007: modifications related to Utils.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13574 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-08-22 07:36:09 +00:00
ligc be26420229 fix for bug 3465129: pping should handle the output 'address not found'
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11358 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-06 08:30:34 +00:00
wanghuaz 8dd5e11774 Removed the check of pping/ppping -i option when trying to remove the 'hfx' postfix in hostname, since in power 775 cluster, it is also possible to check ethernet connections with -i enx.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10929 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-31 10:59:01 +00:00
wanghuaz 5cde251816 Make pping -i option support hfi interfaces
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10922 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-30 08:16:52 +00:00
yinle 21ff396236 modify a little mistake: pping print ":ping"
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10552 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-19 13:46:51 +00:00
lissav 3189afe3bd comment out use Dumper
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9274 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-04-11 16:17:08 +00:00
jbjohnso 28161c99f2 -Fix for rhel6 nodestat/pping
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7598 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-09-23 18:15:48 +00:00
ligc b38f0378a5 pping support for IPv6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6448 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-06-12 08:11:17 +00:00
andywray 5152c40ecc Add switchto allow pping to use fping.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5736 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-04-09 20:47:05 +00:00
ligc e4033f21f0 add --system-dns to the nmap command, without this flag, the nmap may returns noping for pingable nodes due to DNS related issues
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4562 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-11-13 08:00:51 +00:00
bp-sawyers 5b959685d6 Fixed bug 2871383: show name resolution errors when using fping. Also added mutliple interface support to pping.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4301 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-10-06 12:44:28 +00:00
bp-sawyers 83b000bf68 - fixed bugs 2855348 and 2860171
- added summary of results to ppping output
- added ppping support for multiple interfaces

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4161 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-09-17 18:23:42 +00:00
lissav ce1e46795f remove Linux check around XML::Simple::PREFERRED_PARSER
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3895 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-07-29 16:05:42 +00:00
jbjohnso 79e6c93a6c -Change pping/nodestat to a more accurate set of arguments
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3244 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-04-22 19:54:54 +00:00
jbjohnso 2578dc9d52 -Have pping only use nmap if it is available in path
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3112 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-04-07 13:55:26 +00:00
jbjohnso 17bf1798b7 -Fix pping handling of FQDN-first /etc/hosts entries
-Have nodestat use nmap instead of fping/homegrown code
-Require nmap instead of fping


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3093 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-04-04 01:00:38 +00:00
jbjohnso a9403e6d00 -Switch to using faster nmap as backend to pping.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3092 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-04-03 23:43:19 +00:00
jbjohnso e68fe9d2db -Move xCAT-server and client to not have 2.0 in name for trunk
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1561 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-06-03 14:56:33 +00:00