Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dbscreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ def engine_of(console, title: str, server: dict) -> str:
declared = str(server.get("engine") or "")
if declared:
return declared
observed, output, problem = observed_engine()
observed, _, problem = observed_engine()
if problem:
console.msgbox(title, problem)
return ""
if not observed:
console.msgbox(title, f"{NO_ENGINE}\n\n{output}".strip())
# inspect wrote its spec, so what it printed is about other
# fields (a missing fqdn, say), not about the database server
console.msgbox(title, NO_ENGINE)
return observed


Expand Down
15 changes: 15 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
confconsole (2.2.3+keel11) trixie; urgency=low

* Database mode on a machine with no database server says only that:
the screen appended what keel inspect printed on stderr, which is about
other fields, so a Core that had no fully qualified name showed
"Error: inspect: required fields not inferred: instance.fqdn" under
the no-server text (the maintainer's screenshot 045).
* The verdict of a refused keel network confirm (exit 21) no longer says
the change reverts when its window ends: keel refuses for several
reasons, nothing waiting among them, as when another session had
confirmed the change already (screenshot 040). It now reads "not
confirmed: the reason is above", and keel's own line says which.

-- Marcos Méndez <mendez.foto@gmail.com> Fri, 02 Oct 2026 06:00:00 +0000

confconsole (2.2.3+keel10) trixie; urgency=low

* Every screen names Keel Linux. The backtitle read "TurnKey GNU/Linux
Expand Down
6 changes: 4 additions & 2 deletions keelcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@
},
"confirm": {
OK: "confirmed: the network change stays",
NETWORK_NOT_CONFIRMED: "not confirmed: the change reverts when its"
" window ends unless a new session confirms it",
# keel refuses for several reasons, nothing waiting among them
# (another session may have confirmed it already), so the verdict
# repeats none of them and points at keel's own line
NETWORK_NOT_CONFIRMED: "not confirmed: the reason is above",
},
"key": {
OK: "this node's public key; the private key never leaves the"
Expand Down
16 changes: 16 additions & 0 deletions tests/test_database_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,22 @@ def test_a_machine_running_no_database_server_has_no_mode(
assert dbscreen.engine_of(console, "x", {}) == ""
assert "No database server was found" in console.calls[-1][2]

def test_what_inspect_could_not_infer_elsewhere_is_not_shown(
self, keel, tmp_path, monkeypatch
):
"""The maintainer's screenshot 045: inspect wrote its spec, which
names no server, and said on stderr that another field (the fqdn)
was not inferred; that is not why there is no mode to choose"""
inspected = tmp_path / "inspected.yaml"
inspected.write_text(yaml.safe_dump({"version": 1}))
monkeypatch.setattr(dbscreen, "INSPECTED", str(inspected))
keel["answers"] = [(13, "", "Error: inspect: required fields not"
" inferred: instance.fqdn\n")]
console = FakeConsole()

assert dbscreen.engine_of(console, "x", {}) == ""
assert console.calls[-1][2] == dbscreen.NO_ENGINE

def test_an_inspection_that_cannot_be_read_says_so(
self, keel, tmp_path, monkeypatch
):
Expand Down
13 changes: 13 additions & 0 deletions tests/test_overlay_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,19 @@ def test_the_confirm_and_key_verdicts(self):
"confirm", make_result(wgcli.CONFIRM, 0))
assert "not confirmed" in wgcli.command_text(
"confirm", make_result(wgcli.CONFIRM, 21))

def test_nothing_waiting_is_not_called_a_change_that_reverts(self):
"""The maintainer's screenshot 040: another session had confirmed
the change, and the screen said it would revert. keel says why it
refused; the verdict line claims nothing keel did not say."""
nothing = make_result(
wgcli.CONFIRM, 21, "", "Error: no network change is waiting for"
" a confirmation; the last one, of /etc/wireguard/wg0.conf, was"
" reverted\n")
text = wgcli.command_text("confirm", nothing)
assert "not confirmed" in text
assert "reverts when" not in text
assert "the reason is above" in text
assert "no public key" in wgcli.command_text(
"key", make_result(wgcli.KEY, 16))

Expand Down
Loading