canonical / charm-duplicity

A charm that provides functionality for both manual and automatic backups for a deployed application
0 stars 3 forks source link

ssh backend not working #7

Closed jneo8 closed 11 months ago

jneo8 commented 11 months ago

I'm trying the ssh backend as described by the config, but can't get it to work:

0 $ juju config duplicity backend=ssh
[wait a moment]
0 $ juju config duplicity remote_backup_url
10.55.217.195/backup/
0 $ juju run-action --wait duplicity/5 do-backup
unit-duplicity-5:
  UnitId: duplicity/5
  id: "78"
  message: expected str, bytes or os.PathLike object, not NoneType
  results:
    Stderr: |
      Traceback (most recent call last):
        File "/var/lib/juju/agents/unit-duplicity-5/charm/actions/do-backup", line 68, in main
          action(args)
        File "/var/lib/juju/agents/unit-duplicity-5/charm/actions/do-backup", line 24, in do_backup
          output = helper.do_backup()
        File "/var/lib/juju/agents/unit-duplicity-5/charm/lib/lib_duplicity.py", line 205, in do_backup
          return self._executor(cmd)
        File "/var/lib/juju/agents/unit-duplicity-5/charm/lib/lib_duplicity.py", line 53, in _executor
          return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
        File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/usr/lib/python3.8/subprocess.py", line 493, in run
          with Popen(*popenargs, **kwargs) as process:
        File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/usr/lib/python3.8/subprocess.py", line 1639, in _execute_child
          self.pid = _posixsubprocess.fork_exec(
      TypeError: expected str, bytes or os.PathLike object, not NoneType
  status: failed
  timing:
    completed: 2023-02-17 14:11:53 +0000 UTC
    enqueued: 2023-02-17 14:11:47 +0000 UTC
    started: 2023-02-17 14:11:52 +0000 UTC

The same worked for scp or sftp.

I traced the problem to https://git.launchpad.net/charm-duplicity/tree/src/lib/lib_duplicity.py#n55, where the URL is built. But there's nothing for ssh defined. And I can't find any ssh backend in the duplicity man-page either. How is it supposed to work?


Imported from Launchpad using lp2gh.