The is_device_mounted has incorrect assumptions about disk naming

Bug #1528262 reported by Peter Sabaini
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
New
Undecided
Unassigned

Bug Description

The utility function charmhelpers.contrib.storage.linux.util.is_device_mounted() assumes that device names that end in numbers are partitions. This assumption is overly broad, it doesn't hold in general eg. for loop devices, device names that are passed in via physical path (/dev/disk/by-path) and device names that are passed in by-label or by-uuid if those happen to end in numbers.

The result is that the function will return False even if a partition on the passed-in device would be mounted. This could potentially be quite dangerous.

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.