abbbi / abbbi/virtnbdbackup

Use nbd.connect_systemd_socket_activation to run nbdkit/qemu-nbd commands

未关闭
#58 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
code-cleanup
主要语言
Python
星标
518
派生
57
PR 合并指标
30 天内没有已合并 PR

描述

Currently using subprocess.* functions to run qemu-nbd. I think this can be simplified by using libnbd's builtin
connect_systemd_socket_activation and nbd.connect_command. Example:

https://github.com/libguestfs/libnbd/blob/master/python/examples/checksum.py#L35

and:

https://github.com/libguestfs/libnbd/blob/master/python/t/590-aio-copy.py#L122

```
09:51 abi: it's not connected with systemd except that they invented the protocol
09:51 it doesn't require systemd to be installed or running
```

Unfortunately there is currently no way to catch stderr, means if underlying command fails for some reason, errors cannot be
catched and written to logfile accordingly. Need to check if its possible to redirect errors for all commands to a logfile.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。