Files
ilker 37e400acb3 hpcod: put the cluster user in the node image, so its name resolves
A job ran as uid 1001 on a compute node where uid 1001 had no name.
`whoami` failed, `id -un` failed, and anything that resolved a username
broke. The home directory worked, which is what made it look fine: /home
is NFS and the uids matched, so files landed in the right place while the
account they belonged to did not exist on the machine writing them.

The cause was ordering. wwctl image syncuser writes the head's accounts
into the image chroot, and it ran in the Slurm role - after node_image had
already compiled the image. The account reached the chroot and never the
nodes. In the template build it was worse: golden.yml runs slurm before
node_image, so it was syncing users into an image that had not been
imported yet.

The user is now created in the common role, install-tagged, and syncuser
moved into node_image between the import and the build. It touches the
chroot, so the staleness gate sees it and compiles - which is the gate
working as intended rather than a special case. Both happen at template
time, and it is the same account on every tenant, so a tenant pays
nothing: provisioning still measured 138s.

Copying /etc/passwd into an overlay would have been the faster-looking
fix and the wrong one. The image has its own system accounts at its own
uids; syncuser merges, and overwriting would have replaced them.

Measured on a node in a cold-provisioned tenant:
  uid=1001 name=hpcuser whoami=hpcuser
against `name=id: cannot find name for user ID 1001` before.

This is a single-user fix, not multi-user support. Per-person identity in
the portal and per-user accounting are deliberately not here.
2026-09-20 20:01:05 +02:00
..