Skip to main content

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 as Done.

References

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

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapd-wait-1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snapd_wait-1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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

Hashes for snapd-wait-1.0.tar.gz
Algorithm Hash digest
SHA256 5e9844a2906111bacf183bffc698148530a38a8b6c1e3aa3372968f55daf7450
MD5 d2e8854d91656aa3795884976105bb7a
BLAKE2b-256 cc3037593a75f5102e2319be4c85c4608fb3e0bdf5bfac5478a5f1adce834b13

See more details on using hashes here.

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

Hashes for snapd_wait-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1eb2bb885ca4e15207973dfd3c5940eea41bd1f287040788bbec85f72f551d56
MD5 5011768a71fe59d2dc0733bd16ba5e04
BLAKE2b-256 3ebe93b071a0179a52c5ac2f85244dd9fa6003d46637070ac453f28c95de32fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page