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>
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>
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>
- 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