Skip to content

Commit ec49333

Browse files
KarlJorgensensandrobonazzola
authored andcommitted
Case in point: For Ceph file systems, the mount command can look like this: mount -t ceph -o mds_namespace=ns1,name=ovirt,secret=xxx monitors.storage.example.com:/ /mnt but the resulting entry in /proc/mounts will NOT look identical, as ceph will resolve DNS names into their IP addresses: 192.168.1.5,192.168.1.6,192.168.1.7:/ /mnt ceph rw,seclabel,relatime,name=ovirt,secret=<hidden>,acl,mds_namespace=ovirt 0 0 (in this example "monitors.storage.example.com" was a DNS entry resolving to 3 IP addresses). Lesson learned: We cannot rely on mount options being carried unmolested into /proc/mounts...
1 parent fd1f929 commit ec49333

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/vdsm/storage/mount.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,13 @@ def getRecord(self):
248248
fs_specs = self.fs_spec, None
249249

250250
for record in _iterMountRecords():
251-
if self.fs_file == record.fs_file and record.fs_spec in fs_specs:
251+
if self.fs_file == record.fs_file:
252+
# Note: We cannot compare fs_spec, as some file
253+
# systems will record _different_ information in
254+
# /proc/mounts than was given to the mount command...
255+
#
256+
# E.g. ceph will resolve DNS names given into IP
257+
# addresses to be presented in /proc/mounts...
252258
return record
253259

254260
raise OSError(errno.ENOENT,

0 commit comments

Comments
 (0)