Skip to content

RC-19 test report: upgrade from 1.5.10.2518 fails on the first pass (schema 290), and a rerun deletes the 1.5 web backup #2000

Closed

Description

@cepadugato

Follow-up to #1945, same KVM lab, rebuilt from scratch on 2026-10-28. Two parts: a fresh RC-19 install with the new FOS init, and an upgrade of a fresh 1.5 stable server.

Setup

  • Host: KVM, --machine pc, isolated network per server, FOG DHCP on Kea. Server VMs: Debian 12 genericcloud, 4 vCPU, 4 GB.
  • RC: rc-1.6.0 at 494b9ca (1.6.0-RC-19), installfog.sh -y --channel rc.
  • 1.5: stable at c97e205 (1.5.10.2518), installfog.sh -y. Then rc-1.6.0 at 4983c25 (RC-19 plus the translation sync), installfog.sh -y --channel rc.
  • FOS: Latest, EXP_20261027-181357 (initramfs).

Fresh RC-19 install: all green

Step Result
Install on Debian 12 Setup complete, no Failed, no Kea/ISC message (#1975)
PasswordAuthentication no The new WARNING is printed (#1975). Captures work after a Match User fogproject block
Served init.xz cpio (070701), not ext2
POST /image without isEnabled Image is enabled (#1947)
BIOS capture, unicast deploy to a blank disk OK, the clone carries the source's marker file
UEFI capture (GPT with ESP), deploy to a blank disk OK, the clone boots in UEFI with the marker
Multicast, 2 hosts OK, both clones carry the marker

One capture failed with e2fsck failed to check /dev/vda1 (shrinkPartition) … recovering journal, after I hard-reset the source. That is note 5 of #1945 (FOS side). A clean reboot of the same kind of source captured fine.

Upgrade 1.5.10.2518 → RC-19

Before the upgrade: one image captured on 1.5, mysqldump and .fogsettings copied by hand.

1. The first pass stops at Updating Database

 * Backing up database.........................................Done
 * Updating Database...........................................Failed!

fog_schema_update_error.log:

Update ID: 290
Database Error: ... SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fog.fileDeleteQueue' doesn't exist ...
SQL: ALTER TABLE `fileDeleteQueue` ADD `fdqPathType` VARCHAR(255) NOT NULL

What I see:

  • A fresh 1.5.10.2518 arrives with schemaVersion.vValue = 288 and no fileDeleteQueue table. The comments in commons/schema.php:4822 and src/Db/SchemaReconciler.php:32 expect a fully patched 1.5.10 at 277.
  • So the updater starts at element 288. 1.6's steps // 287 (CREATE TABLE fileDeleteQueue) and // 288 are skipped. // 289 runs, then // 290 ALTERs a table that does not exist.
  • 1146 is not in $skiperrs (src/Pages/SchemaUpdaterPage.php:393-399), so the update breaks there.
  • The reconcile after the loop (SchemaUpdaterPage.php:491) still runs and creates fileDeleteQueue: create_time is 16:54:32, and the error log is written at 16:54:34. But the error is already recorded. The installer prints Failed! and vValue stays at 289.

A second installfog.sh -y --channel rc completes: Updating Database...OK, Setup complete, vValue 445. The image captured on 1.5 then deploys from 1.6 to a blank disk, and the clone carries the marker.

So the server recovers, but only after a rerun that the admin has no reason to try first, because the release notes ask them to treat the upgrade as one-way.

A fix for this part follows in a pull request that references this issue: on 1146, run the reconcile at the point of failure and retry the statement once. With it, the same fresh 1.5.10.2518 upgrades in one pass (Setup complete, vValue 445, no fog_schema_update_error.log), and the 1.5 image deploys from the upgraded server.

One side observation from comparing the upgraded database with a fresh RC-19 one: the only difference is users.uName and users.uCreateBy, which stay varchar(40) NOT NULL from 1.5 where a fresh install has varchar(255) NULL. The two-pass upgrade without the fix ends up the same way. That fits the reconciler never retyping an existing column, so I am only noting it.

2. The rerun deletes the only 1.5 web-tree backup

The web tree is backed up to fog_web_${version}.BACKUP, and ${version} is the version being installed. lib/common/functions.sh:13005-13009 deletes that directory first, then copies the current tree into it. On the rerun above, the current tree is already 1.6, so the 1.5 copy is replaced.

After the second pass:

$ ./revertfog.sh --list
 * Database dumps under /home/fogDBbackups, newest first:
   rejected fog_sql_1.6.0-RC-19_20261028_165900.sql  -- it contains the 1.6-only table `userAuths` -- this is a 1.6 dump
   USABLE   fog_sql_1.6.0-RC-19_20261028_165426.sql  (schema count 288)

 * Web tree backups under /home:
   rejected fog_web_1.6.0-RC-19.BACKUP  -- not a 1.5 tree (no lib/fog/system.class.php, or it carries src/)

The database dumps carry a timestamp, so the 1.5 dump survives. The web tree has no 1.5 copy left. After the first pass alone, --list and --dry-run accepted both backups and described the revert correctly.

revertfog.sh already knows this case. Its dry run says "a second install run replaces the 1.5 copy with the 1.6 one", skips the web tree, and asks for a 1.5 reinstall. A real revert then worked: schema back to 288 with the image and host, and the 1.5 installer rebuilt the tree. So nothing is unrecoverable. The gap is that issue 1 makes that second run the normal path, and the release notes promise names that would have kept the copy.

The release notes say both backups are "named after the version being upgraded from, not the one you're upgrading to" (docs/release/1.6.0-release-notes.md:120). Both are actually named after RC-19.

3. revertfog.sh is not in a 1.5 checkout

The release notes say to run bin/revertfog.sh "from the bin/ directory of a 1.5 checkout" (line 128). It is in working-1.6 and rc-1.6.0, but not in stable (c97e205) or dev-branch (17973cd). Run from the 1.6 checkout, --list and --dry-run work as documented.

Note: a 1.5 install today downloads the experimental FOS

downloadfiles() in 1.5 picks a pinned FOS release only when the version matches ^[0-9]\.[0-9]\.[0-9]+$ (lib/common/functions.sh:5613 on stable). 1.5.10.2518 has four parts, so it takes releases/latest, which is EXP_20261027-181357. That release is not marked pre-release. The 1.5 server got the same init.xz as RC-19 (cpio, same size), and capture and deploy on 1.5 worked with it. I am mentioning it only because the next FOS "Latest" reaches every 1.5 install as well.

Evidence kept

The failed-pass logs (upgrade.log, fog_error_1.6.0-RC-19.log, fog_schema_update_error.log) and a dump taken right after the failure are on the lab server. I can attach any of them, or rerun the upgrade from a fresh 1.5.10.2518 to test another change.

🤖 Generated with Claude Code

Activity

  1. mastacontrola commented on Oct 28, 2026

    @mastacontrola
    Member

    Thank you for this report, and sorry for the broken upgrade path. All three parts are fixed on rc-1.6.0 (now at a84872ae6) and on working-1.6.

    Part Fix
    1. First pass fails at step 290 (1146) #2001 / #2002: your fix, merged as written.
    Side note: users.uName / uCreateBy stay varchar(40) NOT NULL #2005 / #2006 add step 446, which widens both columns. #2007 / #2008 also let the reconciler repair any column change that cannot lose data (a longer varchar, a wider integer, NOT NULL → NULL), so the next skipped widening repairs itself.
    2. A rerun deletes the 1.5 web backup #2003 / #2004: when the existing fog_web_<version>.BACKUP holds another release, the installer renames it after that release instead of deleting it.
    3. revertfog.sh is not in a 1.5 checkout, and the backup names #2003 / #2004 correct the release notes. Both backups carry the version being installed, and revertfog.sh runs from the 1.6 checkout.

    We also added the CI check that would have caught this: fogproject / upgrade from stable installs a real 1.5 database with 1.5's own updater, then upgrades it with the pull request's updater. It is now required on working-1.6. A second leg runs from dev-branch, so a new 1.5 schema step shows up before it reaches a release.

    On the FOS note: that is intended. stable and dev-branch take the latest init so it gets tested, and a full release gets a pinned one.

    If you have time, a rerun from a fresh 1.5.10.2518 against the current rc-1.6.0 would confirm the fixes on your rig. You should get one pass, schema 446, and no fog_schema_update_error.log. Closing this issue; reopen it if anything still fails.

  2. cepadugato commented on Oct 28, 2026

    @cepadugato
    Author

    Confirmed on the same KVM lab, rebuilt from scratch: a fresh stable c97e20500 (1.5.10.2518, schemaVersion.vValue 288) upgraded against the current rc-1.6.0 a84872ae6 with installfog.sh -y --channel rc.

    Result matches exactly:

    • one pass — a single Updating Database...OK and Setup complete, no Failed;
    • schemaVersion.vValue = 446;
    • no fog_schema_update_error.log.

    Thanks for the quick and thorough fixes across all three parts, and for adding the upgrade from stable CI check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions