SOLVED: Creating a snapshot fails because the rsync bwlimit value is too small, even though it appears to be set to 0

Host system: updated Arch Linux
LXD version: 4.3

When I try to create a snapshot, I get an rsync error:

$ lxc stop atom
$ lxc snapshot atom atom_2020-08-04
Error: Create instance snapshot: Failed to run: rsync -a -HA --sparse --devices --delete --checksum --numeric-ids --xattrs --bwlimit 0 -q /var/lib/lxd/storage-pools/default/containers/atom/ /var/lib/lxd/storage-pools/default/containers-snapshots/atom/atom_2020-08-04: rsync: --bwlimit value is too small: 0
rsync error: syntax or usage error (code 1) at main.c(1694) [client=3.2.2]

I haven’t changed the default bwlimit, which looks to be 0, indicating no bandwidith limits. What’s the remediation for this? I’m assuming this was caused by an LXD upgrade from a version that didn’t support bwlimits to one that does.

Thanks.

That looks like a bug.

What storage driver are you using?

And can you show lxc storage show default?

I’m just using the directory storage driver:

[pgoetz@erap-atx ~]$ lxc storage show default
config:
  source: /var/lib/lxd/storage-pools/default
description: ""
name: default
driver: dir
used_by:
- /1.0/instances/archon
- /1.0/instances/archon/archon_snap_20190316
- /1.0/instances/archon1404
- /1.0/instances/atom
- /1.0/instances/atom-2-5
- /1.0/instances/atom/atom-catalog-new-install-2020-01-29
- /1.0/instances/atom16
- /1.0/profiles/default
status: Created
locations:
- none

Thanks Stéphane, that was fast.

However, I think this means that I’m going to have to use the devel version in git to make a snapshot? Is there some temporary workaround I could deploy? This is a production system, so I’d prefer to stick to released versions of the code.

You could set a high rsync limit value.

lxc storage set default rsync.bwlimit=<high limit>

Out of interest, what version of rsync are you running?

Ha, thanks Tom!

That thought (just set bwlimit to a large value) just occurred to me and I was coming back to this ticket to post that suggestion myself. Thanks for providing the command syntax for doing this, though.

[pgoetz@erap-atx ~]$ pacman -Q | grep rsync
rsync 3.2.2-2

Yes looks like that is a very recent version and they’ve changed what arguments are supported.

That’s the bane and benefit of using Arch linux systems: everything is always current, as Arch uses a rolling release model. Marking this problem as solved. I ran:

$ lxc storage set default rsync.bwlimit=500000

and that was adequate for allowing me to create snapshots again. Thanks for your help with this, Stéphane and Tom.