Categories

  • 13k Topics
    115k Posts
    W

    @Tom-Elliott Thanks fo the quick reply!
    I did rerun the installer today and it seems to be working now, thanks a lot for the quick feedback and fix!

  • Get the latest news on what's happening.
    203 Topics
    844 Posts
    Tom ElliottT

    The eighteenth release candidate for FOG 1.6.0 is available on the rc-1.6.0 branch. It reports version 1.6.0-RC-18.

    Test it on a lab or non-production server first. The upgrade from 1.5 to 1.6 is one-way: it changes the database schema, and there is no down-migration.

    Changed since RC-17

    FOS checks the server’s TLS certificate (#1978, #1980). The boot menu sends FOS the server’s public-key pin as fogpin=. FOS refuses a server whose key does not match. With no pin, FOS checks the chain against its own CA bundle. If that check fails, FOS warns once and continues. New task type: Performance Test (#1982). It is an advanced task. FOS times disk reads, network reads and decompression on the client, names the slowest one, and changes nothing on the disk. The host’s Performance tab, under History Items, lists each result. This adds schema 444. Audit: work that no person did is recorded as (system), not fog (#1984). fog is also the default admin’s username, so a rejected API token or a host that FOS registered looked like the admin’s action. This applies to the Audit Log, to Created By on records saved with no signed-in user, and to quick-registration tasks. Rows written before the update keep fog. Task e-mail through ${user-name} does not change. FOG_KERNEL_RAMDISK_SIZE describes what the value now does (#1986). This adds schema 445. It changes the text only, not the value.

    FOS (kernel and init), from the Latest FOS release

    An RC install or update downloads the Latest FOS release. Latest is now EXP_20261027-181357:

    Kernel 6.18.59, the current 6.18 LTS release. FOS verifies TLS, which is the client half of #1978. The Performance Test task. x64 and x86 boot an initramfs, not an ext2 initrd (FOGProject/fos#75). The file names stay init.xz and init_32.xz, and the boot menu does not change. /tmp is now a real RAM disk with a size limit: FOG_KERNEL_RAMDISK_SIZE sets the size, kept between 64 MB and half of the client’s memory. Warning: a customized init can no longer be loop-mounted. Add your files as an overlay cpio appended to init.xz instead: https://docs.fogproject.org/en/latest/kb/how-tos/customize-the-fos-init/ . A post-init script needs no rebuild at all: https://docs.fogproject.org/en/latest/kb/how-tos/post-init-scripts/ If a client fails to boot with this init, go to FOG Configuration > Initrd Update and install the init from EXP_20261027-155909, the last ext2 init. Then report it on FOGProject/fos#75.

    API documentation: https://docs.fogproject.org/en/latest/1.6/kb/integrations/api

    Before you upgrade

    Back up your database and /opt/fog/.fogsettings. Read the release notes: https://github.com/FOGProject/fogproject/blob/rc-1.6.0/docs/release/1.6.0-release-notes.md 1.6 removes Display Manager, Directory Cleaner, User Cleanup, Client Updater, Green FOG and the persistentgroups plugin. Their data is dropped. The site and accesscontrol plugins move into core. PHP 7.4 or later is required. Plugins built for 1.5 do not load.

    Install or update (as root)

    A 1.6 beta or RC server: run bin/updatefog.sh --channel rc from your FOG checkout. A 1.5 server installed from git: update to the current 1.5 stable, then run bin/updatefog.sh --channel rc from the checkout. A new server, or a 1.5 server installed from a tarball:
    curl -fsSL https://raw.githubusercontent.com/FOGProject/fogproject/working-1.6/bin/bootstrap.sh | bash -s -- --channel rc

    Report problems

    Open an issue at https://github.com/FOGProject/fogproject/issues. Include your FOG version, your OS, and the installer log from bin/error_logs/. Report a security problem through “Report a vulnerability” on the same repository, not in a public issue.

  • View tutorials or talk about FOG in general.
    2k Topics
    19k Posts
    Tom ElliottT

    @Dominique If you’re able to, I’d highly suggest to snapshot the server first, or otherwise ensure you have a path to reinstall php down to 7.2 just incase updating to 8.X breaks your 1.5.10 availability.

    No, you shouldn’t need to re-install fog after updating PHP, but it also wouldn’t hurt anything (but again I highly recommend snapshotting if possible just due to the age of 1.5.10 vs the stable branch code base.)

  • Report bugs, request features, or get the latest progress.
    2k Topics
    21k Posts
    S

    Summary
    When STORAGE_rebuild_nfs_exports != yes, configureNFS() currently warns if no_root_squash appears anywhere in /etc/exports.

    That produces a false warning when /images/dev is already configured correctly with all_squash,anonuid=…,anongid=…, but an unrelated read-only export (for example a mounted Linux ISO tree) intentionally uses no_root_squash.
    Change
    Add nfsDevExportHasNoRootSquash() and scope the check to exactly:

    ${STORAGE_image_share_path}/dev

    The warning still appears when the image staging export itself uses no_root_squash, but unrelated exports no longer trigger it.
    Regression coverage
    tests/nfs-preserved-exports-warning.test.sh covers:

    safe /images/dev plus an ISO export using no_root_squash -> no warning condition /images/dev using no_root_squash -> warning condition similarly named paths and commented lines -> ignored configureNFS() actually uses the scoped helper
    Reproduction
    Example preserved exports:

    /images *(ro,sync,no_wdelay,subtree_check,insecure_locks,all_squash,anonuid=1002,anongid=1002,fsid=0)
    /images/dev *(rw,async,no_wdelay,subtree_check,all_squash,anonuid=1002,anongid=1002,fsid=1)
    /var/www/html/ISO/Ubuntu/26.04X64/ *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)

    The existing global grep -q “no_root_squash” “$nfsconfig” reports that captures land as root even though the /images/dev export is already ownership-safe.

    diff --git a/lib/common/functions.sh b/lib/common/functions.sh
    — a/lib/common/functions.sh
    +++ b/lib/common/functions.sh
    @@ -1,3 +1,14 @@
    +nfsDevExportHasNoRootSquash() {

    local config=“$1” local devpath=“${STORAGE_image_share_path%/}/dev” [[ -f “$config” ]] || return 1 awk -v path=“$devpath” ’ $1 == path && /(^|[,(])no_root_squash([,)]|$)/ { found=1 } END { exit !found } ’ “$config”
    +}
    configureNFS() {
    dots “Setting up NFS configuration file”
    if [[ -f “/etc/nfs.conf” ]]; then
    @@ -25,7 +36,7 @@
    dots “Setting up exports file”
    if [[ ${STORAGE_rebuild_nfs_exports} != yes ]]; then
    echo “Skipped” if [[ -f "$nfsconfig" ]] && grep -q "no_root_squash" "$nfsconfig"; then if nfsDevExportHasNoRootSquash "$nfsconfig"; then echo echo " ** WARNING: ${nfsconfig} still exports with no_root_squash." echo " ** Captures land as root, so moving the image out of"

    diff --git a/tests/nfs-preserved-exports-warning.test.sh b/tests/nfs-preserved-exports-warning.test.sh
    new file mode 100755
    — /dev/null
    +++ b/tests/nfs-preserved-exports-warning.test.sh
    @@ -0,0 +1,89 @@
    +#!/bin/bash
    +#
    +# The preserved-exports warning must only inspect the image staging export.
    +# An unrelated read-only ISO export may intentionally use no_root_squash and
    +# must not make FOG claim that /images/dev will capture files as root.
    +#
    +# Usage: bash tests/nfs-preserved-exports-warning.test.sh
    +
    +root=$(cd – “$(dirname – “${BASH_SOURCE[0]}”)/…” && pwd)
    +functions=“$root/lib/common/functions.sh”
    +
    +pass=0
    +fail=0
    +
    +pass_case() {

    pass=$((pass + 1))
    +}

    +fail_case() {

    fail=$((fail + 1)) printf ’ FAIL %s\n’ “$1”
    +}

    +if [[ ! -r $functions ]]; then

    echo “FAIL: cannot read $functions” >&2 exit 1
    +fi

    +# Load only the helper under test. Sourcing all of functions.sh would make
    +# this small unit test depend on the installer’s global setup.
    +helper=$(

    awk ’ /^nfsDevExportHasNoRootSquash\(\) \{/ { emit=1 } emit { print } emit && /^}/ { exit } ’ “$functions”
    +)
    +if [[ -z $helper ]]; then echo “FAIL: nfsDevExportHasNoRootSquash() not found” >&2 exit 1
    +fi
    +eval “$helper”

    +tmp=$(mktemp)
    +trap ‘rm -f “$tmp”’ EXIT
    +STORAGE_image_share_path=/images
    +
    +cat > “$tmp” <<‘EOF_CASE’
    +/images *(ro,sync,all_squash,anonuid=1002,anongid=1002,fsid=0)
    +/images/dev *(rw,async,all_squash,anonuid=1002,anongid=1002,fsid=1)
    +/var/www/html/ISO/Ubuntu/26.04X64/ *(ro,sync,no_root_squash,insecure)
    +EOF_CASE
    +if nfsDevExportHasNoRootSquash “$tmp”; then

    fail_case “unrelated ISO no_root_squash does not trigger warning”
    +else pass_case
    +fi

    +cat > “$tmp” <<‘EOF_CASE’
    +/images *(ro,sync,all_squash,anonuid=1002,anongid=1002,fsid=0)
    +/images/dev *(rw,async,no_root_squash,fsid=1)
    +EOF_CASE
    +if nfsDevExportHasNoRootSquash “$tmp”; then

    pass_case
    +else fail_case “/images/dev no_root_squash triggers warning”
    +fi

    +cat > “$tmp” <<‘EOF_CASE’
    +/images/dev *(rw,async,all_squash,anonuid=1002,anongid=1002,fsid=1)
    +/images-old/dev *(rw,async,no_root_squash,fsid=2)
    +# /images/dev *(rw,no_root_squash)
    +EOF_CASE
    +if nfsDevExportHasNoRootSquash “$tmp”; then

    fail_case “prefix paths and comments do not trigger warning”
    +else pass_case
    +fi

    +if ! grep -q ‘if nfsDevExportHasNoRootSquash “$nfsconfig”; then’ “$functions”; then

    echo " FAIL configureNFS does not use nfsDevExportHasNoRootSquash" >&2 fail=$((fail + 1))
    +else pass=$((pass + 1))
    +fi

    +echo “ok $pass”
    +[[ $fail -eq 0 ]] || { echo “FAIL ($fail of $((pass + fail)))” >&2; exit 1; }
    +exit 0

69

Online

12.8k

Users

17.7k

Topics

157.3k

Posts