ubuntu / zsys

ZSys daemon and client for zfs systems
GNU General Public License v3.0
301 stars 43 forks source link

Failed to revert the revert: Failed to start Network Configuration #236

Open darkbasic opened 1 year ago

darkbasic commented 1 year ago

Describe the bug I've created a virtual machine to assess if zsys is still safe to use in Ubuntu 22.04 LTS and I've tried to revert to a previous snapshot. So far so good, but once I try to revert the revert it gets unbootable: systemd loops between Starting Network Time Synchronization and Failed to start Network Configuration.

To Reproduce Steps to reproduce the behavior:

  1. Revert to a previous snapshot
  2. Revert the revert
  3. See error

Expected behavior Should revert the revert.

For ubuntu users, please run and copy the following:

  1. ubuntu-bug zsys --save=/tmp/report
  2. Copy paste below /tmp/report content: http://dpaste.com/3HBA84X2T

Screenshots ubuntu2204zfs

Installed versions:

Additional context It's basically a fresh install of Ubuntu 22.04 LTS done following this guide: https://openzfs.github.io/openzfs-docs/Getting%20Started/Ubuntu/Ubuntu%2022.04%20Root%20on%20ZFS.html# The only additional step is adding the zfs ppa later on. I've create a btrfs snapshot of the virtual machine image prior to attempting the revert, thus the issue is 100% reproducible on demand. I'll be able to keep the VM snapshot around for a couple of weeks before having to get rid of it to free up some space. In the meantime I'll be able to provide remote access to it if you desire so.

darkbasic commented 1 year ago

I've create a new VM from scratch without the zfs ppa and I can still reproduce it.

radu-marinescu commented 6 months ago

I am in the same situation. I used the emergency shell to mask the services:

systemctl mask systemd-resolved.service
systemctl mask systemd-timesyncd.service

In my case, when doing the revert from lets say ubuntu_c0ffee, an ubuntu_deadbe dataset gets created for that system state but no child datasets. So, I end up with rpool/ROOT/ubuntu_deadbe as / and rpool/ROOT/ubuntu_c0ffee/var/lib/apt and rpool/ROOT/ubuntu_c0ffee/var/lib/dpkg as /var/lib/apt and /var/lib/dpkg respectively.

This means that the revert is leaving the system in an inconsistent state. I am not certain if this is the reason why systemd-timesyncd and systemd-resolved cannot start, but it is a possibility. My snapshot was in a consistent state, and /var/lib/apt and /var/lib/dpkg are the only child datasets of my ubuntu_c0ffee.