projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement BuildHooksEnv for NoHooksLU
[ganeti-local]
/
lib
/
ssh.py
diff --git
a/lib/ssh.py
b/lib/ssh.py
index
f0362b4
..
e891314
100644
(file)
--- a/
lib/ssh.py
+++ b/
lib/ssh.py
@@
-227,7
+227,12
@@
class SshRunner:
remotehostname = retval.stdout.strip()
if not remotehostname or remotehostname != node:
remotehostname = retval.stdout.strip()
if not remotehostname or remotehostname != node:
- return False, "hostname mismatch, got %s" % remotehostname
+ if node.startswith(remotehostname + "."):
+ msg = "hostname not FQDN"
+ else:
+ msg = "hostname mistmatch"
+ return False, ("%s: expected %s but got %s" %
+ (msg, node, remotehostname))
return True, "host matches"
return True, "host matches"