Shopify / oxidized

configuration backup software (IOS, JunOS) - silly attempt at rancid
4 stars 4 forks source link

Ignore "Pagination Disabled" #24

Closed pdenitto closed 8 years ago

pdenitto commented 8 years ago

Make oxidized throw out the line "Pagination Disabled" from the config log.

See https://github.com/Shopify/config-stash/commit/ff5e7fa8ea1bb86196df71f068728a742b0fe1ae

ElvinEfendi commented 8 years ago

@pdenitto in which case does "Pagination Disabled" appear in the output of show inventory | no-more command? I'm testing with ash-leaf-0602.ash.shopify.com and I do not see "Pagination Disabled" anymore.

pdenitto commented 8 years ago

https://github.com/Shopify/config-stash/commit/903bd46987886841a62680085daf2eb253abc86a https://github.com/Shopify/config-stash/commit/8401f70c15455e299245bb88762a4c4d027fe02a

pdenitto commented 8 years ago

https://github.com/Shopify/config-stash/commit/b91de2971cbdb5d8baf8997618628c21b1d66440 & https://github.com/Shopify/config-stash/commit/0ebc23d7a99a54c2376943f17549a663138ac92d

ElvinEfendi commented 8 years ago

I'm still trying to figure out why is this happening. Here is an example debugging information for the whole flow of loading a module and fetching a device config:

I, [2016-06-02T10:20:38.534360 #68647]  INFO -- : Oxidized starting, running as pid 68647
D, [2016-06-02T10:20:38.639602 #68647] DEBUG -- : lib/oxidized/model/model.rb Added secret to the commands list
D, [2016-06-02T10:20:38.639671 #68647] DEBUG -- : lib/oxidized/model/model.rb Added show inventory | no-more to the commands list
D, [2016-06-02T10:20:38.639690 #68647] DEBUG -- : lib/oxidized/model/model.rb Added show running-config to the commands list
I, [2016-06-02T10:20:38.642807 #68647]  INFO -- : Loaded 2 nodes
D, [2016-06-02T10:20:38.642962 #68647] DEBUG -- : Jobs 0, Want: 1
D, [2016-06-02T10:20:41.596761 #68647] DEBUG -- : lib/oxidized/input/cli.rb Running post_login commands
D, [2016-06-02T10:20:41.701053 #68647] DEBUG -- : lib/oxidized/input/ssh.rb terminal length 0 @ ash-leaf-0602.ash.shopify.com with expect: /^.+[#>]\s?$/
D, [2016-06-02T10:20:42.325772 #68647] DEBUG -- : lib/oxidized/model/model.rb Collecting commands' outputs
D, [2016-06-02T10:20:42.325884 #68647] DEBUG -- : lib/oxidized/model/model.rb Executing show inventory | no-more
D, [2016-06-02T10:20:42.325944 #68647] DEBUG -- : lib/oxidized/input/ssh.rb show inventory | no-more @ ash-leaf-0602.ash.shopify.com with expect: /^.+[#>]\s?$/
D, [2016-06-02T10:20:43.477009 #68647] DEBUG -- : lib/oxidized/model/model.rb Executing show running-config
D, [2016-06-02T10:20:43.477105 #68647] DEBUG -- : lib/oxidized/input/ssh.rb show running-config @ ash-leaf-0602.ash.shopify.com with expect: /^.+[#>]\s?$/
D, [2016-06-02T10:20:45.177504 #68647] DEBUG -- : lib/oxidized/input/cli.rb Running pre_logout commands
D, [2016-06-02T10:20:45.177600 #68647] DEBUG -- : lib/oxidized/input/ssh.rb exit @ ash-leaf-0602.ash.shopify.com with expect: nil
I, [2016-06-02T10:20:45.661929 #68647]  INFO -- : Configuration updated for /ash-leaf-0602.ash.shopify.com
pdenitto commented 8 years ago

Most likely the output is generated by terminal length 0, which is then made redundant with | no-more.

term len 0 is an old cisco command because for the vast majority of of the life of Cisco, there was no no-more command -- term len 0 was the counter to that.

Try not issuing the term len 0 command.