Thanks for the quick response and sorry about the delay in providing the information the you suggested. This was because gathering the information was not as straightforward as I imagined as changing the settings and reloading lxd caused the behaviour to change.
Reloading daemon causing the lingeringzfs send
processes to go away
sudo systemctl **reload** snap.lxd.daemon
The first time the containers are copied after the reload the zfs send
command looks like:
zfs send -c -L srv/lxd/containers/alpha@migration-06d8d03f-b6a1-40ac-8899-2a2c661dd263
This first copy works without a lingering 'zfs send` process.
The copy of the 2nd container started with a similar looking process (ie with one snapshot)
zfs send -c -L srv/lxd/containers/alpha@migration-d3694b80-d76b-4d90-9744-9ab2089784d2
but then changed at the end to have two snapshots, It was this process that stayed round:
zfs send -c -L -i srv/lxd/containers/alpha@migration-d3694b80-d76b-4d90-9744-9ab2089784d2 srv/lxd/containers/alpha@migration-9ff24d4a-28f5-4e6e-bc58-9c206e4dc0ce
This is the log for the local host in the case where the zfs send
process remains:
t=2020-11-17T14:31:33+0000 lvl=dbug msg="New task Operation: c4c08115-e459-4340-b844-00f62f601d5b"
t=2020-11-17T14:31:33+0000 lvl=dbug msg="Started task operation: c4c08115-e459-4340-b844-00f62f601d5b"
t=2020-11-17T14:31:33+0000 lvl=info msg="Deleting container" created=2020-11-17T13:57:53+0000 ephemeral=false name=alpha project=default used=1970-01-01T01:00:00+0100
t=2020-11-17T14:31:33+0000 lvl=dbug msg="\n\t{\n\t\t\"type\": \"async\",\n\t\t\"status\": \"Operation created\",\n\t\t\"status_code\": 100,\n\t\t\"operation\": \"/1.0/operations/c4c08115-e459-4340-b844-00f62f601d5b\",\n\t\t\"error_code\": 0,\n\t\t\"error\": \"\",\n\t\t\"metadata\": {\n\t\t\t\"id\": \"c4c08115-e459-4340-b844-00f62f601d5b\",\n\t\t\t\"class\": \"task\",\n\t\t\t\"description\": \"Deleting container\",\n\t\t\t\"created_at\": \"2020-11-17T14:31:33.879318624Z\",\n\t\t\t\"updated_at\": \"2020-11-17T14:31:33.879318624Z\",\n\t\t\t\"status\": \"Running\",\n\t\t\t\"status_code\": 103,\n\t\t\t\"resources\": {\n\t\t\t\t\"containers\": [\n\t\t\t\t\t\"/1.0/containers/alpha\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"metadata\": null,\n\t\t\t\"may_cancel\": false,\n\t\t\t\"err\": \"\",\n\t\t\t\"location\": \"none\"\n\t\t}\n\t}"
t=2020-11-17T14:31:33+0000 lvl=dbug msg=Handling ip=@ method=GET protocol=unix url=/1.0/operations/c4c08115-e459-4340-b844-00f62f601d5b username="uid=1004"
t=2020-11-17T14:31:33+0000 lvl=dbug msg="DeleteInstance started" driver=zfs instance=alpha pool=default project=default
t=2020-11-17T14:31:33+0000 lvl=dbug msg="Deleting instance volume" driver=zfs instance=alpha pool=default project=default volName=alpha
t=2020-11-17T14:31:34+0000 lvl=dbug msg="DeleteInstance finished" driver=zfs instance=alpha pool=default project=default
t=2020-11-17T14:31:34+0000 lvl=info msg="Deleted container" created=2020-11-17T13:57:53+0000 ephemeral=false name=alpha project=default used=1970-01-01T01:00:00+0100
t=2020-11-17T14:31:34+0000 lvl=dbug msg="Success for task operation: c4c08115-e459-4340-b844-00f62f601d5b"
t=2020-11-17T14:31:34+0000 lvl=dbug msg="Event listener finished: 32219f6a-e242-4556-b58d-17a25ec54b61"
t=2020-11-17T14:31:34+0000 lvl=dbug msg="Disconnected event listener: 32219f6a-e242-4556-b58d-17a25ec54b61"
t=2020-11-17T14:31:34+0000 lvl=dbug msg=Handling ip=@ method=GET protocol=unix url=/1.0 username="uid=1004"
t=2020-11-17T14:31:35+0000 lvl=dbug msg=Handling ip=@ method=GET protocol=unix url=/1.0/events username="uid=1004"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="New event listener: 261ff797-4eac-4a58-a6ce-f0296f61672d"
t=2020-11-17T14:31:35+0000 lvl=dbug msg=Handling ip=@ method=POST protocol=unix url=/1.0/instances username="uid=1004"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="\n\t{\n\t\t\"architecture\": \"x86_64\",\n\t\t\"config\": {\n\t\t\t\"boot.autostart\": \"false\",\n\t\t\t\"boot.autostart.priority\": \"100\",\n\t\t\t\"security.privileged\": \"true\",\n\t\t\t\"volatile.base_image\": \"6385fd2c715116b231e3e93b9e3d6cbc8c46aac5f1de7a8560a80ebd6bcaa394\"\n\t\t},\n\t\t\"devices\": {\n\t\t\t\"eth0\": {\n\t\t\t\t\"name\": \"eth0\",\n\t\t\t\t\"nictype\": \"bridged\",\n\t\t\t\t\"parent\": \"br0\",\n\t\t\t\t\"type\": \"nic\"\n\t\t\t},\n\t\t\t\"root\": {\n\t\t\t\t\"path\": \"/\",\n\t\t\t\t\"pool\": \"default\",\n\t\t\t\t\"size\": \"10GB\",\n\t\t\t\t\"type\": \"disk\"\n\t\t\t}\n\t\t},\n\t\t\"ephemeral\": false,\n\t\t\"profiles\": [\n\t\t\t\"default\"\n\t\t],\n\t\t\"stateful\": false,\n\t\t\"description\": \"\",\n\t\t\"name\": \"alpha\",\n\t\t\"source\": {\n\t\t\t\"type\": \"migration\",\n\t\t\t\"certificate\": \"-----BEGIN CERTIFICATE----
-----END CERTIFICATE-----\\n\",\n\t\t\t\"base-image\": \"6385fd2c715116b231e3e93b9e3d6cbc8c46aac5f1de7a8560a80ebd6bcaa394\",\n\t\t\t\"mode\": \"pull\",\n\t\t\t\"operation\": \"https://foxtrot:8443/1.0/operations/1d5105fe-f854-49a3-8f9e-b55e68ab7452\",\n\t\t\t\"secrets\": {\n\t\t\t\t\"control\": \"4f464b97d8726918ed815bf47d0abcf2f9214531886cdfae8eecc2a2db5dead8\",\n\t\t\t\t\"fs\": \"faa6c61d1a831226ffe351c04c51252441e7b7d5ca3d2d717257146fae8fd974\"\n\t\t\t},\n\t\t\t\"instance_only\": true,\n\t\t\t\"container_only\": true\n\t\t},\n\t\t\"instance_type\": \"\",\n\t\t\"type\": \"container\"\n\t}"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Responding to instance create"
t=2020-11-17T14:31:35+0000 lvl=info msg="Creating container" ephemeral=false name=alpha project=default
t=2020-11-17T14:31:35+0000 lvl=info msg="Created container" ephemeral=false name=alpha project=default
t=2020-11-17T14:31:35+0000 lvl=dbug msg="New task Operation: 6f0396ab-6abf-4dd5-89d4-aed398ba5616"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Started task operation: 6f0396ab-6abf-4dd5-89d4-aed398ba5616"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="\n\t{\n\t\t\"type\": \"async\",\n\t\t\"status\": \"Operation created\",\n\t\t\"status_code\": 100,\n\t\t\"operation\": \"/1.0/operations/6f0396ab-6abf-4dd5-89d4-aed398ba5616\",\n\t\t\"error_code\": 0,\n\t\t\"error\": \"\",\n\t\t\"metadata\": {\n\t\t\t\"id\": \"6f0396ab-6abf-4dd5-89d4-aed398ba5616\",\n\t\t\t\"class\": \"task\",\n\t\t\t\"description\": \"Creating container\",\n\t\t\t\"created_at\": \"2020-11-17T14:31:35.214948919Z\",\n\t\t\t\"updated_at\": \"2020-11-17T14:31:35.214948919Z\",\n\t\t\t\"status\": \"Running\",\n\t\t\t\"status_code\": 103,\n\t\t\t\"resources\": {\n\t\t\t\t\"containers\": [\n\t\t\t\t\t\"/1.0/containers/alpha\"\n\t\t\t\t],\n\t\t\t\t\"instances\": [\n\t\t\t\t\t\"/1.0/instances/alpha\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"metadata\": null,\n\t\t\t\"may_cancel\": false,\n\t\t\t\"err\": \"\",\n\t\t\t\"location\": \"none\"\n\t\t}\n\t}"
t=2020-11-17T14:31:35+0000 lvl=dbug msg=Handling ip=@ method=GET protocol=unix url=/1.0/operations/6f0396ab-6abf-4dd5-89d4-aed398ba5616 username="uid=1004"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="CreateInstanceFromMigration started" args="{Name:alpha Description: Config:map[] Snapshots:[] MigrationType:{FSType:ZFS Features:[compress]} TrackProgress:false Refresh:false Live:true VolumeSize:0 ContentType:}" driver=zfs instance=alpha pool=default project=default
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Using volume size from root disk config" driver=zfs pool=default size=10GB
t=2020-11-17T14:35:49+0000 lvl=dbug msg="CreateInstanceFromMigration finished" args="{Name:alpha Description: Config:map[] Snapshots:[] MigrationType:{FSType:ZFS Features:[compress]} TrackProgress:false Refresh:false Live:true VolumeSize:0 ContentType:}" driver=zfs instance=alpha pool=default project=default
t=2020-11-17T14:35:49+0000 lvl=dbug msg="Got error reading migration control socket read tcp 192.168.11.11:42140->192.168.11.12:8443: use of closed network connection"
t=2020-11-17T14:35:49+0000 lvl=dbug msg="Success for task operation: 6f0396ab-6abf-4dd5-89d4-aed398ba5616"
t=2020-11-17T14:35:49+0000 lvl=dbug msg="Event listener finished: 261ff797-4eac-4a58-a6ce-f0296f61672d"
t=2020-11-17T14:35:49+0000 lvl=dbug msg="Disconnected event listener: 261ff797-4eac-4a58-a6ce-f0296f61672d"
And this is the matching log from the remote host:
t=2020-11-17T14:31:33+0000 lvl=dbug msg="Found cert" name=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:33+0000 lvl=dbug msg=Handling ip=192.168.11.11:42120 method=GET protocol=tls url=/1.0 username=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:33+0000 lvl=dbug msg="Found cert" name=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:33+0000 lvl=dbug msg="Found cert" name=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:33+0000 lvl=dbug msg=Handling ip=192.168.11.11:42122 method=GET protocol=tls url="/1.0/instances?recursion=1" username=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:34+0000 lvl=dbug msg="Found cert" name=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:34+0000 lvl=dbug msg=Handling ip=192.168.11.11:42132 method=GET protocol=tls url=/1.0 username=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:34+0000 lvl=dbug msg="Found cert" name=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Found cert" name=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:35+0000 lvl=dbug msg=Handling ip=192.168.11.11:42134 method=GET protocol=tls url=/1.0/instances/alpha username=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Found cert" name=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:35+0000 lvl=dbug msg=Handling ip=192.168.11.11:42136 method=GET protocol=tls url=/1.0/events username=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:35+0000 lvl=dbug msg="New event listener: e79ad27a-7aef-4631-a7cc-7c4d6c78f6e6"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Found cert" name=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:35+0000 lvl=dbug msg=Handling ip=192.168.11.11:42138 method=POST protocol=tls url=/1.0/instances/alpha username=25330df5081b13a960b704c10e922ea0e47dc95947ddcd322aaecb68944c6b55
t=2020-11-17T14:31:35+0000 lvl=dbug msg="\n\t{\n\t\t\"name\": \"\",\n\t\t\"migration\": true,\n\t\t\"live\": false,\n\t\t\"instance_only\": true,\n\t\t\"container_only\": true,\n\t\t\"target\": null\n\t}"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="New websocket Operation: 1d5105fe-f854-49a3-8f9e-b55e68ab7452"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Started websocket operation: 1d5105fe-f854-49a3-8f9e-b55e68ab7452"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="\n\t{\n\t\t\"type\": \"async\",\n\t\t\"status\": \"Operation created\",\n\t\t\"status_code\": 100,\n\t\t\"operation\": \"/1.0/operations/1d5105fe-f854-49a3-8f9e-b55e68ab7452\",\n\t\t\"error_code\": 0,\n\t\t\"error\": \"\",\n\t\t\"metadata\": {\n\t\t\t\"id\": \"1d5105fe-f854-49a3-8f9e-b55e68ab7452\",\n\t\t\t\"class\": \"websocket\",\n\t\t\t\"description\": \"Migrating container\",\n\t\t\t\"created_at\": \"2020-11-17T14:31:35.14657045Z\",\n\t\t\t\"updated_at\": \"2020-11-17T14:31:35.14657045Z\",\n\t\t\t\"status\": \"Running\",\n\t\t\t\"status_code\": 103,\n\t\t\t\"resources\": {\n\t\t\t\t\"containers\": [\n\t\t\t\t\t\"/1.0/containers/alpha\"\n\t\t\t\t],\n\t\t\t\t\"instances\": [\n\t\t\t\t\t\"/1.0/instances/alpha\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"metadata\": {\n\t\t\t\t\"control\": \"4f464b97d8726918ed815bf47d0abcf2f9214531886cdfae8eecc2a2db5dead8\",\n\t\t\t\t\"fs\": \"faa6c61d1a831226ffe351c04c51252441e7b7d5ca3d2d717257146fae8fd974\"\n\t\t\t},\n\t\t\t\"may_cancel\": true,\n\t\t\t\"err\": \"\",\n\t\t\t\"location\": \"none\"\n\t\t}\n\t}"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Allowing untrusted GET" ip=192.168.11.11:42140 url="/1.0/operations/1d5105fe-f854-49a3-8f9e-b55e68ab7452/websocket?secret=4f464b97d8726918ed815bf47d0abcf2f9214531886cdfae8eecc2a2db5dead8"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Connected websocket Operation: 1d5105fe-f854-49a3-8f9e-b55e68ab7452"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Handled websocket Operation: 1d5105fe-f854-49a3-8f9e-b55e68ab7452"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Allowing untrusted GET" ip=192.168.11.11:42142 url="/1.0/operations/1d5105fe-f854-49a3-8f9e-b55e68ab7452/websocket?secret=faa6c61d1a831226ffe351c04c51252441e7b7d5ca3d2d717257146fae8fd974"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Connected websocket Operation: 1d5105fe-f854-49a3-8f9e-b55e68ab7452"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="Handled websocket Operation: 1d5105fe-f854-49a3-8f9e-b55e68ab7452"
t=2020-11-17T14:31:35+0000 lvl=dbug msg="MigrateInstance started" args="&{Name:alpha Snapshots:[] MigrationType:{FSType:ZFS Features:[compress]} TrackProgress:true MultiSync:true FinalSync:false Data:<nil> ContentType:}" driver=zfs instance=alpha pool=array project=default
t=2020-11-17T14:31:36+0000 lvl=dbug msg="Updated metadata for websocket Operation: 1d5105fe-f854-49a3-8f9e-b55e68ab7452"
<<<Lines repeated every second deleted>>>
t=2020-11-17T14:35:49+0000 lvl=dbug msg="Updated metadata for websocket Operation: 1d5105fe-f854-49a3-8f9e-b55e68ab7452"
t=2020-11-17T14:35:49+0000 lvl=dbug msg="MigrateInstance finished" args="&{Name:alpha Snapshots:[] MigrationType:{FSType:ZFS Features:[compress]} TrackProgress:true MultiSync:true FinalSync:false Data:map[filesystem:srv/lxd/containers/alpha@migration-d3694b80-d76b-4d90-9744-9ab2089784d2] ContentType:}" driver=zfs instance=alpha pool=array project=default
t=2020-11-17T14:35:49+0000 lvl=dbug msg="MigrateInstance started" args="&{Name:alpha Snapshots:[] MigrationType:{FSType:ZFS Features:[compress]} TrackProgress:true MultiSync:true FinalSync:true Data:map[filesystem:srv/lxd/containers/alpha@migration-d3694b80-d76b-4d90-9744-9ab2089784d2] ContentType:}" driver=zfs instance=alpha pool=array project=default
t=2020-11-17T14:35:49+0000 lvl=dbug msg="Event listener finished: e79ad27a-7aef-4631-a7cc-7c4d6c78f6e6"
t=2020-11-17T14:35:49+0000 lvl=dbug msg="Disconnected event listener: e79ad27a-7aef-4631-a7cc-7c4d6c78f6e6"