scrapli / nornir_scrapli

scrapli's plugin for nornir
https://scrapli.github.io/nornir_scrapli/
MIT License
88 stars 12 forks source link

Nornir scrapli interactive skips task for all devices #143

Closed senthilkumar1985 closed 6 months ago

senthilkumar1985 commented 7 months ago

i have 2 interactive tasks in nornir scrapli. i have 2 issues. 1) if task 1 for 1 host out of 52 hits timeout sending interactive input to device. The rest of the devices do not run task 2. 2) why is this host hitting timed out sending interactive input to device? is this due to timeout_ops setting that has to be increased? i saw that i can set the timeout_transport to 0. where do i do this in nornir_scrapli?

def task1(nr) cmds_check = [ ("run bash", "bash-4.2$", False), ("sudo su", "bash-4.2$", False), ("more xxxxx.py | grep abcd", "bash-4.2$, False) failed string = ["#abcd"]

check = nr.run(task=send_interfactive, name="abc", interact_events=cmds_check, failed_when_contains=failed_string)

def task2(nr) cmds_exec = [ ("sudo sed -i 's|abcd|#abcd|' xxxx.py", "bash-4.2$", False)]

change = nr.run(task=send_interactive, name ="xxx", interact_events=cmds_exec)

def main(): task1(nr) task2(nr)