ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.8k stars 925 forks source link

HPE Aruba 2930m in a stack #2428

Closed hofikhof closed 2 years ago

hofikhof commented 2 years ago

Any model does not working - aosw, procurve... I tried some changes in model but without success Here is output from SSH:

ssh admin@sw-2930m-stack

admin@10.1.230.100's password: Aruba JL319A 2930M-24G Switch Software revision WC.16.08.0003

(C) Copyright 2019 Hewlett Packard Enterprise Development LP

                  RESTRICTED RIGHTS LEGEND

Confidential computer software. Valid license from Hewlett Packard Enterprise Development LP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.

Press any key to continue

GameMaster47 commented 2 years ago

Hello,

Can you provide more information on what's not working? You can start by sending some logs, there's might be some helpful information there. if you set debug to true in the config file it might help you getting additional information on the error.

Best regards

hofikhof commented 2 years ago

Hello, I am sending my logs with aows and procurve models. With rancid works but I want use Oxidized... I am trying use custom model (copy of aosw but I cannot use regular exp. and prompts etc... I posted that switch send after login in my question early - banner text and after prompt for press any key...

Here is log with used model aosw: I, [2021-12-10T11:05:19.613927 #25129] INFO -- : lib/oxidized/nodes.rb: Loading nodes D, [2021-12-10T11:05:19.614048 #25129] DEBUG -- : resolving DNS for sw-2930m-stack... D, [2021-12-10T11:05:19.614064 #25129] DEBUG -- : IPADDR sw-2930m-stack D, [2021-12-10T11:05:19.615212 #25129] DEBUG -- : node.rb: resolving node key 'model', with passed global value of '' and node value 'aosw' D, [2021-12-10T11:05:19.615245 #25129] DEBUG -- : node.rb: setting node key 'model' to value 'routeros' from global D, [2021-12-10T11:05:19.615261 #25129] DEBUG -- : node.rb: returning node key 'model' with value 'aosw' D, [2021-12-10T11:05:19.615333 #25129] DEBUG -- : lib/oxidized/node.rb: Loading model "aosw" D, [2021-12-10T11:05:19.616100 #25129] DEBUG -- : lib/oxidized/model/model.rb Added all to the commands list D, [2021-12-10T11:05:19.616125 #25129] DEBUG -- : lib/oxidized/model/model.rb Added secret to the commands list D, [2021-12-10T11:05:19.616136 #25129] DEBUG -- : lib/oxidized/model/model.rb Added show version to the commands list D, [2021-12-10T11:05:19.616145 #25129] DEBUG -- : lib/oxidized/model/model.rb Added show inventory to the commands list D, [2021-12-10T11:05:19.616153 #25129] DEBUG -- : lib/oxidized/model/model.rb Added show slots to the commands list D, [2021-12-10T11:05:19.616161 #25129] DEBUG -- : lib/oxidized/model/model.rb Added show license to the commands list D, [2021-12-10T11:05:19.616169 #25129] DEBUG -- : lib/oxidized/model/model.rb Added show license passphrase to the commands list D, [2021-12-10T11:05:19.616177 #25129] DEBUG -- : lib/oxidized/model/model.rb Added show running-config to the commands list D, [2021-12-10T11:05:19.616304 #25129] DEBUG -- : node.rb: resolving node key 'input', with passed global value of 'ssh, telnet' and node value '' D, [2021-12-10T11:05:19.616321 #25129] DEBUG -- : node.rb: returning node key 'input' with value 'ssh, telnet' D, [2021-12-10T11:05:19.767713 #25129] DEBUG -- : node.rb: resolving node key 'output', with passed global value of 'git' and node value '' D, [2021-12-10T11:05:19.769043 #25129] DEBUG -- : node.rb: returning node key 'output' with value 'git' D, [2021-12-10T11:05:19.790806 #25129] DEBUG -- : node.rb: resolving node key 'username', with passed global value of '' and node value 'rancid' D, [2021-12-10T11:05:19.790863 #25129] DEBUG -- : node.rb: setting node key 'username' to value 'oxidized' from global D, [2021-12-10T11:05:19.790885 #25129] DEBUG -- : node.rb: returning node key 'username' with value 'rancid' D, [2021-12-10T11:05:19.790899 #25129] DEBUG -- : node.rb: resolving node key 'password', with passed global value of '' and node value password D, [2021-12-10T11:05:19.790914 #25129] DEBUG -- : node.rb: setting node key 'password' to value 'password' from global D, [2021-12-10T11:05:19.790930 #25129] DEBUG -- : node.rb: returning node key 'password' with value 'password' I, [2021-12-10T11:05:19.790994 #25129] INFO -- : lib/oxidized/nodes.rb: Loaded 1 nodes D, [2021-12-10T11:05:20.017191 #25129] DEBUG -- : lib/oxidized/core.rb: Starting the worker... D, [2021-12-10T11:05:21.018390 #25129] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 0 of 1 D, [2021-12-10T11:05:21.018653 #25129] DEBUG -- : lib/oxidized/worker.rb: Added /sw-2930m-stack to the job queue D, [2021-12-10T11:05:21.018692 #25129] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel D, [2021-12-10T11:05:21.018759 #25129] DEBUG -- : lib/oxidized/job.rb: Starting fetching process for sw-2930m-stack at 2021-12-10 10:05:21 UTC D, [2021-12-10T11:05:21.018891 #25129] DEBUG -- : lib/oxidized/input/ssh.rb: Connecting to sw-2930m-stack D, [2021-12-10T11:05:21.019013 #25129] DEBUG -- : AUTH METHODS::["none", "publickey", "password"] D, [2021-12-10T11:05:22.019784 #25129] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel D, [2021-12-10T11:05:22.339441 #25129] DEBUG -- : lib/oxidized/input/ssh.rb: expecting [/^([\w(:.@-]+()?\s?)[#>]\s?)$/] at sw-2930m-stack Press any key to continue2 not matching configured prompt (?-mix:^([\w(:.@-]+()?\s?)[#>]\s?)$)"lel D, [2021-12-10T11:05:42.340234 #25129] DEBUG -- : lib/oxidized/node.rb: Oxidized::SSH failed for sw-2930m-stack D, [2021-12-10T11:05:42.341074 #25129] DEBUG -- : 10.1.230.100 raised Errno::ECONNREFUSED with msg "Connection refused - connect(2) for "10.1.230.100" port 23" D, [2021-12-10T11:05:42.341110 #25129] DEBUG -- : lib/oxidized/node.rb: Oxidized::Telnet failed for sw-2930m-stack D, [2021-12-10T11:05:42.341154 #25129] DEBUG -- : lib/oxidized/job.rb: Config fetched for sw-2930m-stack at 2021-12-10 10:05:42 UTC W, [2021-12-10T11:05:43.044121 #25129] WARN -- : /sw-2930m-stack status no_connection, retry attempt 1 D, [2021-12-10T11:05:43.044202 #25129] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 2 - ended: 0 of 1 D, [2021-12-10T11:05:43.044255 #25129] DEBUG -- : lib/oxidized/worker.rb: Added /sw-2930m-stack to the job queue D, [2021-12-10T11:05:43.044279 #25129] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 1 of 2 - ended: 0 of 1

Here is log with used model procurve: D, [2021-12-10T11:08:27.748231 #25176] DEBUG -- : node.rb: resolving node key 'model', with passed global value of '' and node value 'procurve' D, [2021-12-10T11:08:27.748260 #25176] DEBUG -- : node.rb: setting node key 'model' to value 'routeros' from global D, [2021-12-10T11:08:27.748319 #25176] DEBUG -- : node.rb: returning node key 'model' with value 'procurve' D, [2021-12-10T11:08:27.748332 #25176] DEBUG -- : lib/oxidized/node.rb: Loading model "procurve" D, [2021-12-10T11:08:27.748951 #25176] DEBUG -- : lib/oxidized/model/model.rb Added all to the commands list D, [2021-12-10T11:08:27.748978 #25176] DEBUG -- : lib/oxidized/model/model.rb Added secret to the commands list D, [2021-12-10T11:08:27.748989 #25176] DEBUG -- : lib/oxidized/model/model.rb Added show version to the commands list D, [2021-12-10T11:08:27.748999 #25176] DEBUG -- : lib/oxidized/model/model.rb Added show modules to the commands list D, [2021-12-10T11:08:27.749007 #25176] DEBUG -- : lib/oxidized/model/model.rb Added show interfaces transceiver to the commands list D, [2021-12-10T11:08:27.749015 #25176] DEBUG -- : lib/oxidized/model/model.rb Added show flash to the commands list D, [2021-12-10T11:08:27.749063 #25176] DEBUG -- : lib/oxidized/model/model.rb Added show system-information to the commands list D, [2021-12-10T11:08:27.749071 #25176] DEBUG -- : lib/oxidized/model/model.rb Added show system information to the commands list D, [2021-12-10T11:08:27.749079 #25176] DEBUG -- : lib/oxidized/model/model.rb Added show running-config to the commands list D, [2021-12-10T11:08:27.749197 #25176] DEBUG -- : node.rb: resolving node key 'input', with passed global value of 'ssh, telnet' and node value '' D, [2021-12-10T11:08:27.749212 #25176] DEBUG -- : node.rb: returning node key 'input' with value 'ssh, telnet' D, [2021-12-10T11:08:27.809978 #25176] DEBUG -- : node.rb: resolving node key 'output', with passed global value of 'git' and node value '' D, [2021-12-10T11:08:27.810037 #25176] DEBUG -- : node.rb: returning node key 'output' with value 'git' D, [2021-12-10T11:08:27.825204 #25176] DEBUG -- : node.rb: resolving node key 'username', with passed global value of '' and node value 'rancid' D, [2021-12-10T11:08:27.825250 #25176] DEBUG -- : node.rb: setting node key 'username' to value 'oxidized' from global D, [2021-12-10T11:08:27.825265 #25176] DEBUG -- : node.rb: returning node key 'username' with value 'rancid' D, [2021-12-10T11:08:27.825275 #25176] DEBUG -- : node.rb: resolving node key 'password', with passed global value of '' and node value 'password' D, [2021-12-10T11:08:27.825285 #25176] DEBUG -- : node.rb: setting node key 'password' to value 'oxidized2007+' from global D, [2021-12-10T11:08:27.825295 #25176] DEBUG -- : node.rb: returning node key 'password' with value 'password' I, [2021-12-10T11:08:27.825339 #25176] INFO -- : lib/oxidized/nodes.rb: Loaded 1 nodes D, [2021-12-10T11:08:28.037808 #25176] DEBUG -- : lib/oxidized/core.rb: Starting the worker... D, [2021-12-10T11:08:29.038731 #25176] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 0 of 1 D, [2021-12-10T11:08:29.039014 #25176] DEBUG -- : lib/oxidized/worker.rb: Added /sw-2930m-stack to the job queue D, [2021-12-10T11:08:29.039101 #25176] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel D, [2021-12-10T11:08:29.039261 #25176] DEBUG -- : lib/oxidized/job.rb: Starting fetching process for sw-2930m-stack at 2021-12-10 10:08:29 UTC D, [2021-12-10T11:08:29.039428 #25176] DEBUG -- : lib/oxidized/input/ssh.rb: Connecting to sw-2930m-stack D, [2021-12-10T11:08:29.039517 #25176] DEBUG -- : AUTH METHODS::["none", "publickey", "password"] D, [2021-12-10T11:08:29.622506 #25176] DEBUG -- : lib/oxidized/input/ssh.rb: expecting [/(^\r|\e[24;[0-9][hH])?([\w\s.-]+[#>] )($|(\e[24;[0-9][0-9]?[hH]){3})/] at sw-2930m-stack D, [2021-12-10T11:08:30.040251 #25176] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel D, [2021-12-10T11:08:31.041444 #25176] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel D, [2021-12-10T11:08:31.330208 #25176] DEBUG -- : lib/oxidized/input/cli.rb: Running post_login commands at sw-2930m-stack D, [2021-12-10T11:08:31.330501 #25176] DEBUG -- : lib/oxidized/input/cli.rb: Running post_login command: nil, block: #<Proc:0x0000561182c8bc68 /opt/oxidized/.config/oxidized/model/procur ve.rb:89> at sw-2930m-stack D, [2021-12-10T11:08:31.330758 #25176] DEBUG -- : lib/oxidized/input/ssh.rb true @ sw-2930m-stack with expect: /(^\r|\e[24;[0-9][hH])?([\w\s.-]+[#>] )($|(\e[24;[0-9][0-9]?[ hH]){3})/ E, [2021-12-10T11:08:31.331998 #25176] ERROR -- : 10.1.230.100 raised NoMethodError with msg "undefined method `+' for true:TrueClass", 10.1.230.100 saved D, [2021-12-10T11:08:31.332046 #25176] DEBUG -- : lib/oxidized/node.rb: Oxidized::SSH failed for sw-2930m-stack D, [2021-12-10T11:08:31.333227 #25176] DEBUG -- : 10.1.230.100 raised Errno::ECONNREFUSED with msg "Connection refused - connect(2) for "10.1.230.100" port 23" D, [2021-12-10T11:08:31.333263 #25176] DEBUG -- : lib/oxidized/node.rb: Oxidized::Telnet failed for sw-2930m-stack D, [2021-12-10T11:08:31.333298 #25176] DEBUG -- : lib/oxidized/job.rb: Config fetched for sw-2930m-stack at 2021-12-10 10:08:31 UTC W, [2021-12-10T11:08:32.042899 #25176] WARN -- : /sw-2930m-stack status no_connection, retry attempt 1 D, [2021-12-10T11:08:32.042974 #25176] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 2 - ended: 0 of 1

hofikhof commented 2 years ago

Nobody knows please?

ilGino commented 2 years ago

Hello,

our 2930m stacks play perfectly with oxidized, using the "procurve" model. They are running software branch WC.16.10, I see you have the WC.16.08.

Hope it helps GG

ilGino commented 2 years ago

Hello,

running software revision WC.16.10.xxxx on all 2930m stacks.

Regards GG

stijn-stadium commented 2 years ago

@ilGino I've just spent some time trying to add our 2930M-stacks(WC.16.11) to my Oxidized config. It errors at login even though I override the credentials from the main config in my switches db with the correct credentials... Would you mind sharing your config and switches.db?

ilGino commented 2 years ago

Hello @stijn-stadium

sorry for the late reply. The relevant part of the config is:

source:
  default: csv
  csv:
    file: "/home/oxidized/.config/oxidized/router.db"
    delimiter: !ruby/regexp /:/
    map:
      name: 0
      ip: 1
      model: 2
      username: 3
      password: 4
    gpg: false

and for the 2930M and 2930F in the router.db we have a long list of lines like this:

[switch_name]:[switch_ip]:procurve:[ssh_user]:[ssh_password]

We are sticking to the last version of WC.16.10 though, not the WC.16.11 branch, don't know if it makes any difference.

On each switch or switch stack the SSH defaults to the command line, not the text menu interface.

Hope this helps Regards GG

stijn-stadium commented 2 years ago

@ilGino thank you so much for your help. All is working well! Somehow I read over the importance of the model-ip-user-password mapping. Once that was in order, it all just worked fine.