Re: [Libguestfs] [PATCH] lib: Increase default memsize to 1280 (RHBZ#1837765).

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 05:42:29PM +0100, Richard W.M. Jones wrote: > Argon2 is the default LUKS Password-Based Key Derivation Function > (PBKDF) for some new guests such as RHEL 8.2 and Fedora. It is > designed to be "memory hard", meaning that by design it requires large > amounts of memory,

[Libguestfs] [PATCH] lib: Increase default memsize to 1280 (RHBZ#1837765).

2020-06-30 Thread Richard W.M. Jones
Argon2 is the default LUKS Password-Based Key Derivation Function (PBKDF) for some new guests such as RHEL 8.2 and Fedora. It is designed to be "memory hard", meaning that by design it requires large amounts of memory, making it expensive to brute-force. Unfortunately the default for guests

[Libguestfs] [PATCH nbdkit 4/5] nbd: Simplify code that checks only one connection parameter was passed.

2020-06-30 Thread Richard W.M. Jones
Also: * Reorder if (uri) .. else if (sockname) .. else if (hostname) so that the same ordering is used when we create the connection later. * Moved the comments around to more closely reflect what the function actually does. This should be pure refactoring. --- plugins/nbd/nbd.c | 83

[Libguestfs] [PATCH nbdkit 5/5] nbd: Implement command= and socket-fd= parameters.

2020-06-30 Thread Richard W.M. Jones
[NOT WORKING - DEADLOCKS FOR UNCLEAR REASONS] * command='qemu-nbd -f qcow2 /path/to/qcow2' runs qemu-nbd (using systemd socket activation) as a subprocess. * socket-fd=5 allows the parent process to set up the NBD socket and pass the file descriptor down to nbdkit. These correspond closely

[Libguestfs] [PATCH nbdkit 3/5] tests/test-nbd.c: Test the shared=true flag.

2020-06-30 Thread Richard W.M. Jones
I thought for a while that this flag might be causing a problem with my other code. That doesn't seem to be the case. However this feature did lack a test, so add one. --- tests/test-nbd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test-nbd.c

[Libguestfs] [PATCH nbdkit 1/5] nbd: Rework the documentation.

2020-06-30 Thread Richard W.M. Jones
* Change the title so it's informative and searchable. * Remove references to the non-libnbd plugin. * Headings for examples. * Correct reference to qemu-nbd(8) man page. * General copy-editing to improve readability. * Change style in places so it matches other manual pages. ---

[Libguestfs] [PATCH nbdkit 2/5] tests/test-nbd.c: Improve comments.

2020-06-30 Thread Richard W.M. Jones
--- tests/test-nbd.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test-nbd.c b/tests/test-nbd.c index a8c4067e..2db7c035 100644 --- a/tests/test-nbd.c +++ b/tests/test-nbd.c @@ -52,11 +52,13 @@ main (int argc, char *argv[]) char *sockarg = NULL;

[Libguestfs] [PATCH nbdkit 0/5 NOT WORKING] nbd: Implement command= and socket-fd= parameters.

2020-06-30 Thread Richard W.M. Jones
The first four patches are fairly routine clean up and can be reviewed/applied on their own. The fifth patch is problematic as described below. At the moment if you want to proxy through to qemu-nbd (eg. for handling qcow2 files) it's rather complicated and you end up having to manage the

Re: [Libguestfs] [PATCH] daemon: inspect_fs_windows: Handle parted errors

2020-06-30 Thread Sam Eiderman
Yea, I noticed that commit, but since it was used in gpt too regardless of that commit, I decided not to mention this regression. I also noticed that list_filesystems() still works, this is probably due to filtering of devices (daemon/listfs.ml): "let devices = List.filter

Re: [Libguestfs] [PATCH v3] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)

2020-06-30 Thread Sam Eiderman
I see, well the problem is that for some reason SUSE11 did not encode some of their packages as UTF8 but rather used Latin-1. There are multiple possible solutions here: 1. Do not decode application description as a string, but rather as a byte array - I am not sure regarding other than Python

Re: [Libguestfs] [PATCH v3] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)

2020-06-30 Thread Sam Eiderman
Regarding reproducing this - if possible, simply install SLES11 SP4 from CD. I'm not sure how easy it will be for you nowadays since Suse just removed SLES11 from their Downloads page. Sam On Tue, Jun 30, 2020 at 11:53 AM Sam Eiderman wrote: > Hey Pino, > > Can you search for the previous

Re: [Libguestfs] [PATCH v3] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)

2020-06-30 Thread Sam Eiderman
Hey Pino, Can you search for the previous patches I submitted? I had some discussions regarding this with Daniel and Nir. Thanks! On Tue, Jun 30, 2020 at 11:43 AM Pino Toscano wrote: > On Sunday, 26 April 2020 20:14:03 CEST Sam Eiderman wrote: > > The python3 bindings create PyUnicode objects

Re: [Libguestfs] [PATCH v3] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)

2020-06-30 Thread Sam Eiderman
gentle ping On Wed, Jun 3, 2020 at 2:52 PM Sam Eiderman wrote: > On Wed, May 13, 2020 at 10:06 PM Richard W.M. Jones > wrote: > > > > On Sun, Apr 26, 2020 at 09:14:03PM +0300, Sam Eiderman wrote: > > > The python3 bindings create PyUnicode objects from application strings > > > on the guest

[Libguestfs] [PATCH] daemon: inspect_fs_windows: Handle parted errors

2020-06-30 Thread Sam Eiderman
By creating an empty disk and using it as the first disk of the vm (i.e. /dev/sda, /dev/sdb{1,2} contains the windows fses) we change the iteration order of the disks. This causes inspect_os() to fail since Parted returns a Unix_error if the device does not contain any partitions - fix this by

Re: [Libguestfs] [PATCH] daemon: inspect_fs_windows: Handle parted errors

2020-06-30 Thread Pino Toscano
On Tuesday, 30 June 2020 10:33:40 CEST Sam Eiderman wrote: > By creating an empty disk and using it as the first disk of the vm (i.e. > /dev/sda, /dev/sdb{1,2} contains the windows fses) we change the > iteration order of the disks. > This causes inspect_os() to fail since Parted returns a

Re: [Libguestfs] [PATCH v3] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)

2020-06-30 Thread Pino Toscano
On Tuesday, 30 June 2020 10:53:54 CEST Sam Eiderman wrote: > Hey Pino, > > Can you search for the previous patches I submitted? I had some discussions > regarding this with Daniel and Nir. Sure, I did read those, and I took it into account. What I said does not invalidate nor contradict that.

Re: [Libguestfs] [PATCH v3] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)

2020-06-30 Thread Pino Toscano
On Sunday, 26 April 2020 20:14:03 CEST Sam Eiderman wrote: > The python3 bindings create PyUnicode objects from application strings > on the guest (i.e. installed rpm, deb packages). > It is documented that rpm package fields such as description should be > utf8 encoded - however in some cases