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

Cumulus module won't work with MOTD #3330

Open
alchemyx opened this issue Dec 2, 2024 · 1 comment
Open

Cumulus module won't work with MOTD #3330

alchemyx opened this issue Dec 2, 2024 · 1 comment

Comments

@alchemyx
Copy link
Contributor

alchemyx commented Dec 2, 2024

Hi,

We are testing Cumulus module with Cumulus 5.9 and this prompt will fail if we have a motd set:

prompt /^(([\w.-]*)@(.*)):/

See example:

$ ssh spine1 -l oxidized
Debian GNU/Linux 12
Linux spine1-nyc2 6.1.0-cl-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1+cl5.9.2u6 (2024-08-20) x86_64


UNAUTHORIZED USE OF THIS SYSTEM IS STRICTLY PROHIBITED!
Please contact xxx@xxx to gain
access to this equipment if you need authorization.
Last login: Mon Dec  2 10:47:29 2024 from 10.11.110.8
oxidized@spine1-nyc2:mgmt:~$

But if I remove first character of that regexp it will work.

@klookee
Copy link

klookee commented Dec 3, 2024

We are also seeing this problem with Cumulus 5.9+.

Thanks for the workaround @alchemyx. This looks to have cracked it for us too.

alchemyx added a commit to alchemyx/oxidized that referenced this issue Dec 3, 2024
This is to fix issue ytti#3330 so multiline output won't break the module.
@alchemyx alchemyx mentioned this issue Dec 3, 2024
4 tasks
robertcheramy added a commit that referenced this issue Jan 3, 2025
This is to fix issue #3330 so multiline output won't break the module.

Some cumulus commands results do not end with \n, so the prompt gets
polluted by the trailing line of the previous command.
This is the case of `cat /etc/cumulus/ports.conf`, so we an echo to it to get an LF at EOF..

---------

Co-authored-by: Robert Cheramy <r.cheramy@netze-bw.de>
Co-authored-by: Michał Margula <mmargula@squiz.pl>
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

No branches or pull requests

2 participants