Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedora: handle ssh prompt with extra console chars #859

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

abdhaleegit
Copy link
Collaborator

With fedora OS, the ssh login prompt has more extra brakceted console characters so make sure to include as wildcard

prompt:
^[]0;root@ltclp2:^G^[[32mroot@ltcrain4-lp2^[[0m:^[[32m^[[0m#^[[0m

error:
self.connect(logger)
File "/data/jenkins/workspace/sandbox/install/op-test/common/OpTestSSH.py", line 185, in connect
self.check_set_term()
File "/data/jenkins/workspace/sandbox/install/op-test/common/OpTestSSH.py", line 200, in check_set_term
self.util.setup_term(self.system, self.pty,
File "/", line 1709, in setup_term
raise ConsoleSettings(before=pty.before, after=pty.after,
common.Exceptions.ConsoleSettings: Setting the prompt or logging in for the console was not successful, check credentials and review the following for more details Expect Before Buffer="command-line line 0: Unsupported option "afstokenpassing"

Last login: Tue Aug 13 03:11:16 2024
root@ltcrain4-lp2:~#
Expect After Buffer="<class 'pexpect.exceptions.EOF'>" Message="Getting login and sudo not successful, probably connection issue, retry"

With fedora OS, the ssh login prompt has more extra brakceted
console characters so make sure to include as wildcard

prompt:
^[]0;root@ltclp2:~^G^[[32mroot@ltcrain4-lp2^[[0m:^[[32m~^[[0m#^[[0m

error:
    self.connect(logger)
  File "/data/jenkins/workspace/sandbox/install/op-test/common/OpTestSSH.py", line 185, in connect
    self.check_set_term()
  File "/data/jenkins/workspace/sandbox/install/op-test/common/OpTestSSH.py", line 200, in check_set_term
    self.util.setup_term(self.system, self.pty,
  File "/", line 1709, in setup_term
    raise ConsoleSettings(before=pty.before, after=pty.after,
common.Exceptions.ConsoleSettings: Setting the prompt or logging in for the console was not successful, check credentials and review the following for more details
Expect Before Buffer="command-line line 0: Unsupported option "afstokenpassing"

Last login: Tue Aug 13 03:11:16 2024
root@ltcrain4-lp2:~#
Expect After Buffer="<class 'pexpect.exceptions.EOF'>"
Message="Getting login and sudo not successful, probably connection issue, retry"

Signed-off-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
@abdhaleegit
Copy link
Collaborator Author

fedora-ssh-prompt.txt

@PraveenPenguin PraveenPenguin merged commit e197972 into open-power:master Aug 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants