T3356: broke uploads to SFTP with the following error.
TypeError: __init__() got an unexpected keyword argument 'source'
The source kwarg is None so it needs to be popped somewhere.
T3356: broke uploads to SFTP with the following error.
TypeError: __init__() got an unexpected keyword argument 'source'
The source kwarg is None so it needs to be popped somewhere.
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
In progress | FEATURE REQUEST | None | T3355 Remove all remaining legacy Vyatta code | ||
Resolved | FEATURE REQUEST | erkin | T3356 Script for remote file transfers | ||
Resolved | erkin | T4029 Broken SFTP uploads |
https://github.com/vyos/vyatta-config-mgmt/blob/current/scripts/vyatta-commit-push.pl#L71-L82 seems to be the root cause for this.
Still with issues, VyOS 1.4-rolling-202112090318:
vyos@r11-roll# set system config-management commit-archive location sftp://foo:[email protected]/ [edit] vyos@r11-roll# commit Archiving config... sftp://192.168.122.14/ Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3/dist-packages/vyos/remote.py", line 312, in upload urlc(urlstring, *args, **kwargs).upload(local_path) File "/usr/lib/python3/dist-packages/vyos/remote.py", line 202, in upload with self._establish() as ssh, ssh.open_sftp() as sftp: File "/usr/lib/python3/dist-packages/vyos/remote.py", line 189, in _establish sock = socket.create_connection((self.hostname, self.port), socket.getdefaulttimeout(), self.source) File "/usr/lib/python3.9/socket.py", line 830, in create_connection sock.bind(source_address) TypeError: str, bytes or bytearray expected, not NoneType [edit] vyos@r11-roll# [edit]
But save is working:
vyos@r11-roll# save sftp://foo:[email protected]/ Saving configuration to 'sftp://foo:[email protected]/'... Done [edit] vyos@r11-roll#