oxidized: Line numbers in ssh debug output and changes triggered by ESC[K sequence

Describe the problem

Oxidized reports spurious changes in the config

When ssh debug is enabled in the log i am seeing lines and console control characters : ^[[7mlines 24-46 ^[[m^[[K^M^[[K interface loopback 0 ip address 10.2.1.1/32 primary Similar to #3453 but for console control characters

From git i see:

[root@hcf01 devices.git]#  git --bare --git-dir="/root/.config/oxidized/devices.git" show 4a8fdce34d2ad19dec409b137857c21dcd52b1e1
commit 4a8fdce34d2ad19dec409b137857c21dcd52b1e1
Author: oxidized <oxidized@github.com>
Date:   Mon Mar 24 20:14:43 2025 -0400

    update default/hs-25

diff --git a/default/hs-25 b/default/hs-25
index 30a7ed1..a0d2164 100644
--- a/default/hs-25
+++ b/default/hs-25
@@ -69,7 +69,7 @@ no cli default prefix-modes enable
    logging vrf default source-interface loopback0
    tacacs-server vrf default source-interface loopback0
    
-[K##
+##
 ## QoS switch configuration
 ##

Expected behavior No changes triggered by spurious change detections. No line “lines 24-46” visible and no control characters visible as they depend on the size of terminal?

Running environment (please complete the following information):

Oxidized v.0.28.0

Device: Product name: Onyx Product release: 3.9.2504 Build ID: #1-dev Build date: 2021-04-29 06:31:55 Target arch: x86_64 Target hw: x86_64 Built by: sw-r2d2-bot@26dc75704811 Version summary: X86_64 3.9.2504 2021-04-29 06:31:55 x86_64

Product model: x86onie

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24

Commits related to this issue

Most upvoted comments

Yeah, that does it. I see no problem in our configuration. Great job! Thank you.

Thanks to your logs, I can reproduce.

Well, i just got one with “-cli default prefix-modes enable”.

Here is the bad one(-cli default prefix-modes enable):

received "\r\n## X.509 certificates configuration\r\n##\r\n#\r\n# Certificate name system-self-signed, ID aaaaaaaaaaaaa\r\n# (public-cert config omitted since private-key config is hidden)\r\n\r\n##\r\n## Persistent prefix mode setting\r\n##\r\ncli default prefix-modes enable\r\n\r\n"
sent "\nexit"
received "\rhsb2-slf-3-6 [standal"
received "one: master"
received "] # "
received "\r\r\n"
received "\rhsb2-slf-3-6 [standalone:"
received " master] #"
received " "
received "e"
received "xi"
received "t"
received "\r\r\n"

And a good one (+cli default prefix-modes enable):

received "   \r\n##\r\n## X.509 certificates configuration\r\n##\r\n#\r\n# Certificate name system-self-signed, ID aaaaaaaaaaaaa\r\n# (public-cert config omitted since private-key config is hidden)\r\n\r\n##\r\n## Persistent prefix mode setting\r\n##\r\ncli default prefix-modes enable\r\n\r\n"
received "\rhsb2-slf"
received "-3-6"
received " [standalone"
received ": master] "
received "# "
sent "\nexit"
received "\r\r\n"
received "\rhsb2-slf-3-6 ["
received "stan"
received "dalone: mast"
received "er] # "
received "e"
received "x"
received "i"
received "t"
received "\r\r\n"

So it is definitely not the switch side.