mysql-lvm does not handle invalid snapshot names gracefully
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
holland-backup |
Fix Committed
|
High
|
Andrew Garner |
Bug Description
With a misconfiguration of the sort:
snapshot-name = /tmp/foo
Where snapshot-name is set rather than snapshot-
Right now, mysql-lvm is failing to catch the exception the volume API is raising when the snapshot cannot be found and this leads to a messy "uncaught exception" error. At the very least this should be caught and an appropriate error output and even better, the bad snapshot name should error out far before we get to this point.
LVM2 documents the valid snapshot names as:
VALID NAMES
The following characters are valid for VG and LV names: a-z A-Z 0-9 + _ . -
VG and LV names cannot begin with a hyphen. There are also various reserved names that are used internally by lvm that can not be used as LV or VG names. A VG cannot be called anything that exists in /dev/
at the time of creation, nor can it be called ’.’ or ’..’. A LV cannot be called ’.’ ’..’ ’snapshot’ or ’pvmove’. The LV name may also not contain the strings ’_mlog’ or ’_mimage’
Changed in holland-backup: | |
milestone: | none → 1.0.12 |
Changed in holland-backup: | |
importance: | Undecided → High |
Changed in holland-backup: | |
status: | New → Fix Committed |
assignee: | nobody → Andrew Garner (muzazzi) |
Feature branch here: https:/ /github. com/holland- backup/ holland/ tree/feature/ lp_1117683_ detect_ invalid_ lv_names
Should be included in holland 1.0.12