[lxd-p2c] [Receiver] Invalid dir index

I was following along with the FOSSDEM video, but I had also watched the clustering video so I enabled clustering to set up the networking. could this be the problem? That’s the only difference I see in the setup.

lxd box: Ubuntu 18.04
VM that is being transferred: Ubuntu 14.04

Error: Failed to rsync: exit status 2
[Receiver] Invalid dir index: -1 (-101 - -101)
rsync error: protocol incompatibility (code 2) at flist.c(2634) [Receiver=3.1.2]

Hi!

The error you get, is rsync error: protocol incompatibility (code 2).

Googling on this, shows this similar report,


It is not the exact report, because that report also says

Invalid remainder length

while in your case it’s different: [Receiver] Invalid dir index: -1

If you are running the deb package of LXD and you are OK to migrate to the snap package, then I recommend to perform the migration and try again.

tried the migration with the script from your blog:

=> Connecting to source server
=> Connecting to destination server
=> Running sanity checks
error: The source server is part of a LXD cluster, this isn’t supported.

so I guess I’m reinstalling lxd from scratch, again :wink:

No worries! Thanks!

Just to update for anyone interested.

stopped all containers
moved the default storage pool directory to my home dir
apt remove --purge lxd lxd-client liblxc1 lxcfs
snap remove lxd
snap install lxd

re init’d lxd WITHOUT clustering enabled
moved default back to where snap keeps the storage-pool
imported the containers
started the containers

everything seems good and lxd-p2c is cranking away!

Thanks

1 Like

Thank you Captain, trying to get Ubuntu 18.04 from lxd 3.0.1 to use the snap 3.5 version was only possible following your steps.

I’m seeing the same issue running lxd-p2c here - source is a bionic VMware VM, dest is bionic LXD host on metal. full output here.

I tried purging/reinstalling LXD and setting my default storage to dir (the fs is still btrfs backed, is that ok?) but it fails in the same place each transfer. I’ll go bug the rsync guys too…

You need to make sure your lxd-p2c build isn’t any more recent than the LXD server you’re running it against, otherwise it may be using rsync options that the target LXD server doesn’t understand.

well, I have LXD 3.6 installed from snap, but lxd-p2c is compiled from the gh source, so I guess it’s enough commits ahead that it’s out of whack with the LXD snap binaries?

so I switched the lxd snap to the edge channel, and it appears to be working now. Thankyou @stgraber!

Yeah, LXD 3.7 introduces a protocol change which adds --delete and --compress=2 to the rsync options, so you were effectively using the 3.7 version of lxd-p2c with a 3.6 version of LXD.

LXD 3.7 is now in the candidate channel, so I’d recommend you switch over to that instead of edge (as edge just auto-updates from git with no real testing before you may get a refresh).

Will do, thanks Stéphane.