2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-12-03 07:37:05 +00:00
Commit Graph

44 Commits

Author SHA1 Message Date
Daniel Hilst 0e9e723a23 fix(xcat-core): a node found by sequential discovery gets no DHCPv6 reservation
findme assigned a node and recorded its MAC, its address, its BMC, its position,
its groups and its chain, and never recorded the UUID the request carries.
dhcp6_client_duids builds the DHCPv6 identity of a node from vpd.uuid, so
makedhcp fell back to a DUID-LL derived from the MAC. None of the three boot
stages sends a DUID-LL, so the reservation matched nothing and the node kept an
address from the pool, which xcatd cannot map back to it. The node is discovered
and then cannot be provisioned at the address it was given.

findme now records the UUID through xCAT::DiscoveryUtils::vpd_attribs_from_findme,
which takes the SMBIOS form only. The OpenEmbedded image synthesises
"<machine type>-<serial>-<first mac>" when the firmware reports no product_uuid,
and a DUID built from that string would match no client either.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 11:19:28 -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
Daniel Hilst Selli 4780ba9400 fix: Fix genesis loop where osimage value grows at each boot
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-02-26 13:54:56 -03:00
Markus Hilger 2643c1edd6 Remove useless executable bit 2024-05-07 16:19:25 +02:00
GONG Jie 7ff239b045 Remove trailing spaces in file xCAT-server/lib/xcat/plugins/seqdiscovery.pm 2017-12-31 23:59:59 +00: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
Chuck Brazie c012b45ec1 Merge branch 'master' into ZVM_XCAT_DEV 2017-10-03 09:44:06 -04:00
XuWei be81e218c6 Fix issue 3951, rm all bmc nodes when discovered 2017-09-19 04:51:48 -04:00
Samveen Gulati ecc6af989b Add single space between MTM and serial 2017-09-15 00:09:37 +00:00
Samveen Gulati 5216f62d4b Fix #3904 : Add ability to list discoverydata by type mtms 2017-09-15 00:06:32 +00:00
Chuck Brazie 6cc13a216c Update seqdiscovery.pm 2017-08-28 08:49:21 -04:00
Chuck Brazie 60e668a110 Update seqdiscovery.pm 2017-08-14 11:21:01 -04:00
Chuck Brazie e9029f484f Merge branch 'master' into ZVM_XCAT_DEV 2017-08-09 09:31:22 -04:00
XuWei 4d54889a36 Task 3406, add BMC MAC in bmcdiscover and discovery process 2017-07-21 03:39:01 -04:00
Chuck Brazie dff6c298fa Remove double quote
Change-Id: I73cf4db54f5c9ede7d29be8acb04fe733ecb075b
2017-02-23 14:54:32 -05:00
Chuck Brazie 5a83bf5e63 Merge our code with global xCAT team except for xcatws.cgi
Change-Id: I945c430685fa2febd914be09f6a6f976783abeec
2017-02-02 14:31:27 -05:00
penguhyang a49db1c4ff fix nodediscoverls output limits serial length (#2032) 2016-11-02 10:45:26 +08:00
Mark Gurevich db9a71750e Fix sytax errors reported by perltidy 2016-07-25 08:56:18 -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 e80517eb6e modify the pattern for xcat.discovery.xxx from MTMS to mac address 2016-07-06 06:20:18 -04:00
ertaozh 42d3deea44 fix issue 1462: bmcsetup hang after commencing transmit of discovery packets 2016-07-04 02:23:41 -04:00
ertaozh ba01665adb refine hardware discovery framework, modifcation based on review comments 2016-06-27 02:51:09 -04:00
ertaozh 75bc7d91f4 refine hardware discovery framework, put mtms based hardware discovery to typemtms.pm module 2016-06-24 01:58:34 -04:00
Samveen Gulati f392ead7b9 nodediscoverls: Revert reduction of UUID field. Leave serial at 13 2015-08-13 13:58:13 +00:00
Samveen Gulati 953ccd9b5e nodediscoverls: Reduce UUID width to 37 and increase serial width to 13) 2015-08-13 10:11:20 +00:00
ertaozh 4dd21f1775 fix bug 4555: lsslp -s PBMC does not honor -n flag 2015-02-05 04:35:16 -05:00
mellor 87840527c2 enhance for p8 hardware discovery 2014-09-26 03:55:57 -07:00
lissav 5eaae003d8 defect 4009 support for DB2 2014-05-21 09:17:28 -04:00
ligc 6375fb72ad sequential discovery phase 2: add -n, osimage and -s flags 2013-10-15 16:06:26 +08:00
zhaoertao f78ec64c25 The item of updating pre-defined groups for nodes 2013-08-15 23:56:30 -07:00
daniceexi f485547a4d fixed a typo
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16950 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-07-11 08:31:04 +00: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 43a7d86394 For auto created bmc, add it to hosts.otherinterfaces instead of creating a new entry in the hosts table for bmc individually. That means auto created bmc will not be a individual node.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16612 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-06-12 02:56:50 +00:00
daniceexi 518d0c0b02 Change the code logic that get bmc name from ipmi.bmc instead of using default <node>-bmc. If user uses hostiprange or bmciprange and did not define ipmi.bmc, the default bmc name will be <node>-bmc.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16588 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-06-08 23:31:28 +00:00
daniceexi 0147aa233f support the predefined bmc is set in the hosts.otherinterfaces
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16392 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-22 14:57:01 +00:00
daniceexi c8eadb91df add the nodediscoverdef command
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16309 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-16 08:17:47 +00:00
jbjohnso e1a21649ff Check more directly for location of arp (TODO: stop using arp, use ip neigh)
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16234 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-10 13:29:23 +00:00
xq2005 b13e95a70b arp command location is different between redhat and debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16216 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-08 09:40:02 +00:00
daniceexi e2c745d9ba only set the groups attribute to default value when it was null
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16199 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-07 04:23:39 +00:00
daniceexi 97c4aef241 Change how to get the bmc for a predefined node
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15965 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-04-12 08:10:25 +00:00
daniceexi 1138ab87d4 support the regular expression in the hosts table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15875 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-04-08 08:38:15 +00:00
daniceexi e1c60cb830 add nodediscoverstart -V to display detail free host ips and bmc ips. And make sequential.pm handle the usage display for both sequential and profile discovery
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15840 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-04-06 09:09:08 +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