[rancid] .cloginrc add method hostname {ssh:-port} for mtlogin/mtrancid?

Lukasz Sokol el.es.cr at gmail.com
Thu Jun 4 09:42:01 UTC 2015


Hi,

On 03/06/15 17:36, heasley wrote:

> 
> seems that you truncated the output here; the spawn, etc are missing.  we'd
> need to see the output leading up to this.
> 

No I did not -  it just did not print it there. here are 2 runs : one on the host
that used to work (workinghost) and one on the host with shifted port (shiftedhost):

(shiftedhost has the method {ssh:65122} in .cloginrc )

~$ bin/mtlogin workinghost
workinghost

(here it just hung, printed NOTHING, with -d the output is exactly as I pasted last time,
no spawn line...)


~bin/mtlogin -d shiftedhost
shiftedhost
spawn ssh -i /var/lib/rancid/.ssh/id_ssa_for_mt_backup -c 3des -x -l username+ct shiftedhost

# is it me or it still does not add '-p 65122' here?

parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {6388}
Gate keeper glob pattern for '(Host key not found |The authenticity of host .* be established).* \(yes/no\)\?' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for 'HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?' is 'HOST IDENTIFICATION HAS CHANGED* (yes/no)\?'. Activating booster.
Gate keeper glob pattern for 'HOST IDENTIFICATION HAS CHANGED[^
]+' is 'HOST IDENTIFICATION HAS CHANGED*'. Activating booster.
Gate keeper glob pattern for 'Offending key for .* \(yes/no\)\?' is 'Offending key for * (yes/no)\?'. Activating booster.
Gate keeper glob pattern for 'Login:' is 'Login:'. Activating booster.
Gate keeper glob pattern for '[Pp]assword:' is '?assword:'. Activating booster.
Gate keeper glob pattern for '^Confirm seeing above note' is 'Confirm seeing above note'. Activating booster.
Gate keeper glob pattern for '] > ' is '] > '. Activating booster.

expect: does "" (spawn_id exp6) match glob pattern "Connection refused"? no
"Unknown host\r\n"? no
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).* \(yes/no\)\?"? (No Gate, RE only) gate=yes re=no
"HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? Gate "HOST IDENTIFICATION HAS CHANGED* (yes/no)\?"? gate=no
"HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? Gate "HOST IDENTIFICATION HAS CHANGED*"? gate=no
"Offending key for .* \(yes/no\)\?"? Gate "Offending key for * (yes/no)\?"? gate=no
"Login:"? Gate "Login:"? gate=no
"[Pp]assword:"? Gate "?assword:"? gate=no
"^Confirm seeing above note"? Gate "Confirm seeing above note"? gate=no
"Password incorrect"? no
"] > "? Gate "] > "? gate=no
"denied"? no
"\r\n"? no
ssh: connect to host shiftedhost port 22: Connection refused

expect: does "ssh: connect to host shiftedhost port 22: Connection refused\r\r\n" (spawn_id exp6) match glob pattern "Connection refused"? yes
expect: set expect_out(0,string) "Connection refused"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "ssh: connect to host shiftedhost port 22: Connection refused"
can not find channel named "exp6"
    while executing
"expect eof"
    invoked from within
"expect {
	"Connection refused" {
	    catch {close}; catch {wait};
	    sleep 0.3
		expect eof
		send_user "\nError: Connection Refused\n"; wait; retu..."
    (procedure "login" line 72)
    invoked from within
"login $router $ruser $userpswd $passwd $prompt $cmethod $cyphertype $identfile"
    ("foreach" body line 87)
    invoked from within
"foreach router [lrange $argv $i end] {
    set router [string tolower $router]
    send_user "$router\n"

    # Figure out prompt.
    set prompt "] >..."
    (file "bin/mtlogin" line 480)

without the patch:

~$ bin/mtlogin.orig -d workinghost
workinghost
spawn ssh -i /var/lib/rancid/.ssh/id_ssa_for_mt_backup -c 3des -x -l username+ct workinghost

(and the rest is working then, skipping.)




More information about the Rancid-discuss mailing list