parse failures of lvs output in locales other than "C"

Bug #1256121 reported by Marc - A. Dahlhaus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
holland-backup
In Progress
Critical
Andrew Garner

Bug Description

To test the failure try to use mysqldump-lvm and set your LANG e.g. to de_DE.utf8

In this case the value of vg_name will be filled with the incorrect value of modules which leads to a LookupError when executing blkid on a wrong dev path.

The atteched patch fixes the problem for me :)

Revision history for this message
Marc - A. Dahlhaus (mad-wol) wrote :
summary: - parse failures of lvs output in locales othen than "C"
+ parse failures of lvs output in locales other than "C"
Revision history for this message
Andrew Garner (muzazzi) wrote :

Thanks for the report and fix. Yeah, I see this comes from -o snap_percent which uses "," as the decimal mark in certain locales and holland also unfortunately uses the ',' as the lvs --separator. I'll make sure this gets added as some sort of regression test.

Forcing the locale is likely safe enough for the lvm commands. However, perhaps fixing the parsing by adjusting the --separator option makes sense here as well (e.g. the equivalent of lvs [options] --separator $'\t')

Changed in holland-backup:
assignee: nobody → Andrew Garner (muzazzi)
milestone: none → 1.0.12
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Marc - A. Dahlhaus (mad-wol) wrote :

We had some systems that used LC_ALL as well and had to extend the patch

Andrew Garner (muzazzi)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.