Package: dirvish
Version: 1.2.1-2.1
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

As far as I can see, the removal of an image during expiry consist of 
two steps:

1. Remove the /tree/ directory in image.
2. Remove the image directory.

However, if e.g. the machine is rebooted during step 1, then we are left 
with an incomplete tree, but if a user (or dirvish itself) just reads 
the status file of the image directory, it still looks like an 
successful image.

To avoid that, it could be helpful with a first step:

0. Append 'Status: Removing' or something such to the status file, such 
that it no longer is mistaken as a good image.

I have not come up with a sequence of events where the normal dirvish 
scripts would make mistakes due to this, since it should never try to 
delete the latest good image.

But e.g. a user which is low on diskspace may be trying to remove images 
manually and then it would be helpful if the status file has been 
updated also before any removal, such that manual inspection of 
existing images does not assume a half-removed image is a good one.

(Note: the issue was also reported upstream
https://lists.dirvish.org/pipermail/dirvish/2022-November/003353.html
which I guess was reporting in the wrong order.)


-- System Information:
Debian Release: 11.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-19-cloud-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dirvish depends on:
ii  libtime-parsedate-perl  2015.103-3
ii  libtime-period-perl     1.25-1
ii  perl                    5.32.1-4+deb11u2
ii  rsync                   3.2.3-4+deb11u1

Versions of packages dirvish recommends:
ii  ssh  1:8.4p1-5+deb11u1

dirvish suggests no packages.

-- Configuration Files:
/etc/cron.d/dirvish changed [not included]
/etc/dirvish/dirvish-cronjob changed [not included]

-- no debconf information

Reply via email to