Comment 1 for bug 1370053

Revision history for this message
Felipe Reyes (freyes) wrote : Re: storage.linux.util.is_device_mounted logic is swapped for device/partition

Hi,

I cannot reproduce the problem described, using revno 368 I get the following:

$ python
Python 2.7.9 (default, Apr 2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from charmhelpers.contrib.storage.linux.utils import *
>>> is_device_mounted(device='/dev/sda1')
True
>>> is_device_mounted(device='/dev/sda')
True
>>> is_device_mounted(device='/dev/sdf')
False
>>> is_device_mounted(device='/dev/sdf1')
False
>>>
$ bzr revno
368
$ mount|grep sda
/dev/sda6 on / type btrfs (rw,relatime,ssd,space_cache)
/dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
/dev/sda6 on /home type btrfs (rw,relatime,ssd,space_cache)
$ mount|grep sdf
# empty output

I'm setting this bug as 'incomplete', but please if you're still getting this error feel free to reopen it.

Best,