fix: Keel screens follow the appliance manifest, and fit 80x24 #19
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/confconsole!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/menus-from-the-manifest"
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?
The maintainer's review of the Keel Web step 8 image on Proxmox: Database mode on an appliance with no database, WireGuard in the first menu of a simple installation, a Keel Cloud screen asking for a key nobody can generate yet, and menu descriptions cut at the box edge.
What changes
Menus from the manifest (decision 0041).
keelmenu.pyreadsappliance.nameandinstallation.modefrom the spec and asks keel to resolve the chain (keel.manifest.facts.gather, the resolution behindkeel manifest show --resolvedandkeel spec validate), so confconsole holds no second copy of the rules.mariadborpostgresqldata service is in the chain (an overlay thatprovidesit, or an application service). Not on Keel Core or Keel Webwireguardis in the chain; in the Instance menu incloud_simple/cloud_advancedor once the spec enables or configures the overlay, otherwise behind a new Advanced entry/etc/keel/cloud-endpointholds an endpoint; hidden by defaultA chain that cannot be read (no keel, no manifests as on pre-0041 images such as the WordPress templates, no
appliance.name) keeps the screens as before, the overlay behind Advanced.Keel Cloud gated. The Instance entry is hidden, run by name it says Keel Cloud is not available, and
keelfirstboot.py cloud, which inithooks'80keel-cloudruns, asks and stores nothing (keel-init and a preseededHUB_APIKEYincluded). The screen, its tests and the first boot step stay; writing/etc/keel/cloud-endpointturns them on. inithooks is not changed:80keel-cloudonly callskeelfirstboot.py cloud, which carries the gate, so there is nothing to merge after inithooks keel17.Nothing cut at 80x24.
keelfit.py: a menu is as wide as its widest choice or text line, a message box as its text, both up to what the terminal leaves (keelbanner.available), so no box is drawn over the backtitle; an item is shortened with an ellipsis only past the full width. Show drift stacks its table two lines a field when it is wider than the box (every row wrapped in two at 80 columns). The overlay screen lists one line a peer, at most three, so its menu keeps its rows (two peers drew the menu over its buttons). The Keel descriptions were shortened and a test holds every Instance menu to 80 columns.Overlay address wording. The Address form says the suggestion is this node's address on Keel's private mesh, randomly generated, not a LAN address; the first node keeps it, the others take
::2,::3on the same /64; the port is the UDP port the other nodes reach.Found, not changed here
The installed overlay manifests name screens confconsole does not ship:
wireguard.yamlhasscreen: /usr/lib/confconsole/plugins.d/Networking/wireguard.py(the screen isInstance/Overlay_network.py) andcrowdsec.yamlhasSecurity/crowdsec.py(no CrowdSec screen exists). The rules here key on the overlay and the engine, not on that path.Test plan
set -o pipefail; coverage run --branch -m pytest tests: 789 passed, 7 skipped; 100 percent lines and branches over the measured package, which gainskeelfitandkeelmenu; with keel's library on the path 796 passed (the real-resolution tests run)keelmenu.machine()resolves web (core, web) and core with no data engine;keelfirstboot.py cloudskips with and without_TURNKEY_INITcloud_simple(Overlay in the menu), Keel Cloud with the flag on, and run by name with it offReview follow-ups (
9d80eda,1f96eb9)/etc/keel/cloud-endpointmust hold onehttpsURL with a host (bracketed IPv6 allowed), in a root-owned regular file not writable by group or others; anything else keeps Keel Cloud hidden and is logged. Format in docs/Instance.rst.keelfitnever passes dialog a size of 0 (tested at 8 columns).database.server, and for Redis: the engines are one set,keelmenu.DATA_ENGINES = {"mariadb", "postgresql", "redis"}.primary/replicafor Redis (and PostgreSQL) butkeel spec applyconverges MariaDB only (system/database.pyreturns a note for any other engine), and keel-redis's boot test expectsstandaloneonly. So Redis gets Database mode > Standalone, no Cloud submenu, and the first boot asks it no role. PostgreSQL loses the Cloud submenu for the same reason. Adding an engine toREPLICATING_ENGINESturns it on once keel applies it.