Wait for snapd autorefresh to complete
Project description
snapd-wait
snapd-wait is a small Python3 script that waits for snap autorefresh to complete.
It's primarily intended to be run on boot and is particularly useful when provisioning your system.
For example, if you use a Terraform/Packer provisioner that calls a program installed via snap, you'll get miscellaneous failures saying that program doesn't exist (because snapd is updating it).
Usage
$ snapd-wait --help
usage: snapd-wait [-h] [--delay DELAY] [--max-wait-time MAX_WAIT_TIME] [--sleep SLEEP] [--timeout TIMEOUT]
optional arguments:
-h, --help show this help message and exit
--delay DELAY Delay updates for n minutes (<=0 disables)
--max-wait-time MAX_WAIT_TIME
Maximum time in minutes to wait for snapd (<=0 disables)
--sleep SLEEP Time in seconds to sleep between calls to snap
--timeout TIMEOUT Time in seconds to wait for snap to complete
What it does
- Delays the next refresh by 6 hours (snapd autorefreshes 4 times a day by default)
- Waits for all changes to finish by calling
snap changes, essentially using this method, until every change is marked asDone.
References
- https://serverfault.com/questions/967674/how-to-wait-for-snapd-auto-refresh-to-complete
- https://popey.com/blog/2021/05/disabling-snap-autorefresh/
Development
Installation
Create a virtual environment, then install as follows:
pip install -e[dev]
Build/Test
make
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snapd-wait-1.0.tar.gz.
File metadata
- Download URL: snapd-wait-1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e9844a2906111bacf183bffc698148530a38a8b6c1e3aa3372968f55daf7450
|
|
| MD5 |
d2e8854d91656aa3795884976105bb7a
|
|
| BLAKE2b-256 |
cc3037593a75f5102e2319be4c85c4608fb3e0bdf5bfac5478a5f1adce834b13
|
File details
Details for the file snapd_wait-1.0-py3-none-any.whl.
File metadata
- Download URL: snapd_wait-1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eb2bb885ca4e15207973dfd3c5940eea41bd1f287040788bbec85f72f551d56
|
|
| MD5 |
5011768a71fe59d2dc0733bd16ba5e04
|
|
| BLAKE2b-256 |
3ebe93b071a0179a52c5ac2f85244dd9fa6003d46637070ac453f28c95de32fa
|