qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 540d91: block: Improve error message when ext


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 540d91: block: Improve error message when external snapsho...
Date: Mon, 27 May 2024 06:41:35 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 540d91b40c390faa565e613a85bc0950ca7e0775
      
https://github.com/qemu/qemu/commit/540d91b40c390faa565e613a85bc0950ca7e0775
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Improve error message when external snapshot can't flush

external_snapshot_action() reports bdrv_flush() failure to its caller
as

    An IO error has occurred

The errno code returned by bdrv_flush() is lost.

Improve this to

    Write to node '<device or node name>' failed: <description of errno>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240513141703.549874-2-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 21c06f57808c7236cca68ccc7d8df845c22cd998
      
https://github.com/qemu/qemu/commit/21c06f57808c7236cca68ccc7d8df845c22cd998
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M dump/win_dump.c

  Log Message:
  -----------
  dump/win_dump: Improve error messages on write error

create_win_dump() and write_run report qemu_write_full() failure to
their callers as

    An IO error has occurred

The errno set by qemu_write_full() is lost.

Improve this to

    win-dump: failed to write header: <description of errno>

and

    win-dump: failed to save memory: <description of errno>

This matches how dump.c reports similar errors.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240513141703.549874-3-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 29ad187c1c89fcf82d4e73e90bec9722d548efed
      
https://github.com/qemu/qemu/commit/29ad187c1c89fcf82d4e73e90bec9722d548efed
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  block/vmdk: Improve error messages on extent write error

vmdk_init_extent() reports blk_co_pwrite() failure to its caller as

    An IO error has occurred

The errno code returned by blk_co_pwrite() is lost.

Improve this to

    failed to write VMDK <what>: <description of errno>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240513141703.549874-4-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: c59fb13be7fd937c087ed103abad4c2d9d2bcfab
      
https://github.com/qemu/qemu/commit/c59fb13be7fd937c087ed103abad4c2d9d2bcfab
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M system/cpus.c

  Log Message:
  -----------
  cpus: Improve error messages on memsave, pmemsave write error

qmp_memsave() and qmp_pmemsave() report fwrite() error as

    An IO error has occurred

Improve this to

    writing memory to '<filename>' failed

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240513141703.549874-5-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: fdac62dbd3de7e65c5a79798097894a29125c60e
      
https://github.com/qemu/qemu/commit/fdac62dbd3de7e65c5a79798097894a29125c60e
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Rephrase message on failure to save / load Xen device state

Functions that use an Error **errp parameter to return errors should
not also report them to the user, because reporting is the caller's
job.  When the caller does, the error is reported twice.  When it
doesn't (because it recovered from the error), there is no error to
report, i.e. the report is bogus.

qmp_xen_save_devices_state() and qmp_xen_load_devices_state() violate
this principle: they call qemu_save_device_state() and
qemu_loadvm_state(), which call error_report_err().

I wish I could clean this up now, but migration's error reporting is
too complicated (confused?) for me to mess with it.

Instead, I'm merely improving the error reported by
qmp_xen_load_devices_state() and qmp_xen_load_devices_state() to the
QMP core from

    An IO error has occurred

to
    saving Xen device state failed

and

    loading Xen device state failed

respectively.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240513141703.549874-6-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Fabiano Rosas <farosas@suse.de>
Acked-by: Peter Xu <peterx@redhat.com>


  Commit: 5b957bf6d378cfa0c196b2be119449e086647612
      
https://github.com/qemu/qemu/commit/5b957bf6d378cfa0c196b2be119449e086647612
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M include/qapi/qmp/qerror.h

  Log Message:
  -----------
  qerror: QERR_IO_ERROR is no longer used, drop

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240513141703.549874-7-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: ecfc9890c41541fb08ce07a6ff26e7bd14f74967
      
https://github.com/qemu/qemu/commit/ecfc9890c41541fb08ce07a6ff26e7bd14f74967
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M qga/commands-win32.c

  Log Message:
  -----------
  qga-win32: Improve guest-set-user-password, guest-file-open errors

When guest-set-user-password's argument @password can't be converted
from UTF-8 to UTF-16, we report something like

    Guest agent command failed, error was 'Invalid sequence in conversion input'

Improve this to

    can't convert 'password' to UTF-16: Invalid sequence in conversion input

Likewise for argument @username, and guest-file-open argument @path,
even though I'm not sure you can actually get invalid input past the
QMP core there.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240514105829.729342-2-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>


  Commit: cec07c79a41827689f9b9ea7be47fd1ae17a1242
      
https://github.com/qemu/qemu/commit/cec07c79a41827689f9b9ea7be47fd1ae17a1242
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M qga/commands-win32.c
    M qga/commands.c

  Log Message:
  -----------
  qga: Shorten several error messages

Some, but not all error messages are of the form

    Guest agent command failed, error was '<actual error message>'

For instance, command guest-exec can fail with an error message like

    Guest agent command failed, error was 'Failed to execute child process 
“/bin/invalid-cmd42” (No such file or directory)'

Shorten this to just just the actual error message.  The guest-exec
example becomes

    Failed to execute child process “/bin/invalid-cmd42” (No such file or 
directory)

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240514105829.729342-3-armbru@redhat.com>
[Superfluous #include "qapi/qmp/qerror.h" deleted]
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>


  Commit: 2020337239b054447d0756ea75e970b35f7a541b
      
https://github.com/qemu/qemu/commit/2020337239b054447d0756ea75e970b35f7a541b
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M include/qapi/qmp/qerror.h

  Log Message:
  -----------
  qerror: QERR_QGA_COMMAND_FAILED is no longer used, drop

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240514105829.729342-4-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>


  Commit: ad10b4badc1dd5b28305f9b9f1168cf0aa3ae946
      
https://github.com/qemu/qemu/commit/ad10b4badc1dd5b28305f9b9f1168cf0aa3ae946
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M block/vmdk.c
    M blockdev.c
    M dump/win_dump.c
    M include/qapi/qmp/qerror.h
    M migration/savevm.c
    M qga/commands-win32.c
    M qga/commands.c
    M system/cpus.c

  Log Message:
  -----------
  Merge tag 'pull-error-2024-05-27' of https://repo.or.cz/qemu/armbru into 
staging

Error reporting patches for 2024-05-27

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmZUaB8SHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTnY0P/jr94u+NI8+Jykh8d/i5gz70dLS6F3oM
# PstnO9HXByCKeRRmTWesPnzd1idq9ZNnXTmZbriAv6sGduEBfOLyXmMLHj0L10EA
# tDrmFHQOS+9NcCeJ08SFRIgcxt6X9lUjGsoGXLxAfBZiWMsK18lXl5tTNGCtLQU5
# D1lc7byRHdVg+EzfhFqF6nU7UW63vNqtcwBElk1xc2zsU2yqX4pIvImTyRzUGC7h
# 8au68s3agFP/c98jgpljdI/V5TkgxAPa3OqkFXAjM9SLGi8szRxgLuMaufcOn5XQ
# F4/89GdhdvLGNFvpeBJyTud3NC0V2vDf7F4HABayHE8azYAu8/7H22SI+lvhnZi4
# m6yb2vP/x9+EVZxPoeT1TIY3N7W5wDJg8aIHCrLPtJXgnsBGTzEK6VydCeIjEl8Z
# Ai6WioKSFP6JhMT2a/6hAtceS2AWRnHhGx+BpaWYsr1FBWqJa4hgC+1IJWX3NI4G
# urmELw1B2RCOKB7jFusYNnKu67sVkT/eaxj+LcBwEi4XEddpCurqhi32SlpEJzcK
# JxQ/swGDD9hdx8Y5WPuRnUkPsvJO2uOJc50VSlDkdHg3ZCEgEhHuENOOvXjxtT5I
# nsgZEDRiUgn42AhhiFwulYUWt2dT/K974ZebEer305ajYaseilUQclATNlRNNVlV
# t16ViC6cIdCN
# =tAQ+
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 27 May 2024 04:01:51 AM PDT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]

* tag 'pull-error-2024-05-27' of https://repo.or.cz/qemu/armbru:
  qerror: QERR_QGA_COMMAND_FAILED is no longer used, drop
  qga: Shorten several error messages
  qga-win32: Improve guest-set-user-password, guest-file-open errors
  qerror: QERR_IO_ERROR is no longer used, drop
  migration: Rephrase message on failure to save / load Xen device state
  cpus: Improve error messages on memsave, pmemsave write error
  block/vmdk: Improve error messages on extent write error
  dump/win_dump: Improve error messages on write error
  block: Improve error message when external snapshot can't flush

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/60b54b67c63d...ad10b4badc1d

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



reply via email to

[Prev in Thread] Current Thread [Next in Thread]