This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/724/

Review request for OpenLMI Developers.
By Jan Synacek.
Repository: openlmi-storage

Description

Fix GetInstance() and EnumInstances() with NoDevice devices.

NoDevice devices are somewhat special in that there can be multiple
devices with the same path.

For example, on my system, tmpfs is mounted at /dev/shm, /run, /tmp
and /system/fs/cgroup. In Blivet, this is represented by four devices
with names tmpfs.1, tmpfs.2, etc. and they all have their path set as
tmpfs.

The original EnumInstances() code would process all tmpfs devices and
iterate over all of their mountpoints resulting in multiple instances
of the same device.

The GetInstance() uses getDeviceByPath() that only returned the first
tmpfs device in the list, because they all had the same path.

Diffs

  • src/lmi/storage/LMI_MountedFileSystem.py (0f973386cfc09f9ff5f18e85fe60b16c7205619d)

View Diff