Skip to content

[backport 3.5] netbox: reduce spam in netbox logs#12050

Merged
sergepetrenko merged 1 commit intorelease/3.5from
backport/release/3.5/11727
Nov 20, 2025
Merged

[backport 3.5] netbox: reduce spam in netbox logs#12050
sergepetrenko merged 1 commit intorelease/3.5from
backport/release/3.5/11727

Conversation

@TarantoolBot
Copy link
Collaborator

@TarantoolBot TarantoolBot commented Nov 20, 2025

(This PR is a backport of #11727 to release/3.5 to a future 3.5.1 release.)


Before this patch a lot of "Connection refused" records were printed in
log files during netbox connection. This happened in two general
situations:

  1. Current instance tries to connect to non-existent instance.
  2. Current instance loses a succeeded connection to another instance.

The spam in logs was appearing because we didn't have any logic in
netbox_worker_f which would control periodic errors' logging during
netbox connection.

Now, we fix this issue by passing a whole error object into lua stack
instead of errmsg and changing logic of errors' displaying in new_sm
netbox lua function. We display error in "warning" mode only if

  1. This error is the first one in netbox session.
  2. Current and previous error has different types (codes).
  3. Current and previous error has different messages and different types
    of parent error.

Otherwise, current error will be repeated in "verbose" mode. Also we print
an information about how many seconds it will take to reconnect (after
Connection refused error).

Closes #10506

NO_DOC=bugfix

Before this patch a lot of "Connection refused" records were printed in
log files during netbox connection. This happened in two general
situations:
1) Current instance tries to connect to non-existent instance.
2) Current instance loses a succeeded connection to another instance.

The spam in logs was appearing because we didn't have any logic in
`netbox_worker_f` which would control periodic errors' logging during
netbox connection.

Now, we fix this issue by passing a whole error object into lua stack
instead of errmsg and changing logic of errors' displaying in `new_sm`
netbox lua function. We display error in "warning" mode only if
1) This error is the first one in netbox session.
2) Current and previous error has different types (codes).
3) Current and previous error has different messages and different types
   of parent error.

Otherwise, current error will be repeated in "verbose" mode.

Closes #10506

NO_DOC=bugfix

(cherry picked from commit 2c27c9e)
@TarantoolBot TarantoolBot requested a review from a team as a code owner November 20, 2025 09:44
@TarantoolBot TarantoolBot changed the title [Backport release/3.5] netbox: reduce spam in netbox logs [backport 3.5] netbox: reduce spam in netbox logs Nov 20, 2025
@coveralls
Copy link

Coverage Status

coverage: 87.63% (+0.003%) from 87.627%
when pulling 18b2833 on backport/release/3.5/11727
into 0b01ab2
on release/3.5
.

@sergepetrenko sergepetrenko merged commit 3f79fc2 into release/3.5 Nov 20, 2025
25 checks passed
@sergepetrenko sergepetrenko deleted the backport/release/3.5/11727 branch November 20, 2025 14:29
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

Successfully merging this pull request may close these issues.

4 participants