fix: the first boot role screen skips keel inspect without a database server #20

Merged
marcos-mendez merged 2 commits from fix/firstboot-role-without-a-database into master 2026-10-02 12:17:23 -03:00
marcos-mendez commented 2026-10-02 10:50:24 -03:00 (Migrated from github.com)

Companion of Keel-Linux/inithooks (keel17): part of the silent gap the maintainer saw on his Proxmox console after on "Did you save the password?".

On the Web image, 75keel-role runs keelfirstboot.py role, which ran keel inspect to find a database engine the image does not have: 2 s on an LXC container, 7.7 s with a quarter of a CPU, while the password screen stayed up.

find_engine() now checks first whether any server binary of keel's own table (keel.inspect.dbengines.ENGINES, the patterns keel inspect itself globs) exists. If none does, the role stays standalone at once and the journal says why, as before. If the table cannot be imported, keel is asked as before. A declared engine is still used as it is.

Measured on the test VM with the inithooks PR, 0.25 CPU: to Keel Cloud went from 15 s to 7.7 s, with "Configuring keel-role... please wait" on the screen.

Tests (written first)

tests/test_first_boot.py: no server binary means no role and no keel inspect; a binary present, no binary, no table, and a table of another shape. keelfirstboot.py stays at 100 percent.

Test plan

  • CI green (coverage 100, changelog)
  • Web image first boot: role step is immediate; on a MariaDB appliance the role menu still appears
Companion of Keel-Linux/inithooks (keel17): part of the silent gap the maintainer saw on his Proxmox console after <Saved> on "Did you save the password?". On the Web image, 75keel-role runs `keelfirstboot.py role`, which ran `keel inspect` to find a database engine the image does not have: 2 s on an LXC container, 7.7 s with a quarter of a CPU, while the password screen stayed up. `find_engine()` now checks first whether any server binary of keel's own table (`keel.inspect.dbengines.ENGINES`, the patterns keel inspect itself globs) exists. If none does, the role stays standalone at once and the journal says why, as before. If the table cannot be imported, keel is asked as before. A declared engine is still used as it is. Measured on the test VM with the inithooks PR, 0.25 CPU: <Saved> to Keel Cloud went from 15 s to 7.7 s, with "Configuring keel-role... please wait" on the screen. ## Tests (written first) `tests/test_first_boot.py`: no server binary means no role and no keel inspect; a binary present, no binary, no table, and a table of another shape. keelfirstboot.py stays at 100 percent. ## Test plan - [ ] CI green (coverage 100, changelog) - [ ] Web image first boot: role step is immediate; on a MariaDB appliance the role menu still appears
Sign in to join this conversation.
No description provided.