[Swan-dev] kvm: explicitly ignore "Last login: " so that it isn't confused for "login: "

Andrew Cagney andrew.cagney at gmail.com
Thu Apr 22 15:25:14 UTC 2021


    Should fix:
     w6.shell east 1:30:40.02/1:03.05: read <<b'Last login: '>>>
     w6.shell east 1:30:40.02/1:03.05: b'login: $' matched
    which caused kvmrunner to get out-of-sync with the domain.

I should have pointed out that this is the symptom:

  File "/home/build/libreswan-web/script-repo/testing/utils/fab/virsh.py",
line 208, in guest_path
    raise AssertionError("the host path '%s' is not mounted on the
guest %s" % (host_path, self))
AssertionError: the host path
'/home/build/libreswan-web/test-repo/testing/pluto/newoe-18-poc-cop-port22-whack'
is not mounted on the guest domain w6.east

some more detail.

- because kvmrunner minsconstruced 'Last login: ' as a login prompt, it
sent the username 'root'
- this results in the output buffer containing:
     ...east# root \nroot: unknown command\neast #
  i.e., too many prompts
- the login code then matches the first prompt leaving things out-of-sync
- at this point there's a hack that should get things back in sync, but it
failed
- the code trying to cat /etc/fstab found the buffer containing:
     previous command\neast# cat /etc/fstab\neast#
  and picked up <previous command> which ment /testing didn't seem to be
known

If anyone has a way to make sync more robust (I'll add a drain), I'm
interested.  The raw log is here:

More details are here
https://testing.libreswan.org/v4.3-494-gdb7b891348-main/newoe-18-poc-cop-port22-whack/OUTPUT/debug.log.gz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20210422/cb5d1ce3/attachment.html>


More information about the Swan-dev mailing list