From 4a578d623cb586d84efcdbda2708d469f84444c8 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Thu, 15 Oct 2026 15:25:37 +0200 Subject: [PATCH 1/2] Say the same thing on both hosts while a container is created The Incus backend narrated steps Proxmox does silently (hostname, IP, functions pushed, starting/completed), and each side had its own words for storage, image and start. Runtime messages now say "container"; LXC stays in headers. The IPv6 line is informational and uses ping -6 where ping6 does not exist. --- incus/backend.func | 31 ++++++++++--------------------- lxc/install.func | 16 ++++++++-------- pve/backend.func | 26 ++++++++++---------------- 3 files changed, 28 insertions(+), 45 deletions(-) diff --git a/incus/backend.func b/incus/backend.func index 896344d..8e5e2b9 100644 --- a/incus/backend.func +++ b/incus/backend.func @@ -240,7 +240,6 @@ incus_validate_storage_space() { msg_custom "ℹ️" "${YW}" "Grow: incus storage set ${pool} size=50GiB | Or pick another pool" return 0 fi - msg_ok "Storage space validated (${pool}: ~${free_gb}GB free)" } resolve_storage_preselect() { @@ -345,17 +344,15 @@ incus_create_lxc_container() { if resolve_storage_preselect container "${CONTAINER_STORAGE:-}"; then STORAGE_POOL="$STORAGE_RESULT" - msg_ok "Storage ${BL}${STORAGE_POOL}${CL} (${STORAGE_INFO}) [Container]" elif [[ -z "${CONTAINER_STORAGE:-}" ]]; then select_storage container && STORAGE_POOL="$CONTAINER_STORAGE" - msg_ok "Storage ${BL}${STORAGE_POOL}${CL} [Container]" else STORAGE_POOL="${CONTAINER_STORAGE}" fi msg_info "Validating storage '${STORAGE_POOL}'" incus storage info "$STORAGE_POOL" &>/dev/null || { msg_error "Storage pool '${STORAGE_POOL}' invalid"; exit 213; } - msg_ok "Storage '${STORAGE_POOL}' validated" + msg_ok "Storage '${STORAGE_POOL}' validated${STORAGE_INFO:+ - ${STORAGE_INFO}}" if ! incus network show "${BRG}" >/dev/null 2>&1; then msg_warn "Network '${BRG}' not found, auto-selecting fallback" @@ -367,10 +364,10 @@ incus_create_lxc_container() { local image_name="" if _incus_resolve_launch_image; then image_name="${INCUS_LAUNCH_IMAGE}" - msg_ok "Image ${BL}${image_name}${CL}" + msg_ok "Image ${BL}${image_name}${CL} (cached)" else image_name="${INCUS_LAUNCH_IMAGE:-images:${IMAGE_OS}/${IMAGE_VERSION}}" - msg_custom "ℹ️" "${YW}" "Image not cached yet — will try pull: ${image_name}" + msg_custom "ℹ️" "${YW}" "Image ${image_name} not cached, pulling" fi msg_info "Creating LXC Container" @@ -478,7 +475,7 @@ incus_create_lxc_container() { fi fi - msg_ok "LXC Container ${CT_NAME} was successfully created." + msg_ok "Container ${CT_NAME} created" msg_info "Waiting for container to initialize" local waited=0 @@ -487,7 +484,7 @@ incus_create_lxc_container() { waited=$((waited + 2)) [[ "$waited" -ge 60 ]] && { msg_error "Container not ready"; exit 1; } done - msg_ok "Container ${CT_NAME} is ready" + msg_ok "Container started" incus_set_container_hostname @@ -559,7 +556,6 @@ incus_set_container_hostname() { hn=$(echo "$hn" | tr '[:upper:]' '[:lower:]' | tr -d ' ' | tr '_' '-') [[ -z "$hn" ]] && return 0 - msg_info "Setting hostname to ${hn}" _incus_soft incus config set "${CT_NAME}" "user.hostname=${hn}" >>"${LOGFILE:-$INCUS_BUILD_LOG}" 2>&1 # Prefer instance name for system hostname when UI used CT_ID as name local sys_hn="${CT_NAME}" @@ -578,7 +574,7 @@ incus_set_container_hostname() { fi fi " >>"${LOGFILE:-$INCUS_BUILD_LOG}" 2>&1; then - msg_ok "Hostname set to ${sys_hn}" + : else msg_warn "Could not set the hostname inside ${CT_NAME} (see the log)" fi @@ -874,7 +870,7 @@ incus_configure_device_passthrough() { } incus_wait_for_network() { - msg_info "Waiting for network in LXC container" + msg_info "Waiting for the container network" local net_type="" max_wait=40 net_type=$(incus network show "${BRG:-}" 2>/dev/null | awk '/^type:/ {print $2; exit}') @@ -917,9 +913,8 @@ incus_wait_for_network() { msg_warn "Network configured (IP: $ip_in_lxc) but connectivity test failed" echo -e "${YW}Container may have limited internet access. Installation will continue...${CL}" else - msg_ok "Network in LXC is reachable (ping)" + msg_ok "Network reachable (${ip_in_lxc})" fi - msg_ok "IP set to ${ip_in_lxc}" export IP="$ip_in_lxc" } @@ -973,7 +968,7 @@ incus_set_root_password() { } incus_customize_container() { - msg_info "Customizing LXC Container" + msg_info "Customizing container" ARCH="$(dpkg --print-architecture 2>/dev/null || uname -m)" if [[ "${var_os:-debian}" == "alpine" ]]; then @@ -1032,7 +1027,7 @@ EOF" fi incus_set_root_password - msg_ok "Customized LXC Container" + msg_ok "Container customized" } incus_setup_motd_pve_style() { @@ -1058,11 +1053,9 @@ MOTDEOF _incus_push_functions_and_run_install() { # Sets INCUS_LAST_INSTALL_EXIT (do not capture stdout — msg_* writes there). INCUS_LAST_INSTALL_EXIT=0 - msg_info "Pushing functions to container" incus_ct_exec bash -c "cat > /tmp/incus-functions <<'INNEREOF' ${FUNCTIONS_FILE_PATH} INNEREOF" >>"${LOGFILE:-$INCUS_BUILD_LOG}" 2>&1 || { msg_error "Failed to push functions"; exit 1; } - msg_ok "Functions pushed" if [[ "${DNS_RETRY_OVERRIDE:-}" == "true" ]]; then msg_info "Applying DNS override inside LXC" @@ -1075,7 +1068,6 @@ INNEREOF" >>"${LOGFILE:-$INCUS_BUILD_LOG}" 2>&1 || { msg_error "Failed to push f # prompts - the spinner kept redrawing over them, which is why Immich's # machine-learning menu could not be read and the keystroke landed in the # spinner line. A static line, and the script owns the terminal from here. - msg_custom "🚀" "${GN}" "Starting application installation" local _install_script _run_env lxc_exit=0 install_exit_code=0 # Checked here: inside $(...) below, stdout is the capture pipe, never the terminal. local _incus_tty_out=0 _incus_tty_in=0 @@ -1174,7 +1166,6 @@ _incus_build_combined_log() { } incus_run_install_script_with_recovery() { - msg_info "Preparing installation" incus_log_section "Application Installation: ${APP}" declare -f start_install_timer &>/dev/null && start_install_timer || true @@ -1186,7 +1177,6 @@ incus_run_install_script_with_recovery() { local install_exit_code="${INCUS_LAST_INSTALL_EXIT:-1}" if [[ "$install_exit_code" -eq 0 ]]; then - msg_ok "Installation completed" CONTAINER_INSTALLING=false INCUS_BUILD_OK=1 export INCUS_BUILD_OK @@ -1494,7 +1484,6 @@ incus_build_container() { _incus_prepare_install_exports if [[ -n "${CONTAINER_STORAGE:-$STORAGE_POOL}" ]]; then - msg_info "Validating storage space" incus_validate_storage_space "${CONTAINER_STORAGE:-$STORAGE_POOL}" "${DISK_SIZE}" || true fi diff --git a/lxc/install.func b/lxc/install.func index 3ab5395..aa62030 100644 --- a/lxc/install.func +++ b/lxc/install.func @@ -1270,14 +1270,14 @@ network_check() { msg_error "IPv4 Internet Not Connected" fi - # Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers. - if command -v ping6 &>/dev/null; then - if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then - msg_ok "IPv6 Internet Connected" - ipv6_connected=true - else - msg_error "IPv6 Internet Not Connected" - fi + # Debian's iputils no longer ships a ping6 binary; and missing IPv6 is not an error. + local _ping6="ping6" + command -v ping6 &>/dev/null || _ping6="ping -6" + if $_ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || $_ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || $_ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then + msg_ok "IPv6 Internet Connected" + ipv6_connected=true + else + msg_custom "ℹ️" "${YW}" "No IPv6 Internet (IPv4 is enough)" fi # If both IPv4 and IPv6 checks fail, prompt the user diff --git a/pve/backend.func b/pve/backend.func index c6bd081..24e7f23 100644 --- a/pve/backend.func +++ b/pve/backend.func @@ -621,7 +621,6 @@ $PCT_OPTIONS_STRING" # Validate storage space only if CONTAINER_STORAGE is already set # (Storage selection happens in create_lxc_container for some modes) if [[ -n "$CONTAINER_STORAGE" ]]; then - msg_info "Validating storage space" if ! validate_storage_space "$CONTAINER_STORAGE" "$DISK_SIZE" "no"; then local free_space free_space=$(pvesm status 2>/dev/null | awk -v s="$CONTAINER_STORAGE" '$1 == s { print $6 }') @@ -630,7 +629,6 @@ $PCT_OPTIONS_STRING" msg_error "Not enough space on '$CONTAINER_STORAGE'. Required: ${DISK_SIZE}GB, Available: ${free_fmt}" exit 214 fi - msg_ok "Storage space validated" check_storage_health "$CONTAINER_STORAGE" "$DISK_SIZE" fi @@ -948,7 +946,7 @@ EOF # START CONTAINER AND INSTALL USERLAND # ============================================================================ - msg_info "Starting LXC Container" + msg_info "Starting container" # Checked, and with its own code. Unchecked, a failure here surfaced as pct's # generic 255 -- which the exit table reads as DPKG's fatal error, so 197 runs # across 70 apps in a fortnight were filed as a package manager problem when @@ -963,7 +961,7 @@ EOF # Wait for container to be running for i in {1..10}; do if pct status "$CTID" | grep -q "status: running"; then - msg_ok "Started LXC Container" + msg_ok "Container started" break fi sleep 1 @@ -978,7 +976,7 @@ EOF # Wait for network (skip for Alpine initially) if [ "$var_os" != "alpine" ]; then - msg_info "Waiting for network in LXC container" + msg_info "Waiting for the container network" # Wait for IP assignment (IPv4 or IPv6) local ip_in_lxc="" @@ -1025,7 +1023,7 @@ EOF if [ "$ping_success" = false ]; then msg_warn "Network configured (IP: $ip_in_lxc) but connectivity test failed - installation will continue" else - msg_ok "Network in LXC is reachable (ping)" + msg_ok "Network reachable (${ip_in_lxc})" fi fi # Function to get correct GID inside container @@ -1064,7 +1062,7 @@ EOF sleep 3 fi - msg_info "Customizing LXC Container" + msg_info "Customizing container" set +Eeuo pipefail trap - ERR @@ -1372,7 +1370,7 @@ PROFILE fi if [[ $install_exit_code -eq 0 ]]; then - msg_ok "Customized LXC Container" + msg_ok "Container customized" if [[ "${DNS_RETRY_OVERRIDE:-false}" == "true" ]]; then msg_info "Applying DNS retry override in LXC (8.8.8.8, 1.1.1.1)" @@ -2885,24 +2883,20 @@ create_lxc_container() { if resolve_storage_preselect template "${TEMPLATE_STORAGE:-}"; then TEMPLATE_STORAGE="$STORAGE_RESULT" TEMPLATE_STORAGE_INFO="$STORAGE_INFO" - msg_ok "Storage ${BL}${TEMPLATE_STORAGE}${CL} (${TEMPLATE_STORAGE_INFO}) [Template]" else _storage_preselect_recover template "${TEMPLATE_STORAGE:-}" || exit 120 TEMPLATE_STORAGE="$STORAGE_RESULT" TEMPLATE_STORAGE_INFO="$STORAGE_INFO" - msg_ok "Storage ${BL}${TEMPLATE_STORAGE}${CL} (${TEMPLATE_STORAGE_INFO}) [Template]" fi # Container storage selection if resolve_storage_preselect container "${CONTAINER_STORAGE:-}"; then CONTAINER_STORAGE="$STORAGE_RESULT" CONTAINER_STORAGE_INFO="$STORAGE_INFO" - msg_ok "Storage ${BL}${CONTAINER_STORAGE}${CL} (${CONTAINER_STORAGE_INFO}) [Container]" else _storage_preselect_recover container "${CONTAINER_STORAGE:-}" || exit 119 CONTAINER_STORAGE="$STORAGE_RESULT" CONTAINER_STORAGE_INFO="$STORAGE_INFO" - msg_ok "Storage ${BL}${CONTAINER_STORAGE}${CL} (${CONTAINER_STORAGE_INFO}) [Container]" fi msg_info "Validating storage '$CONTAINER_STORAGE'" @@ -2971,7 +2965,7 @@ create_lxc_container() { if [[ "$STORAGE_TYPE" == "lvmthin" ]] && ! _lvmthin_check "$CONTAINER_STORAGE"; then exit 214 fi - msg_ok "Storage '$CONTAINER_STORAGE' ($STORAGE_TYPE) validated" + msg_ok "Storage '$CONTAINER_STORAGE' ($STORAGE_TYPE) validated${CONTAINER_STORAGE_INFO:+ - ${CONTAINER_STORAGE_INFO}}" msg_info "Validating template storage '$TEMPLATE_STORAGE'" TEMPLATE_TYPE=$(grep -E "^[^:]+: $TEMPLATE_STORAGE$" /etc/pve/storage.cfg | cut -d: -f1 || true) @@ -2979,7 +2973,7 @@ create_lxc_container() { if ! pvesm status -content vztmpl 2>/dev/null | awk 'NR>1{print $1}' | grep -qx "$TEMPLATE_STORAGE"; then msg_warn "Template storage '$TEMPLATE_STORAGE' may not support 'vztmpl'" fi - msg_ok "Template storage '$TEMPLATE_STORAGE' validated" + msg_ok "Template storage '$TEMPLATE_STORAGE' validated${TEMPLATE_STORAGE_INFO:+ - ${TEMPLATE_STORAGE_INFO}}" # Cluster quorum (if cluster) if [[ -f /etc/pve/corosync.conf ]]; then @@ -3027,7 +3021,7 @@ create_lxc_container() { rm -f "$TEMPLATE_PATH" download_arm64_template "$TEMPLATE_PATH" else - msg_ok "Template ${BL}$TEMPLATE${CL} found locally." + msg_ok "Template ${BL}$TEMPLATE${CL} (local)" fi else @@ -3562,7 +3556,7 @@ create_lxc_container() { exit 216 } - msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created." + msg_ok "Container ${BL}$CTID${CL} created" if [[ -s "$LOGFILE" && -n "${BUILD_LOG:-}" ]]; then { From 83051ff3104d8646d84d902f11f99ca0557a612c Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:04:58 +0100 Subject: [PATCH 2/2] Finish the wording on the create path Both hosts opened the step with "Creating LXC Container" and closed it with "Container ... created", the failed start still reported an LXC Container, and the DNS override said it differently on each side. --- incus/backend.func | 4 ++-- pve/backend.func | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/incus/backend.func b/incus/backend.func index e52ea76..8585f7f 100644 --- a/incus/backend.func +++ b/incus/backend.func @@ -396,7 +396,7 @@ incus_create_lxc_container() { msg_custom "ℹ️" "${YW}" "Image ${image_name} not cached, pulling" fi - msg_info "Creating LXC Container" + msg_info "Creating container" incus_log_section "Container Creation: ${CT_NAME}" local launch_args=() @@ -1091,7 +1091,7 @@ ${FUNCTIONS_FILE_PATH} INNEREOF" >>"${LOGFILE:-$INCUS_BUILD_LOG}" 2>&1 || { msg_error "Failed to push functions"; exit 1; } if [[ "${DNS_RETRY_OVERRIDE:-}" == "true" ]]; then - msg_info "Applying DNS override inside LXC" + msg_info "Applying the DNS override (8.8.8.8, 1.1.1.1)" incus_ct_exec bash -c "echo -e 'nameserver 8.8.8.8\nnameserver 1.1.1.1' >/etc/resolv.conf" || true msg_ok "DNS override applied" fi diff --git a/pve/backend.func b/pve/backend.func index d9cab99..e78939a 100644 --- a/pve/backend.func +++ b/pve/backend.func @@ -1009,7 +1009,7 @@ EOF if [ "$i" -eq 10 ]; then local ct_status ct_status=$(pct status "$CTID" 2>/dev/null || echo "unknown") - msg_error "LXC Container did not reach running state (status: ${ct_status})" + msg_error "Container did not reach running state (status: ${ct_status})" _pct_start_failed "$CTID" "$_start_out" exit 117 fi @@ -1397,9 +1397,9 @@ PROFILE msg_ok "Container customized" if [[ "${DNS_RETRY_OVERRIDE:-false}" == "true" ]]; then - msg_info "Applying DNS retry override in LXC (8.8.8.8, 1.1.1.1)" + msg_info "Applying the DNS override (8.8.8.8, 1.1.1.1)" pct exec "$CTID" -- bash -c "printf 'nameserver 8.8.8.8\nnameserver 1.1.1.1\n' >/etc/resolv.conf" >/dev/null 2>&1 || true - msg_ok "DNS override applied in LXC" + msg_ok "DNS override applied" fi install_ssh_keys_into_ct @@ -3475,7 +3475,7 @@ create_lxc_container() { # ------------------------------------------------------------------------------ # Create LXC Container # ------------------------------------------------------------------------------ - msg_info "Creating LXC container" + msg_info "Creating container" # Ensure subuid/subgid entries exist grep -q "root:100000:65536" /etc/subuid || echo "root:100000:65536" >>/etc/subuid