Fence agents diffes in EOL they accept. EOL
is quite universal but in some cases
it is translated to
what makes login process impossible to complete as it ends like
(capitals are fence agent response)
Login: USER
Password:
Login: PASSWORD
Until now there was a device option that handles that login_eol_lf but we found out that there are few
APC devices which does not work correctly with
and needs
. So we have to autodetect it, this feature was
added to standard library. As it can also helps with common problem when you have to write exactly
conn.send("message" + "
"). Method conn.sendline("") uses EOL according to platform, so we have decided to create
new method conn.sendxline (need a better name) which uses correct EOL. We need conn.sendline in communication with other local
application so we should not reuse it for this purpose.
---
fence/agents/lib/fencing.py.py | 37 +++++++++++++++++++++++--------------
1 files changed, 23 insertions(+), 14 deletions(-)
## Do the delay of the fence device before logging in
## Delay is important for two-node clusters fencing but we do not need to delay 'status' operations
@@ -939,7 +939,7 @@ def fence_login(options):
fail_usage("Failed: You have to enter passphrase (-p) for identity file")
else:
try:
- conn = fspawn(TELNET_PATH)
+ conn = fspawn(options, TELNET_PATH)
conn.send("set binary
")
conn.send("open %s -%s
"%(options["-a"], options["-u"]))
except pexpect.ExceptionPexpect, ex:
@@ -948,11 +948,20 @@ def fence_login(options):
"are not in the spec file and must be installed separately." + "
")
sys.exit(EC_GENERIC_ERROR)