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

AOS7.rb: not matching configured prompt on OS6360 version 8.8 #3351

Open
joschi99 opened this issue Dec 19, 2024 · 10 comments
Open

AOS7.rb: not matching configured prompt on OS6360 version 8.8 #3351

joschi99 opened this issue Dec 19, 2024 · 10 comments

Comments

@joschi99
Copy link
Contributor

using aos7.rb on a Alcatel OS6360 with firmware 8.8x. we have this issue:

W, [2024-12-19T06:38:23.767887 #1200893]  WARN -- : x.x.x.x raised Oxidized::PromptUndetect with msg "^M
S01-P1-RK13-SW01 >  not matching configured prompt (?-mix:^([\w.@-]+[#>]\s?)$)"

We have similar devices on firmware 6.x and using aos.rb they work without any problem.
Any idea?

@robertcheramy
Copy link
Collaborator

Have a look at https://github.com/ytti/oxidized/blob/master/docs/Model-Notes/HPEAruba.md
You need aosw for Aruba OS 8.

@joschi99
Copy link
Contributor Author

joschi99 commented Jan 4, 2025

Hi @robertcheramy,
there is a missunderstanding probably. As I mentioned the problem is related on Alcatel devices using firmware 8.8 and not HPE Aruba. Please reopen the ticket

@robertcheramy robertcheramy reopened this Jan 7, 2025
@robertcheramy
Copy link
Collaborator

Sorry, this was my mistake. I thought Alcatel use Aruba OS but it seems only to concern WLAN-Devices.

@robertcheramy
Copy link
Collaborator

aos7.rb does not have a specific prompt and is using the configured one. The default prompt does not match the space after SW01 in S01-P1-RK13-SW01 > .
Setting prompt: /^([\w.@- ]+[#>]\s?)$/ in the configuration may solve your problem.
Or remove the space in the hostname in the switch configuration (if possible) as it is unusual to have a space in the hostname.

Depending on your results, we could modify aos7.rb and add a specific prompt for Alcatel OS 7.

On a side note - do you know the difference between aos.rb and aos7.rb? And is aos7.rb compatible with Alcatel OS 8? I found very few information about AOS on the internet.

@joschi99
Copy link
Contributor Author

joschi99 commented Jan 7, 2025

Hi @robertcheramy,
there is no space in the hostname as you can see:

S01-P1-RK13-SW01 > show system
System:
  Description:  Alcatel-Lucent Enterprise OS6360-PH24 8.8.56.R02 GA, April 02, 2022.,
  Object ID:    1.3.6.1.4.1.6486.801.1.1.2.1.16.1.6,
  Up Time:      193 days 18 hours 6 minutes and 42 seconds,
  Contact:      Alcatel-Lucent Enterprise, https://www.al-enterprise.com/,
  Name:         S01-P1-RK13-SW01,
  Location:     Unknown,
  Services:     78,
  Date & Time:  SAT JUN 22 2024 05:33:52 (UTC)
Flash Space:
    Primary CMM:
      Available (bytes):  607010816,
      Comments         :  None

but seem's that this OS version add a space automatically at the end of the prompt.

I will try to use your prompt and check if will work.

@joschi99
Copy link
Contributor Author

joschi99 commented Jan 7, 2025

I have tried to insert your prompt but the service will not start any more.

prompt

class AOS7 < Oxidized::Model
  using Refinements

  # Alcatel-Lucent Operating System Version 7 (Linux based)
  # used in OmniSwitch 6900/10k
  prompt /^([\w.@- ]+[#>]\s?)$/
  comment  '! '

  cmd :all do |cfg, cmdstring|
    new_cfg = comment "COMMAND: #{cmdstring}\n"
    new_cfg << cfg.cut_both
  end
systemctl status oxidized.service
● oxidized.service - Oxidized - Network Device Configuration Backup Tool
   Loaded: loaded (/etc/systemd/system/oxidized.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2025-01-07 09:07:51 CET; 4s ago
  Process: 3146008 ExecStart=/usr/local/bin/oxidized (code=exited, status=1/FAILURE)
 Main PID: 3146008 (code=exited, status=1/FAILURE)

Jan 07 09:07:51 oxidized[3146008]:         from /usr/local/share/gems/gems/oxidized-0.30.1/lib/oxidized/nodes.rb:128:in `initialize'
Jan 07 09:07:51 oxidized[3146008]:         from /usr/local/share/gems/gems/oxidized-0.30.1/lib/oxidized/core.rb:14:in `new'
Jan 07 09:07:51 oxidized[3146008]:         from /usr/local/share/gems/gems/oxidized-0.30.1/lib/oxidized/core.rb:14:in `initialize'
Jan 07 09:07:51 oxidized[3146008]:         from /usr/local/share/gems/gems/oxidized-0.30.1/lib/oxidized/core.rb:4:in `new'
Jan 07 09:07:51 oxidized[3146008]:         from /usr/local/share/gems/gems/oxidized-0.30.1/lib/oxidized/cli.rb:13:in `run'
Jan 07 09:07:51 oxidized[3146008]:         from /usr/local/share/gems/gems/oxidized-0.30.1/bin/oxidized:5:in `<top (required)>'
Jan 07 09:07:51 oxidized[3146008]:         from /usr/local/bin/oxidized:25:in `load'
Jan 07 09:07:51 oxidized[3146008]:         from /usr/local/bin/oxidized:25:in `<main>'
Jan 07 09:07:51 systemd[1]: oxidized.service: Main process exited, code=exited, status=1/FAILURE
Jan 07 09:07:51 systemd[1]: oxidized.service: Failed with result 'exit-code'.

the regexp seem's not valid

robertcheramy added a commit that referenced this issue Jan 7, 2025
trying to resolve issue #3351
@robertcheramy
Copy link
Collaborator

Please submit a YAML Simulation File for your device.

The needed command is ./device2yaml.rb user@devicename -c cmdsets/aos7 -o yaml/aos7_OS6360_8.8.56.R02.yaml

@robertcheramy
Copy link
Collaborator

Update to the different versions of Alcatel OS:

  • AOS 6 runs under vxworks
  • AOS 7 was the first version running on linux, and is probably compatible with AOS 8

@joschi99
Copy link
Contributor Author

joschi99 commented Jan 7, 2025

hi @robertcheramy,
I have the yaml simulation file created. If for you it's ok I will sent the yaml file directly to your email.

@robertcheramy
Copy link
Collaborator

Thank you for the file. I've fixed the prompt in Branch 3351-fix-aos7-prompt, please try it out.

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