canonical / juju-backup-all

Tool for backing up charms, local juju configs, and juju controllers.
Apache License 2.0
0 stars 5 forks source link

scp from lxd units will fail because hostname is None #28

Closed zxhdaze closed 7 months ago

zxhdaze commented 7 months ago

For lxd units, backup will fail with:

"error_reason": "command failed: ['scp', '-i', '/var/lib/jujubackupall/ssh/juju_id_rsa', '-o', 'StrictHostKeyChecking=no', '-q', '-B', 'ubuntu@None:/home/ubuntu/etcd-snapshots/etcd-snapshot-2021-12-28-16.13.13.tar.gz', '/mnt/juju-backup/site-manual-juju-controller/k8s-prod/etcd']"

The root issue is caused by machine.dns_name in python-libjuju0, which returns None.

However, before upstream is fixed (which would be slow and not in our control), we can add a patch in this repo to workaround the issue.


Imported from Launchpad using lp2gh.