builder
user on our semi-ephemeral netbooted x86_64-linux
builders should have a static UID
#224
Labels
No labels
Compat/Breaking
Difficulty
Architectural
Difficulty
Easy
Difficulty
Hard
Help Wanted
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Security
Status
Abandoned
Status
Blocked
Status
Need More Info
Status
Postponed
Tracking Issue
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: the-distro/infra#224
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Our netbooted
x86_64-linux
hydra builders have a persistent local ssd mounted at/mnt
that is owned by a user calledbuilder
.When rebooting the UID of this user can change. E.g. I've seen it jump from
993
to999
, causing Hydra to fail withWe should set
uid
inusers.users.builder = {
isSystemUser = true;
group = "nogroup";
home = "/var/empty";
shell = "/bin/sh";
openssh.authorizedKeys.keys = [
# Do not hardcode Hydra's public key, selectively
# add the keys of the coordinators that require us.
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAvUT9YBig9LQPHgypIBHQuC32XqDKxlFZ2CfgDi0ZKx"
];
};
and
chown
the store once (chown --from=993 999 ...
).I think it might be good to define fixed UIDs for everything; in my personal infra I use this module (to get uids consistent across all machines as well):
I use ranges from 2000 up to reduce the likelihood of collisions with other mechanisms that assign UIDs, and use the thousands column to distinguish various "types" of user.
At some point I'll probably add an assertion that prevents any null uids in my configs, because I feel like the stateful assignment logic will often end up coming with surprises.
Maybe we want this for forkos infra too?