egara / buttermanager

ButterManager is a BTRFS tool for managing snapshots, balancing filesystems and upgrading the system safetly.
GNU General Public License v3.0
129 stars 6 forks source link

Snapshot diff : List index out of range #31

Closed lapineige closed 2 years ago

lapineige commented 3 years ago

After making a few snapshots (8, out of 7 subvolumes), I tried to show differences between the first (/) snapshot and the current state. The Dialog popup is shown, but in the command ligne I have this error:

(Parent is Breeze::WidgetStateEngine(0x29d1960), parent's thread is QThread(0x2631dd0), current thread is Differentiator(0x7f2514010220)
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Breeze::WidgetStateEngine(0x29d1960), parent's thread is QThread(0x2631dd0), current thread is Differentiator(0x7f2514010220)
Traceback (most recent call last):
  File "/opt/buttermanager/buttermanager/buttermanager/filesystem/snapshot.py", line 445, in run
    self.__calculate_differences()
  File "/opt/buttermanager/buttermanager/buttermanager/filesystem/snapshot.py", line 473, in __calculate_differences
    subvolume_name = list(filter(None, subvolume_name_list))[-1]
IndexError: list index out of range
egara commented 3 years ago

Thank you again for the reporting.

At this moment, I'm giving "some love" to another project that I have. It is called "WallpaperDownloader". When I finished version 4.2 of WallpaperDownloader I'll start to work in this issue and some other new features for ButterManager.

If you want to take a look at WallpaperDownloader (spam spam spam ;-) ):

Snap Store (not recommended if you are in KDE because the snap package has its limitations particularly in this DE) - https://snapcraft.io/wallpaperdownloader Flathub (It works like a charm even in KDE) - https://flathub.org/apps/details/es.estoes.wallpaperDownloader PPA (Fully functional) - https://launchpad.net/~eloy-garcia-pca/+archive/ubuntu/wallpaperdownloader AUR (Fully functional) - https://aur.archlinux.org/packages/wallpaperdownloader Source Code - https://bitbucket.org/eloy_garcia_pca/wallpaperdownloader/src/master/

I'll keep you up to date with this issue and thanks again!

lapineige commented 3 years ago

There is no hurry :) It's not even a blocking bug ^^

If you want to take a look at WallpaperDownloader (spam spam spam ;-) ):

😉 I'm already using Variety (https://peterlevi.com/variety/) for that, but thanks :)

egara commented 2 years ago

Hi @lapineige

It's been a long while but I'm preparing the next version of ButterManager. I'm taking a look at this particular issue and I have uploaded a fix into devel branch that will be merged into master when the new release is ready. If you want to test it, you can but remember you will have to install the application from devel branch.

However, when trying to reproduce this behavior I reached this conclusion: I think you have defined, as subvolume to manage for root, directly /. This can be problematic, specially when you try to consolidate a previous state booting into a different snapshot from GRUB using ButterManager. Instead, you should point to the path where the root subvolume is mounted. For example, in my case would be /mnt/defvol/rootvol. You can take a look at a typical configuration here https://github.com/egara/buttermanager/wiki/Documentation

I hope this help. If you have any questions, just tell me :)

Thanks!

lapineige commented 2 years ago

Hello,

Thanks for your feedback. I don't think I will have the time to test it soon enough.

Regarding the potential issue you are raising here, I don't know if I'm concerned, I'm not enough into btrfs things right now to remember/understand if that's how is configured my filesystem or not… I will need to take time to look into it. Just a quick question : do you think that is something I could (easily) change ? Because if it's not the case, and as no further consequences, I don't think I will try to make that change considering the effort… :sweat_smile:

egara commented 2 years ago

Hi @lapineige

Yes, it is something that you can easily change :)

Could you attach your configuration file (~/.buttermanager/buttermanager.yaml) here?. Also, do you have the main BTRFS volume (ID 5) mounted in the system (for example, at /mnt/defvol or something similar) via fstab?

egara commented 2 years ago

New version 2.4.3 is out with this issue fixed