Commit d17e4c6d authored by intrigeri's avatar intrigeri
Browse files

Give tails-synchronize-data-to-new-persistent-volume-on-shutdown.service more...

Give tails-synchronize-data-to-new-persistent-volume-on-shutdown.service more time to do its job (refs: #17278)

We currently set DefaultTimeoutStopSec=5s, which means copying just the APT
lists (215MB currently), not even taking into account the actual additional
packages installed by the user, would need to happen at no less than 43MB/s for
the ExecStop= to succeed.

Most real-world bare metal USB sticks don't provide anything close
to this write rate.

I can't reproduce the problems caused by this bug when running the test suite on
my laptop, but it does happen regularly on lizard: even virtual USB stick backed
by tmpfs are not always fast enough there.
parent 111160fd
......@@ -17,6 +17,15 @@ ExecStop=/bin/sh -c ' \
touch /media/tails-persistence-setup/TailsData/apt_sync_completed && \
sync --file-system /media/tails-persistence-setup/TailsData/apt; \
fi'
# Tails sets a very small DefaultTimeoutStopSec= value, that this service
# inherits. In many cases, that value is too short for our ExecStop=
# step to complete successfully (#17278) so we need to bump this timeout here.
#
# APT lists are 215MB large as of 4.6. The cached binary packages can be
# arbitrarily large, let's assume 335MB. So we need to copy 550MB from tmpfs
# to a physical USB stick. Assuming a 2MB/s write rate in the worst case
# scenario, the copy operation can take up to 550/2 = 275 seconds.
TimeoutStopSec=300s
[Install]
WantedBy=multi-user.target
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment