Files
ProxMenux/oci/remote/oci_native_stack.sh
T
MacRimiandClaude Opus 5.5 4437a671d2 ProxMenux 1.2.6.2-beta: OCI containers in the Monitor, docs and fixes
OCI manager Apps
- App tab: containers installed from an OCI image are identified from their
  installation record; the application and image versions are shown and an
  update is detected by image digest; repository link; Refresh data.
- Updates tab for OCI containers: Update and Recreate run the same flow as the
  OCI menu in the Monitor terminal; the pre-update backup can be kept in a
  backup storage; scheduled image updates with an optional minimum age.
- Logs tab: console output of the application, kept on the host
  (lxc.console.logfile + logrotate) and followed live.
- The Proxmox console opens a shell (cmode: shell) when the image has one.
- A damaged image download is fetched again before failing.
- Multi-container applications open at their LAN address; volume mount
  points on block storage report their usage.

Monitor
- Proxmox notifications are delivered to a loopback-only HTTP listener when
  HTTPS is enabled, so they no longer fail certificate verification.
- Log persistence counts recurring patterns only; an ended burst is not
  reported as persistent and its warning clears on its own (#386).
- Proxmox notification config backups are deduplicated and capped at three.
- The update icon on the Apps page opens the container on its Updates tab.
- Version 1.2.6.2-beta and its release notes in every Monitor language.

Docs
- OCI manager Apps and Audit & Report rebuilt as per-page message files,
  with a new page for OCI containers in the Monitor.
- Seven pages fixed where rich-text tags were missing from t.rich.

Translations
- Spanish fixes across the OCI engine, the Monitor and the TUI menus.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 21:51:12 +02:00

43 lines
1.5 KiB
Bash
Executable File

# Sourced by the dedicated installers after image resolution, before CT creation.
oci_native_begin() {
OCI_NATIVE_PRIMARY=$1
shift
local root=/usr/local/share/proxmenux/oci/instances
[[ ! -L $root && ! -L $root/.lock ]] || die "$(translate "The instance registry is not safe")"
oci_quiet install -d -m 0700 "$root"
exec 8>>"$root/.lock"
chmod 600 "$root/.lock"
flock -n 8 || die "$(translate "Another OCI operation is using the instance registry")"
export PROXMENUX_INSTANCE_LOCK_FD=8
oci_quiet python3 "$SCRIPT_DIR/oci_native_stack.py" begin "$OCI_NATIVE_PRIMARY" \
--template "$TEMPLATE_FILE" --deployment "$DEPLOYMENT_FILE" \
--adapter "$0" "$@"
OCI_NATIVE_ACTIVE=1
}
# A failure returns to the caller instead of exiting inside a redirected call,
# so the caller's error report reaches the terminal and not the log.
pct() {
if [[ ${1:-} == unmount && ${OCI_NATIVE_ACTIVE:-0} == 1 ]]; then
if ! python3 "$SCRIPT_DIR/oci_native_stack.py" capture-rootfs "$2"; then
command pct unmount "$2" 8>&- 9>&- || true
return 1
fi
fi
if [[ ${1:-} == create && ${OCI_NATIVE_ACTIVE:-0} == 1 ]]; then
shift
python3 "$SCRIPT_DIR/oci_native_stack.py" create "$@" || return
else
command pct "$@" 8>&- 9>&- || return
fi
}
oci_native_finalize() {
oci_quiet python3 "$SCRIPT_DIR/oci_native_stack.py" finalize "$OCI_NATIVE_PRIMARY"
}
oci_native_failed() {
[[ ${OCI_NATIVE_ACTIVE:-0} == 1 ]] || return 0
oci_quiet python3 "$SCRIPT_DIR/oci_native_stack.py" failed "$OCI_NATIVE_PRIMARY" || true
}