[11.3-U2] Pull replication: AttributeError: COMPRESS

f00b4r00

Dabbler
Joined
Jan 5, 2020
Messages
41
Hi,

I've setup pull replication on a "slave" FreeNAS running 11.3-U2, that pulls from a master running 11.2-U8.

The setup is as follows:
Transport: SSH+NETCAT
Netcat active side: LOCAL
Recursive: true
Properties: true
Allow large blocks: true
Compress: true

If I try to run this task with these settings, it will fail with:
Code:
* Replication "TEST" failed: Traceback (most recent call last):
File "/tmp/zettarepl--transport--ssh_netcat_helper.py--bbd790a8e68026f3fab64fc323484eda", line 104, in
flags.add(libzfs.SendFlag.COMPRESS)
File "/usr/local/lib/python3.6/enum.py", line 326, in __getattr__
raise AttributeError(name) from None
AttributeError: COMPRESS
failed to read from stream..


If I uncheck "Compress", then the replication works. I'm a bit surprised because zfs on both sides support -c: is this a bug?

Also, while I'm there: the web interface on 11.3 feels much much more sluggish on my browser (tested in Safari and Brave) that 11.2. To the point that there is a significant (can be measured in seconds) lag when scrolling around. This affects in particular setting pages like the setting page of the Replication Task. Trying to open the Task Manager literally hangs the browser window.

HTH
 

f00b4r00

Dabbler
Joined
Jan 5, 2020
Messages
41
Still happens with 11.3-U3.1 trying to pull from 11.2-U8
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Have you remembered to enable compression in the SSH service on both ends? The compression here isn't the LZ4 compression used for the ZFS data, but the SSH compression during the stream.
 

f00b4r00

Dabbler
Joined
Jan 5, 2020
Messages
41
Have you remembered to enable compression in the SSH service on both ends? The compression here isn't the LZ4 compression used for the ZFS data, but the SSH compression during the stream.
Err... No it's not. I'm using SSH+NETCAT, and the error is in libzfs. The checkbox says "Allow Compressed WRITE records" in 11.3-U3.1. It's definitely the ZFS compression, not the SSH one. The equivalent of 'zfs send -c'.

But I also noticed that in SSH+NETCAT mode, the third-party stream compression options (plzip/pigz/etc) are unavailable, which is a serious bummer. I might eventually use a good old script to do this my way :p
 

f00b4r00

Dabbler
Joined
Jan 5, 2020
Messages
41
And it seems resume (which was the primary reason for this particular setup, since 11.2 doesn't handle it) doesn't work either :(

Code:
[2020/05/24 00:22:38] INFO     [Thread-8] [zettarepl.paramiko.replication_task__task_1] Connected (version 2.0, client OpenSSH_7.9-hpn14v15)
[2020/05/24 00:22:39] INFO     [Thread-8] [zettarepl.paramiko.replication_task__task_1] Authentication (publickey) successful!
[2020/05/24 00:22:40] INFO     [replication_task__task_1] [zettarepl.replication.run] For replication task 'task_1': doing pull from 'poolain' to 'poolette/Replik/PeroPero' of snapshot='auto-20200524.0015-2m' incremental_base='auto-20200503.0015-2m' receive_resume_token=None
[2020/05/24 00:22:41] INFO     [replication_task__task_1] [zettarepl.paramiko.replication_task__task_1.sftp] [chan 3] Opened sftp connection (server version 3)
[2020/05/24 00:22:41] INFO     [replication_task__task_1] [zettarepl.transport.ssh_netcat] Automatically chose connect address '10.40.10.220'
[2020/05/24 00:22:42] INFO     [replication_task__task_1.listen_exec.wait] [zettarepl.transport.zfscli.exception] Caught 'failed to create mountpoint' but ('poolette/Replik/PeroPero', 'auto-20200524.0015-2m') is present on remote side. Assuming replication success.
[2020/05/24 00:22:46] INFO     [replication_task__task_1] [zettarepl.replication.run] For replication task 'task_1': doing pull from 'poolain/TimeMachine' to 'poolette/Replik/PeroPero/TimeMachine' of snapshot='auto-20200524.0015-2m' incremental_base='auto-20200503.0015-2m' receive_resume_token=None
[2020/05/24 00:22:47] INFO     [replication_task__task_1] [zettarepl.transport.ssh_netcat] Automatically chose connect address '10.40.10.220'
[2020/05/25 06:56:28] WARNING  [replication_task__task_1.process] [zettarepl.transport.base_ssh.root@peropero.paris.lan.replication_process.task_1] Listen side has not terminated within 5 seconds after connect side error
[2020/05/25 06:56:28] ERROR    [replication_task__task_1] [zettarepl.replication.run] For task 'task_1' unhandled replication error SshNetcatExecException(ExecException(-1, ''), None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/zettarepl/replication/run.py", line 143, in run_replication_tasks
    run_replication_task_part(replication_task, source_dataset, src_context, dst_context, observer)
  File "/usr/local/lib/python3.7/site-packages/zettarepl/replication/run.py", line 204, in run_replication_task_part
    run_replication_steps(step_templates, observer)
  File "/usr/local/lib/python3.7/site-packages/zettarepl/replication/run.py", line 389, in run_replication_steps
    replicate_snapshots(step_template, incremental_base, snapshots, observer)
  File "/usr/local/lib/python3.7/site-packages/zettarepl/replication/run.py", line 444, in replicate_snapshots
    run_replication_step(step_template.instantiate(incremental_base=incremental_base, snapshot=snapshot), observer)
  File "/usr/local/lib/python3.7/site-packages/zettarepl/replication/run.py", line 500, in run_replication_step
    ReplicationProcessRunner(process, monitor).run()
  File "/usr/local/lib/python3.7/site-packages/zettarepl/replication/process_runner.py", line 33, in run
    raise self.process_exception
  File "/usr/local/lib/python3.7/site-packages/zettarepl/replication/process_runner.py", line 37, in _wait_process
    self.replication_process.wait()
  File "/usr/local/lib/python3.7/site-packages/zettarepl/transport/ssh_netcat.py", line 183, in wait
    raise SshNetcatExecException(connect_exec_error, self.listen_exec_error) from None
zettarepl.transport.ssh_netcat.SshNetcatExecException: Command failed with code -1
No error
 
Top