-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Ceph mount using DNS name #142
base: master
Are you sure you want to change the base?
Conversation
# /proc/mounts than was given to the mount command... | ||
# | ||
# E.g. ceph will resolve DNS names given into IP | ||
# addresses to be presented in /proc/mounts... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 2 issues with this change:
- It affects all kinds of mounts to solve a ceph specific issue. We need a fix that does not change the system behavior with other mounts.
- Even for ceph mount, this is incorrect. With this change if you have 2 ceph mounts, one mounted and one not, mounting the second mount will fail since we will consider it as mounted, comparing only the remote file part "/", which is same in both mounts.
I think that what we learn from this is not that we cannot expect to find the mount options in /proc/mounts, but that we cannot work with ceph mounts since they behave in a non-standard way.
We need a way to detect if a mount is mounted. The current code accept a "server:path" format and mount it at /rhev/data-center/mnt/srever:path. Since mounts can become stale, and can be unmounted, we must make sure that /rhev/data-center/mnt/srever:path is mounted, and that the remove server and path match.
In summary, a fix must not change anything for other storage, and provide a good way to match the mount with the server:path. A possible solution can be resolving the DNS name before the mount so the local mount path will match /proc/mounts. Or maybe a change in ceph to disable resolving before the mount.
This change also break the tests:
https://github.com/oVirt/vdsm/actions/runs/2192442081
1885010
to
ec49333
Compare
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...
ec49333
to
5fde0d2
Compare
Case in point: For Ceph file systems, the mount command can look like this:
but the resulting entry in /proc/mounts will NOT look identical, as ceph will resolve DNS names into their IP addresses:
(in this example
monitors.storage.example.com
was a DNS entryresolving to 3 IP addresses).
Lesson learned: We cannot rely on mount options being carried
unmolested into /proc/mounts...
Bug-Url: https://bugzilla.redhat.com/1995610