OSTree Failed Deployment

Recently my silverblue desktop hasn’t been able to upgrade and if I run rpm-ostree upgrade I see:

Warning: failed to finalize previous deployment
         error: During /etc merge: While computing configuration diff: Error reading from file: Input/output error
         check `journalctl -b -1 -u ostree-finalize-staged.service`

And checking journalctl I get the below.

-- Journal begins at Mon 2021-04-05 19:23:32 EDT, ends at Sat 2021-06-26 17:30:58 EDT. --
Jun 26 17:27:57 odin systemd[1]: Finished OSTree Finalize Staged Deployment.
Jun 26 17:29:23 odin systemd[1]: Stopping OSTree Finalize Staged Deployment...
Jun 26 17:29:23 odin ostree[14879]: Finalizing staged deployment
Jun 26 17:29:24 odin ostree[14879]: error: During /etc merge: While computing configuration diff: Error reading from file: Input/output error
Jun 26 17:29:24 odin systemd[1]: ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE
Jun 26 17:29:24 odin systemd[1]: ostree-finalize-staged.service: Failed with result 'exit-code'.
Jun 26 17:29:24 odin systemd[1]: Stopped OSTree Finalize Staged Deployment.

The error message is a not super helpful, and was wondering if anyone else has experienced this?

I should add, my latest deployment is below:

● ostree://fedora:fedora/34/x86_64/silverblue
                   Version: 34.20210621.0 (2021-06-21T00:42:31Z)
                BaseCommit: 118fca8e04965822893212d24f324b53daa0498023a79e579ffa09c2d9ba8e4e
              GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
           LayeredPackages: gocryptfs

Hello @bproj ,
What does rpm-ostree status show? Perhaps there is a stuck transaction you need to cancel, to retry the update. It looks like it was having difficulty merging your modifications in /etc with the new commit. How’s disk space?

Hey Stephen,

I was trying to layer wireguard-tools, so I’ll re-try the update without it.

rpm-ostree status

$ rpm-ostree status
State: idle
Warning: failed to finalize previous deployment
         error: During /etc merge: While computing configuration diff: Error reading from file: Input/output error
         check `journalctl -b -1 -u ostree-finalize-staged.service`
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
● ostree://fedora:fedora/34/x86_64/silverblue
                   Version: 34.20210621.0 (2021-06-21T00:42:31Z)
                BaseCommit: 118fca8e04965822893212d24f324b53daa0498023a79e579ffa09c2d9ba8e4e
              GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
           LayeredPackages: gocryptfs

  ostree://fedora:fedora/34/x86_64/silverblue
                   Version: 34.20210620.0 (2021-06-20T00:47:37Z)
                BaseCommit: 45297b6be220b28d52d056c51ea02844e714c824ffa3d6e664e26478664f9c28
              GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
           LayeredPackages: gocryptfs

AvailableUpdate:
        Version: 34.20210627.0 (2021-06-27T00:41:21Z)
         Commit: 8a6d5e50e53353de59dc3cd6777f5eb8e00ebfeb0b4059e77f251c9fc0e753f0
   GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
           Diff: 36 upgraded

Disk Space

When I do run rpm-ostree upgrade I get the below. I am seeing the same error when I reboot however.

$ rpm-ostree upgrade 
note: automatic updates (stage) are enabled
2 metadata, 0 content objects fetched; 788 B transferred in 1 seconds; 0 bytes content written
Checking out tree 8a6d5e5... done
Enabled rpm-md repositories: fedora-cisco-openh264 updates fedora updates-archive
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2021-02-23T00:49:00Z
rpm-md repo 'updates' (cached); generated: 2021-06-27T00:55:59Z
rpm-md repo 'fedora' (cached); generated: 2021-04-23T10:47:57Z
rpm-md repo 'updates-archive' (cached); generated: 2021-06-27T01:48:27Z
Importing rpm-md... done
Resolving dependencies... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 55.7 MB (pkgcache branches: 0)
Upgraded:
  dbus-broker 28-3.fc34 -> 29-1.fc34
  dracut 054-12.git20210521.fc34 -> 055-2.fc34
  firefox 89.0-2.fc34 -> 89.0.2-1.fc34
  gst-editing-services 1.19.1-1.fc34 -> 1.19.1-2.1.18.4.fc34
  gstreamer1 1.19.1-1.fc34 -> 1.19.1-2.1.18.4.fc34
  gstreamer1-plugins-bad-free 1.19.1-2.fc34 -> 1.19.1-2.1.18.4.fc34
  gstreamer1-plugins-base 1.19.1-1.fc34 -> 1.19.1-2.1.18.4.fc34
  gstreamer1-plugins-good 1.19.1-1.fc34 -> 1.19.1-2.1.18.4.fc34
  gstreamer1-plugins-good-gtk 1.19.1-1.fc34 -> 1.19.1-2.1.18.4.fc34
  gstreamer1-plugins-good-qt 1.19.1-1.fc34 -> 1.19.1-2.1.18.4.fc34
  gstreamer1-plugins-ugly-free 1.19.1-1.fc34 -> 1.19.1-2.1.18.4.fc34
  kernel 5.12.11-300.fc34 -> 5.12.12-300.fc34
  kernel-core 5.12.11-300.fc34 -> 5.12.12-300.fc34
  kernel-devel 5.12.11-300.fc34 -> 5.12.12-300.fc34
  kernel-modules 5.12.11-300.fc34 -> 5.12.12-300.fc34
  kernel-modules-extra 5.12.11-300.fc34 -> 5.12.12-300.fc34
  libinput 1.18.0-1.fc34 -> 1.18.0-2.fc34
  libxcrypt 4.4.20-2.fc34 -> 4.4.22-2.fc34
  libxcrypt-compat 4.4.20-2.fc34 -> 4.4.22-2.fc34
  libxcrypt-devel 4.4.20-2.fc34 -> 4.4.22-2.fc34
  nano 5.6.1-1.fc34 -> 5.8-2.fc34
  nano-default-editor 5.6.1-1.fc34 -> 5.8-2.fc34
  openvpn 2.5.2-1.fc34 -> 2.5.3-1.fc34
  pam 1.5.1-5.fc34 -> 1.5.1-6.fc34
  pipewire 0.3.30-2.fc34 -> 0.3.30-4.fc34
  pipewire-alsa 0.3.30-2.fc34 -> 0.3.30-4.fc34
  pipewire-gstreamer 0.3.30-2.fc34 -> 0.3.30-4.fc34
  pipewire-jack-audio-connection-kit 0.3.30-2.fc34 -> 0.3.30-4.fc34
  pipewire-libs 0.3.30-2.fc34 -> 0.3.30-4.fc34
  pipewire-pulseaudio 0.3.30-2.fc34 -> 0.3.30-4.fc34
  pipewire-utils 0.3.30-2.fc34 -> 0.3.30-4.fc34
  qemu-guest-agent 2:5.2.0-7.fc34 -> 2:5.2.0-8.fc34
  qt-settings 34.5-1.fc34 -> 34.6-1.fc34
  totem-video-thumbnailer 1:3.38.0-6.fc34 -> 1:3.38.1-1.fc34
  vim-minimal 2:8.2.2956-2.fc34 -> 2:8.2.3046-1.fc34
  xorg-x11-server-Xwayland 21.1.1-2.fc34 -> 21.1.1-3.fc34
Run "systemctl reboot" to start a reboot

While I am not sure what caused the issue in the first place, when I reverted to an old deployment (from 20210620) and then upgraded it worked without issue.

Without digging into your logs for the failed commit, you likely won’t find the answer. It is good that merely rolling back to your previous commit allowed you to upgrade past the failing one. At least your system was still usable.