Revision 31821208 lib/ssh.py

b/lib/ssh.py
227 227
    remotehostname = retval.stdout.strip()
228 228

  
229 229
    if not remotehostname or remotehostname != node:
230
      return False, "hostname mismatch, got %s" % remotehostname
230
      if node.startswith(remotehostname + "."):
231
        msg = "hostname not FQDN"
232
      else:
233
        msg = "hostname mistmatch"
234
      return False, ("%s: expected %s but got %s" %
235
                     (msg, node, remotehostname))
231 236

  
232 237
    return True, "host matches"
233 238

  

Also available in: Unified diff