Missing Error Checking for Create Replication Task API Request?

irTwit

Dabbler
Joined
Aug 18, 2014
Messages
48
I am checking with the community if this is a bug. I didn't find it on the bug tracker or the forums.

Using a python script to create a replication task with the API (POST /api/v1.0/storage/replication/). The process will error out with the below message if parameter "remote_http_port" is not included in the request. This error is different from other required parameters. Other required parameters will return a message when the value is missing. Ex: "repl_remote_hostname": ["This field is required."]
File \"./freenasUI/storage/forms.py\", line 2461, in middleware_clean
remote_http_port = int(data.pop('remote_http_port', 80))

ValueError: invalid literal for int() with base 10: ''


This is the package I'm sending to the API.
"repl_begin": "00:00:00",
"repl_compression": "off",
"repl_enabled": false,
"repl_end": "23:59:59",
"repl_filesystem": "pond/backup",
"repl_followdelete": true,
"repl_limit": 0,
"repl_remote_cipher": "disabled",
"repl_remote_dedicateduser": null,
"repl_remote_dedicateduser_enabled": false,
"repl_remote_hostkey": "localhost KEY",
"repl_remote_hostname": "localhost",
"repl_remote_port": 22,
"repl_userepl": false,
"repl_zfs": "ExtBackup_01"

Also the API documentation says the "repl_remote_http_port" is a string.

Build: FreeNAS-11.2-U4 (Build Date: May 7, 2019 0:46)
 
Last edited:
D

dlavigne

Guest
Please create a report at bugs.ixsystems.com and post the issue number here.
 

irTwit

Dabbler
Joined
Aug 18, 2014
Messages
48
Top