2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-12-04 16:17:06 +00:00
Commit Graph

66 Commits

Author SHA1 Message Date
Daniel Hilst 7ee57ff62e fix(xcat-core): sequential discovery over IPv6 finds no nic in the deploy network
Sequential discovery over IPv6 matched the pool node and then failed
with "No nic found in deploy network for seqdisc1". NetworkManager
installs a DHCPv6 lease as a /128, so Genesis reports the boot nic as
2001:db8:188::1004/128. hosttag_for_ipv6_nic masked both addresses with
that prefix length, and a /128 never matches the address of the node.

For a /128, hosttag_for_ipv6_nic now takes the network from the IPv6
rows of the networks table, which nodediscover reads once per request
through the new ipv6_networks. discovery_hosttag_ipv6_nic.t fails
without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-09 07:56:00 -03:00
Daniel Hilst 8f0d4e5e84 fix(xcat-core): sequential discovery cannot name a node reached over IPv6
process_request gated the MAC record on inet_aton($node), which answers for
IPv4 only, so a node whose only address is IPv6 was refused with "Can not
resolve IP for the matching node". update_discovery_data runs after that return,
so no discoverydata row was written, no mac was set and makedhcp never ran.
Measured on xcat88-mn: discoverydata empty after a full seq_discovery_ipv6 run.

It then matched each NIC behind a dotted-quad pattern. The Genesis image sends
address=${ipv4_address:-$ipv6_address}, so over IPv6 the NIC record carries the
v6 address, the branch was skipped, $localnic stayed 0 and the node was reported
as not on the deploy network.

The node is now resolved once with getipaddr and accepted by
discovery_address_usable, and the network of a NIC comes from nic_network_key,
which masks IPv6 by bits so a prefix that is not a whole number of bytes keys
correctly. An IPv6 NIC takes its hostname tag from hosttag_for_ipv6_nic:
gethosttag reads an A record and my_if_netmap, which is netstat -rn and prints
IPv4 routes only, so it cannot answer for one.

The IPv4 path is untouched. nic_network_key keeps the arithmetic the caller used,
gethosttag is still asked for an IPv4 NIC, and each test holds an IPv4 case down.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 12:59:53 -03:00
Daniel Hilst 0373cd6568 fix(xcat-core): discovery cannot resolve an IPv6 findme and never calls an IPv6 node back
A node that sends its findme request over IPv6 is never discovered. Two
steps fail.

seqdiscovery.pm reads the arp(8) table to turn the client address into a MAC
and looks that MAC up in the mac table. arp(8) prints the IPv4 table only, so
the table holds no row for the client and the plugin logs "Could not find mac
of the <address>" and returns. aaadiscovery.pm, profilednodes.pm, blade.pm and
hpblade.pm carry the same parse. All five interpolate the address into a
regular expression as well, so a dot matches any character and 192.168.201.1
matches the row of 192.168.201.120.

nodediscover.pm then opens a TCP connection to the node to send "restart",
and NetworkUtils::send_tcp_msg does the same for its callers. Both build the
socket with IO::Socket::INET, which has no AF_INET6, so the node receives
nothing and Genesis exits on DISCOVERY_TIMEOUT after 36 attempts.

NetworkUtils gains mac_from_neighbour_table, which takes the text of a
neighbour table and the address and returns the MAC; neighbour_table_text,
which reads arp(8) for IPv4 and "ip -6 neigh show" for IPv6; and
mac_of_neighbour, which joins them. The addresses are compared after both
are normalized, so 2001:db8::2 and its full form are one address. The five
plugins call mac_of_neighbour. open_tcp_socket opens the callback through
IO::Socket::INET6 when it is installed and keeps IO::Socket::INET as the
fallback, the way credentials.pm already does; nodediscover.pm and
send_tcp_msg use it.

networkutils_neighbour_mac.t and networkutils_tcp_callback_family.t fail
without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:44:41 -03:00
Vinícius Ferrão 48d774dfee feat(nodediscover): set netboot=ipxe on discovered x86 nodes
A discovered x86 node without an x86 method got netboot=xnba, which
names the xNBA loader that xCAT retires. It now gets netboot=ipxe, the
method of the upstream iPXE loader that discovery itself uses. A node
that already has pxe, ipxe or xnba keeps it.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão bd87aa9ed9 feat(nodediscover): default discovered riscv64 nodes to grub2
Discovery left noderes.netboot untouched for any architecture outside
x86, ppc and armv7l, so a discovered riscv64 node had no boot method and
nodeset failed to find a plugin for it.

Move the default-netboot ladder into _default_netboot(), which returns
the method to set or undef, and teach it that riscv64 nodes boot through
UEFI and grub2. The existing x86, PowerNV, ppc and onie rules are
unchanged; aarch64 is deliberately left as it was. The platform of the
discovery request is only read when the request carries it, so a node
that reports none does not gain the key, which would end up stored as
discovery data.
2026-09-01 10:50:19 -03:00
ertaozh 43a8280eac Only update switch/port information for mtms based discovery 2018-08-30 02:04:57 -04:00
GONG Jie 9810da03b6 Remove trailing spaces in file xCAT-server/lib/xcat/plugins/nodediscover.pm 2017-12-31 23:59:59 +00:00
yangsbj a07ee82026 nodediscover.pm: print error message when failed to open socket to 3001 port of the node under discovery 2018-08-10 05:57:09 -04:00
Thilo Maurer 2db3d143c1 fix typo in informational message 2018-08-09 17:25:59 +02:00
zet809 8b21219cba fix issue 2306: Need to clean up the temporary xCAT node during discovery regarding rcons (#5373)
* fix issue 2306: Need to clean up the temporary xCAT node during discovery regarding rcons, add "makegocons -C" to cleanup all undefined node

* fix issue 2306: replace cleanup with delete entry for specified node
2018-07-05 15:53:37 +08:00
Bin Xu b962479353 Fix the issue: Failed to discover nodes as the discovery method is set to udef by wrong (#4860)
- zvmdiscovery plugin will not handle findme
 - not change request if no temp discovered bmc nodes, to avoid the confusing error message
 - add more logs, and ignore the `ipmitool sol info` error output
2018-03-01 15:20:25 +08:00
zet809 f816d95799 enhance nodediscovery process: don't write "NOIP" if the node can not be resloved to an IP (#3995)
* enhance nodediscovery process, if only 1 mac and have \*NOIP\* append, don't write mac table and don't generate dhcp lease entry

* Enhance PR 3995: enhance nodediscovery process: don't write "NOIP" if the node can not be resloved to an IP
2017-11-16 21:07:45 -06:00
Samveen 0d924af0fe dodiscovery: better disksize - ordered by major,minor and no \n (#4219)
* better disksize: ordered by major,minor and no `\n`

* nodediscover:`disksize` sent correctly: no need to `split`,`join`

* general sort with explicit key columns, fix search pattern

* dodiscovery: Fix bugs

* dodiscovery: Fix ShellCheck SC2007,SC2004

* dodiscovery: simpler kcmdline parsing, disksize as IEC binary prefix
2017-11-16 01:49:54 -06:00
immarvin e0ec727564 fix issue switchtype didn't set for cumulus switch after discover #3976 2017-09-21 04:35:46 -04:00
XuWei be81e218c6 Fix issue 3951, rm all bmc nodes when discovered 2017-09-19 04:51:48 -04:00
immarvin ce8bb55e1d switch based node discovery enhancement: 1)obtain mac table from cumulus switch via ssh;2)remove unnecessary sleep 2 after node discovery 2017-09-12 04:35:56 -04:00
ertaozh c03ebcf340 Modify the spell error for the log when no ip address can be resolved for the pre-defined node 2017-09-01 00:54:38 -04:00
ertaozh 5f57e0d3de add log for hardware discovery when no ip address can be resolved for the pre-defined node 2017-08-29 04:37:43 -04:00
immarvin 02fa80fba3 fix issue dodiscovery sending findme packet 4 times for each node #3408 2017-08-04 03:20:49 -04:00
immarvin 65d882b990 add cumulus discover script 2017-06-22 22:30:35 -04:00
XuWei e03a047717 modified depending on comments 2016-09-27 02:32:19 -04:00
XuWei 5c17670c9e fix issue 1504 & 1854, modified discovery messages 2016-09-22 03:07:10 -04:00
Casandra Qiu 95fecae314 BMC temp nodes are not deleted after compute node discovered 2016-09-15 16:34:44 -04:00
zet809 91954591ed To support more than 1 nics connect to the install network (#1613) 2016-08-02 14:44:18 +08:00
ertaozh 4efa05ddb5 Deal with hostname which is alias of the predefined node 2016-07-31 22:58:47 -04:00
ertaozh 13fa0118b6 Deal with the scenario that more than 1 nic connecting to the provisioning network 2016-07-28 04:31:31 -04:00
Mark Gurevich 0a3fbd8d51 perltidy all perl files 2016-07-20 11:40:27 -04:00
Victor Hu bf80c45c01 Fix some wording in the log messages during discovery.
Simplify the messages so that it does not take up too many lines in the log file
2016-07-18 15:54:13 -04:00
ertaozh ba01665adb refine hardware discovery framework, modifcation based on review comments 2016-06-27 02:51:09 -04:00
ertaozh d4a8bc6b6a fix issue 1115: Don't run rspconfig after hardware discovery finished for servers Other than S822L(TLT) 2016-05-19 04:36:18 -04:00
Jarrod Johnson b8824410f3 Revert afflicting 'cleanup' on x86 nodediscover
When doing node discovery, the 'cleanup' would tremendously
slow down most environments.  This cleanup is not needed, and
so I am relegating it to POWER only again.
2016-05-09 14:31:28 -04:00
XuWei e47447bc1e Make genesis to include bmc ip in the findme package 2016-04-01 02:15:43 -04:00
ertaozh 861164068b add flag -t for bmcdiscovery to generate a temp bmc node 2015-11-01 21:31:32 -05:00
GONG Jie ce9430d280 Fix sourceforge bug #4691 Use a consistent log tag for xCAT log 2015-07-02 14:58:53 +08:00
ertaozh b30aa848a1 Support SNMPv2c for Juniper switch for switch based hardware discovery, format the output of disk info 2015-06-08 03:42:39 -04:00
ertaozh ec067311ef support hardware discovery for non-pbmc node defined 2015-06-04 05:48:25 -04:00
ertaozh f844701198 fix bug 4555 lsslp -s PBMC does not honor -n flag, need to update nodetype attribute for predefined node after discoveried 2015-04-01 23:17:20 -04:00
mellor 5576b8b1f4 enhance for finding bootnic in genesis 2014-09-22 20:37:29 -07:00
mellor f39c0f46a1 enhance for MTM based p8 hardware discovery 2014-09-22 19:11:16 -07:00
mellor 42b0f43780 support mtms based hardware discovery 2014-09-11 02:38:47 -07:00
linggao 1e3062d8e4 Changed table name from capacity to hwinv. 2013-12-19 22:39:50 -05:00
linggao 2f17a10f92 added capacity table to store cpu, memory and disk sizes for nodes 2013-12-19 08:25:41 -05:00
lissav e1c55be4ff defect 3844 2013-10-18 07:50:22 -04:00
daniceexi 171c5a189f defect 3660: display the correct message when run nodediscoverdef command defines a request a node which has not correct IP.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16855 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-07-01 09:11:24 +00:00
daniceexi afa886e729 fix the issue that nodediscoverdef -u -n command cannot move the discovered node to next destiny. And also formatted the indention that replace the tab with four space
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16590 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-06-08 23:39:06 +00:00
daniceexi 3faab403aa Update the code that get the correct switch infor for the install nic
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15964 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-04-12 08:09:37 +00:00
daniceexi 89f238f5cd move the switch info update and nodediscoverydata update before the final communication for restart to avoid the sock missing
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15859 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-04-08 06:36:07 +00:00
daniceexi 2d9139705f Code drop for sequential discovery support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15758 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-04-01 10:32:07 +00:00
zhaoertao 40e144b4cc for item: clean up Utils.pm, the code in xCAT-server/lib/xcat/plugin/
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13467 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-08-09 04:07:40 +00:00
jbjohnso 52e04c5a47 Pull in vpd.uuid on node discovery
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11529 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-10 02:23:01 +00:00