Compare commits

...
3 Commits
Author SHA1 Message Date
parkel cf9ce8e5b6 Merge pull request 'Prepare Coulobre 0.10.1 with panel workflow improvements and web updates' (#135) from feature/panel-follow-up-0.10.1 into main
Coulobre Panel CI / Checks (Python 3.12) (push) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (push) Canceled after 0s
Reviewed-on: #135
2026-11-22 23:06:37 +01:00
parkel b92edc02f5 Quote installer health targets for shell and systemd readers
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-22 23:04:17 +01:00
parkel f50bfbc60d Keep an audit trail for release update attempts
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s
2026-11-22 22:57:08 +01:00
3 changed files with 26 additions and 3 deletions

No files matched your search

+6 -2
View File
@@ -579,8 +579,12 @@ class Installer:
f"amqp://coulobre:{self.state['broker_password']}@127.0.0.1:5672/coulobre"
),
"COULOBRE_LOCAL_DATABASE_PROVISIONING": "1",
"COULOBRE_SERVICE_HEALTH": json.dumps(
{"panel": {"local": services}}, separators=(",", ":")
"COULOBRE_SERVICE_HEALTH": (
"'"
+ json.dumps(
{"panel": {"local": services}}, separators=(",", ":")
)
+ "'"
),
}
if self.php:
+18
View File
@@ -1,5 +1,6 @@
import fcntl
import json
import logging
import os
import shutil
import socket
@@ -16,6 +17,8 @@ from tempfile import TemporaryDirectory
from .release_updates import UpdateError, download_wheel, selected_release
LOGGER = logging.getLogger(__name__)
SOCKET = Path("/run/coulobre-update.sock")
STATE = Path("/var/lib/coulobre-update")
STATUS = STATE / "status.json"
@@ -96,6 +99,14 @@ def publish_status(status, state, message):
os.fsync(directory)
finally:
os.close(directory)
if state != "running":
LOGGER.info(
"Update %s for %s requested by %s. %s",
state,
status.get("target_version"),
status.get("actor"),
message,
)
def display_status():
@@ -453,6 +464,12 @@ def handle_request(peer):
"target_version": request["version"],
"actor": request["actor"],
}
LOGGER.info(
"Update from %s to %s requested by %s.",
installed,
status["target_version"],
status["actor"],
)
try:
hostname = check_installation()
except UpdateError as error:
@@ -465,6 +482,7 @@ def handle_request(peer):
def main():
logging.basicConfig(level=logging.INFO, format="%(message)s")
with socket.socket(fileno=0) as peer:
try:
handle_request(peer)
+2 -1
View File
@@ -1,4 +1,5 @@
import json
import shlex
import stat
import tempfile
import unittest
@@ -69,7 +70,7 @@ class InstallerParametersTests(unittest.TestCase):
"rabbitmq",
]
self.assertEqual(
json.loads(env["COULOBRE_SERVICE_HEALTH"]),
json.loads(shlex.split(env["COULOBRE_SERVICE_HEALTH"])[0]),
{"panel": {"local": base + extras}},
)