Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-14164

libcfs_str2nid() gives undesirable output

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      On my system (for some reason) resolving an unknown hostname returns the loopback IP (127.0.0.1).

      ># getent hosts mgs.exports.192.168.122.100
      ::1 mgs.exports.192.168.122.100.localhost 

      this ends up breaking specific commands, like

       lctl get_param -n *.MGS*.exports.192.168.122.100@tcp.uuid

      this ends up trying to look at:

       mgs/mgs/exports/192/168/122/100@tcp999/uuid

      The reason is that get hostbyname() called from clean_path()->libcfs_str2nid() returns 127.0.0.1 for "exports.192.168.122.100". This leads the to the NID not found in the string which leads to the IP address being included in the path.

      To be clear this seems to be an issue on my setup. Filing this ticket to raise awareness that this could happen.

      I ran into it while trying to run sanity-sec:test_31

      Attachments

        Activity

          People

            wc-triage WC Triage
            ashehata Amir Shehata (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: