[PATCH] virpcivpd: reduce errors in log due to invalid VPD
christian.ehrhardt at canonical.com
Tue Oct 4 06:20:41 UTC 2022
On Thu, Sep 29, 2022 at 2:01 PM Michal Prívozník <mprivozn at redhat.com> wrote:
> On 9/27/22 12:17, christian.ehrhardt at canonical.com wrote:
> > From: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> > Sadly some devices provide invalid VPD data even with fully updated
> > firmware. Former hardning like 600f580d "PCI VPD: Skip fields with
> > invalid values" have already helped for those to some extent.
> > But if one happens to have such a device installed in the system,
> > despite all other things working properly the log potentially
> > flooded with messages like:
> > internal error: The keyword is not comprised only of uppercase ASCII
> > letters or digits
> > internal error: A field data length violates the resource length boundary.
> > The user can't do anything about it to change that, they will be there on
> > any libvirt restart and potentially distract from other more important
> > issues.
> > Since the vpd decoding is implemented rather resilient (if parsing fails
> > all goes on fine, the respective device just has no VPD data populated
> > eventually) we can lower those from virReportError(VIR_ERR_INTERNAL_ERROR
> > to just VIR_INFO. If needed for debugging people can set the level
> > accordingly, but otherwise we would no more fill the logs with errors
> > without a strong reason.
> > Fixes: https://launchpad.net/bugs/1990949
> > Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> > ---
> > src/util/virpcivpd.c | 47 +++++++++++++++-----------------------------
> > 1 file changed, 16 insertions(+), 31 deletions(-)
> Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
there was no other negative feedback and CI as well as local tests
with this applied worked fine.
Also v8.8.0 was tagged and the freeze lifted.
I could, but I'm only feeling confident to land apparmor changes
myself, would someone push this please?
Senior Staff Engineer, Ubuntu Server
More information about the libvir-list