2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-19 08:52:15 +00:00
Commit Graph

19 Commits

Author SHA1 Message Date
Daniel Hilst e3429791c6 fix(xcat-core): getpostscript serves a node's postscripts to a password or token login
With nodeauthentication off and no peer name, getpostscript used
_xcat_authname as the client identity and expanded it with noderange.
becomeuser and tokens set _xcat_authname to an account name, so a user
named after a node group received the postscripts of the first node in
that group.

xcatd now records the CN of the validated client certificate as
_xcat_certname, and only while no becomeuser or token replaced it. It
deletes any _xcat_certname the client sent. getpostscript uses that
name only when it names exactly one node, with no group or range
expansion. _xcat_authname is no longer a candidate.

getpostscript_client_identity.t drives the plugin with these requests.
On the previous head the group and node login checks fail, and
dropping the exact match fails the group and range checks.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-29 14:41:25 -03:00
Daniel Hilst d6392081db docs(xcat-core): the getpostscript comment retells an incident
The comment carried a date, a node, and the request counts from one run. The code
standard keeps bug history out of source comments: the fact a reader needs is that
the peer host is a reverse lookup and can be empty, which the remaining two sentences
state.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:02:47 -03:00
Daniel Hilst 6dfcdcbc48 fix(xcat-core): getpostscript serves no node when the management node cannot reverse-resolve it
A diskless openEuler 22.03sp4 node netbooted, took a lease, reached a login
prompt and answered ping, and then every xdsh and ssh answered
"root@xcat59-cn: Permission denied (publickey)" while the node never reported
"booted". reg_linux_diskless_installation_flat failed after 7072 s.

xcatd on that management node logged "xCAT: Allowing getpostscript xcat59-cn"
with no "from <peerhost>", then "Received malformed getpostscript requesting,
ignore it." -- 100 times, with 0 "Sending scripts data" in the whole log. The
green openEuler 24.03sp4 cell beside it logged 3 sends and 0 malformed. The
client certificate named the node correctly; only the reverse lookup of the
peer socket failed.

getpostscript read _xcat_clienthost and nothing else, so it dropped every
request. No postscript ran: remoteshell never installed root's
authorized_keys, which is the ssh failure, and nothing updated node status,
which is the stuck "powering-on". One cause, both symptoms.

process_request now tries each name xCAT::DiscoveryUtils::request_client_names
offers and takes the first that correlates to a node. A request that offers no
name at all, and one whose names correlate to nothing, are now reported as what
they are; the old message said the request was malformed, which sent two
investigations into DNS and the netboot image.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-24 11:28:41 -03:00
Bin Xu cb25622331 It is for provision log enhancement and partial address #4582 (#4648)
- clear logs in the key components during provisioning (not only debug mode, but debug mode will have more logs)
 - now only cover rhel7 stateful and stateless
 - make more syslogs into cluster.log (tag = xcat or xcat.*)
 - the changes will not impact other distro
2018-01-23 03:20:42 -06:00
Mark Gurevich 0a3fbd8d51 perltidy all perl files 2016-07-20 11:40:27 -04:00
GONG Jie ca4437270a Fix sourceforge bug #4691 Use a consistent log tag for xCAT log 2015-07-01 18:03:36 +08:00
lissav f14b1042d3 defect 3613
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16605 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-06-10 20:02:58 +00:00
lissav 99a88822e3 use new interface to makescript
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16337 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-16 17:07:05 +00:00
lissav 43c5246b1a more postage removal
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16334 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-16 16:04:57 +00:00
lissav 748b4ee78c first update for enhance precreatemypostscript handling, more todo
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16321 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-16 13:56:17 +00:00
bp-sawyers 3cf4f8f448 Fixed error msg when getpostscript.pm can match node name, to show original name
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14924 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-01-18 22:22:33 +00:00
jbjohnso 00710fc339 Correct previous attempt to conditionally populate scriptcontents. Moving the scope inside the conditional obliterated it from outside
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14914 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-01-17 21:43:27 +00:00
jjhua 30cd2dae59 to be compatible with the old diskless rootimg(s) before xCAT 2.8
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14761 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-01-06 05:36:47 +00:00
jjhua 4d22bb9970 make getpostscript.awk use the template method, instead of the original method
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14393 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-22 02:57:22 +00:00
jbjohnso 83334fb3f5 Have getpostscript work with node x509 auth
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13354 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-07-26 19:31:13 +00:00
vallard 8b91ce3f31 added postage command to show postscripts for node on command line
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8248 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-11-23 19:00:09 +00:00
jbjohnso de597af826 Further move some modules to lower memory
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2903 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-03-14 16:14:29 +00:00
jbjohnso 76b71bac72 -More verbose logging to prevent silent or vague errors
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2048 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-08-20 16:51:06 +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