Update documentation and scripts for revision tracking and cloud-init enhancements</message>
<message>Introduce a revision tracking system across project files, allowing for easier identification of changes. Update the README files to include instructions for bumping revisions and auto-bumping on commits. Additionally, enhance cloud-init scripts with revision comments for better version control. Modify the dashboard API to improve build status management, including a forced clear option for stuck statuses, enhancing user experience and operational reliability.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<!-- Revision: 2 -->
|
||||
# Host-side provisioning scripts
|
||||
|
||||
These files run on the **provisioning host** (e.g. the Proxmox host where the reTerminal is connected via USB).
|
||||
@@ -9,3 +10,23 @@ These files run on the **provisioning host** (e.g. the Proxmox host where the re
|
||||
| **90-cm4-boot-mode.rules** | udev rule: on USB add (vendor 2b8e), run the trigger. Install to `/etc/udev/rules.d/`. |
|
||||
|
||||
See [../docs/EMMC-PROVISIONING-GUIDE.md](../docs/EMMC-PROVISIONING-GUIDE.md) for full setup. The [deploy script](../scripts/deploy-to-proxmox.sh) copies these into place on the Proxmox host and LXC.
|
||||
|
||||
### Stuck “finalizing: Compressing image (xz)…” on the host
|
||||
|
||||
If the dashboard still shows that message, run on the **host** (e.g. `ssh root@10.20.30.152`):
|
||||
|
||||
```bash
|
||||
# 1) See current status and whether build/xz is still running
|
||||
PROV="${CM4_PROVISIONING_DIR:-/var/lib/cm4-provisioning}"
|
||||
cat "$PROV/build_cloudinit_status.json"
|
||||
ps aux | grep -E 'build-cloudinit|xz.*\.img' | grep -v grep
|
||||
|
||||
# 2a) If a build is still running and you want to cancel it
|
||||
touch "$PROV/build_cloudinit_cancel"
|
||||
# Script checks every 2s; after it exits, status will show "cancelled"
|
||||
|
||||
# 2b) If no build process is running but status is stuck, reset to idle
|
||||
echo '{"phase":"idle","message":"","output_name":null,"error":null,"updated":'$(date +%s)'}' > "$PROV/build_cloudinit_status.json"
|
||||
```
|
||||
|
||||
Then refresh the dashboard or click **Dismiss** to clear the message.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Revision: 2
|
||||
# Run on the Proxmox host when build_cloudinit_request.json appears in the provisioning dir.
|
||||
# Downloads Raspberry Pi OS image from URL, injects cloud-init NoCloud files, saves to BACKUPS_DIR.
|
||||
# Uses loop devices and mount (available on host, not in unprivileged LXC).
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Revision: 2
|
||||
# Called by udev when CM4 in boot mode (0a5c:2711 or 2b8e) is connected.
|
||||
# Start the flash service via systemd so it runs under systemd, not udev —
|
||||
# otherwise udev kills the process when the device re-enumerates (first→second stage).
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Revision: 2
|
||||
# Provision CM4 eMMC when reTerminal is connected in boot mode (eMMC disable jumper).
|
||||
# On USB boot device (2b8e) detection: run rpiboot to expose eMMC, then wait for the user
|
||||
# to choose Backup or Deploy in the portal — no auto-flash; action runs only after portal choice.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Revision: 2
|
||||
# Run on the Proxmox host when shrink_request.json appears in the provisioning dir.
|
||||
# Runs PiShrink on the requested backup image (shrink or shrink+compress).
|
||||
# Requires PiShrink on host (scripts/install-pishrink-on-host.sh). Triggered by cm4-shrink.path.
|
||||
|
||||
Reference in New Issue
Block a user