Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
abbbi opened this issue Jul 7, 2022 · 1 comment

Comments

@abbbi
Copy link
Owner

abbbi commented Jul 7, 2022

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 <rwmjones> abi: it's not connected with systemd except that they invented the protocol
09:51 <rwmjones> 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.

@abbbi
Copy link
Owner Author

abbbi commented Sep 29, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant