Skip to content

feat: add db node role#43

Open
dennisklein wants to merge 9 commits intonextfrom
feat/db-role
Open

feat: add db node role#43
dennisklein wants to merge 9 commits intonextfrom
feat/db-role

Conversation

@dennisklein
Copy link
Copy Markdown
Member

Add a db node role that runs MariaDB and slurmdbd for Slurm job accounting.

  • Add RoleDb constant and Slurmdbd config section
  • Generate slurmdbd.conf with MariaDB connection settings
  • Add AccountingStorageType/AccountingStorageHost to slurm.conf when db node present
  • Fix slurmdbd.conf ownership (slurm:slurm) and permissions (0600)
  • Add MariadbReady and SlurmdbdReady readiness probes
  • Enable db services in order: mariadb → init DB → slurmdbd → slurmctld/slurmd
  • Add db role to status health checks and display sort order
  • Support custom slurmdbd configuration via slurm.slurmdbd section

Closes #5

- Add RoleDb constant for the database node role
- Add Slurmdbd Section field to the Slurm config struct
- Validate at most one db node per cluster
- Reject count and managed fields on db nodes
- Add slurmdbd section to fragment validation
- Add Slurmdbd and Mariadb service constants
- Map RoleDb to Slurmdbd in ServiceForRole
- Add GenerateSlurmdbdConf for slurmdbd.conf generation
- Add hasDb parameter to GenerateSlurmConf for accounting directives
- Add hasDbNode helper in resources.go
- Update WriteClusterConfig to pass hasDb to GenerateSlurmConf
- Add MariadbReady probe using mysql connectivity check
- Add SlurmdbdReady probe using systemctl is-active
- Map Slurmdbd and Mariadb services in ForService
- Include mariadb and slurmdbd probes for RoleDb in NodeProbes
- Add RoleDb to NodeRunConfigs (ShortName "db", single instance)
- Add enableDbNode helper for multi-step db startup
  (mariadb → init accounting DB → slurmdbd)
- Update EnableSlurmServices to call enableDbNode for db role
- Generate and write slurmdbd.conf when cluster has a db node
- Use RunContainer for config helper when db present (needed for exec)
- Fix slurmdbd.conf ownership (slurm:slurm) and mode (0600)
- Add slurmdbd section fragment support
- Enable db services (mariadb → init DB → slurmdbd) before other nodes
- Wait for slurmdbd readiness before starting slurmctld/slurmd
- Remaining nodes (controller, workers) start concurrently as before
- Return mariadb and slurmdbd in roleServices for db role
- Add mariadb and slurmdbd cases to GetNodeHealth service checks
- Insert db between controller and submitter in roleSortKey
- Add db role to node roles table and validation rules
- Replace planned section with implemented feature description
- Fix gofmt alignment in test files
- Mark unused parameters with _ (GenerateSlurmdbdConf, test callback)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant