hpe-storage / python-hpedockerplugin

HPE Native Docker Plugin
Apache License 2.0
36 stars 64 forks source link

Fix issue #672 #674

Closed wdurairaj closed 5 years ago

wdurairaj commented 5 years ago

Rework fix for issue #672

For some reason os.path.isfile(path) and os.path.isdir(path) returns False, even though the file/dir exists Analysis

docker@csosbe03b10:~/ansible_playbooks$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.isfile('/dev/dm-34')
False
>>> os.path.isdir('/dev/dm-34')
False
>>> os.path.islink('/dev/dm-34')
False
>>> os.path.exists('/dev/dm-34')
True
>>> os.path.exists('/opt/hpe/data/hpedocker-dm-uuid-mpath-360002ac0000000000001db570001db31')
True
>>> quit()