Page MenuHomeVyOS Platform

Broken SFTP uploads
Closed, ResolvedPublic

Description

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.

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.4 Sagitta
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Related Objects

StatusSubtypeAssignedTask
In progressFEATURE REQUESTNone
ResolvedFEATURE REQUESTerkin
Resolvederkin

Event Timeline

scj643 triaged this task as High priority.Nov 30 2021, 9:59 PM
scj643 created this task.
scj643 created this object in space S1 VyOS Public.
Viacheslav changed the task status from Open to Needs testing.Dec 11 2021, 9:38 AM

Still with issues, VyOS 1.4-rolling-202112090318:

[email protected]# set system config-management commit-archive location sftp://foo:[email protected]/
[edit]
[email protected]# 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]
[email protected]# 
[edit]

But save is working:

[email protected]# save sftp://foo:[email protected]/
Saving configuration to 'sftp://foo:[email protected]/'...
Done
[edit]
[email protected]#
Viacheslav lowered the priority of this task from High to Normal.Dec 11 2021, 10:25 AM