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

dird: show current and allowed console connections #1487

Merged
merged 3 commits into from Aug 4, 2023

Conversation

pstorz
Copy link
Member

@pstorz pstorz commented Jun 20, 2023

When the allowed number of console connectinos was exceeded, before only the fact that it is exceeded was logged without numbers.

Now both the allowed maximum and the current value are printed.

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • [-] Decision taken that a test is required (if not, then remove this paragraph)
  • [-] The choice of the type of test (unit test or systemtest) is reasonable
  • [-] Testname matches exactly what is being tested
  • [-] On a fail, output of the test leads quickly to the origin of the fault

@pstorz pstorz force-pushed the dev/pstorz/master/max_console_counting branch from ef7b95b to f094a2a Compare June 20, 2023 13:42
@bruno-at-bareos bruno-at-bareos self-assigned this Jun 20, 2023
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks goods, see my remark

core/src/dird/authenticate_console.cc Outdated Show resolved Hide resolved
@bruno-at-bareos
Copy link
Contributor

Also if you change something maybe you can fix the check-source warning
✗ Commit checks failed:
f094a2a dird: show current and allowed console connections: body contains line longer 72 chars

Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on what we want to accomplish this needs to be changed somewhat.

core/src/dird/authenticate_console.cc Outdated Show resolved Hide resolved
core/src/dird/authenticate_console.cc Outdated Show resolved Hide resolved
@sebsura sebsura force-pushed the dev/pstorz/master/max_console_counting branch from f838044 to 3f1dc90 Compare June 29, 2023 12:31
@sebsura sebsura requested a review from arogge June 29, 2023 12:32
arogge
arogge previously requested changes Jun 30, 2023
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a good idea how to make this nicer, but the current approach is not great. Too much mixing of concerns and just too complicated in my opinion.

core/src/dird/authenticate_console.cc Outdated Show resolved Hide resolved
core/src/dird/ua_server.cc Outdated Show resolved Hide resolved
core/src/dird/authenticate_console.cc Outdated Show resolved Hide resolved
core/src/dird/authenticate_console.cc Outdated Show resolved Hide resolved
core/src/dird/authenticate_console.cc Outdated Show resolved Hide resolved
core/src/dird/authenticate_console.h Outdated Show resolved Hide resolved
@arogge arogge force-pushed the dev/pstorz/master/max_console_counting branch from 3f1dc90 to d57545f Compare July 13, 2023 08:04
@bruno-at-bareos bruno-at-bareos assigned pstorz and unassigned sebsura Jul 27, 2023
@arogge arogge force-pushed the dev/pstorz/master/max_console_counting branch from d57545f to cb91d80 Compare August 3, 2023 12:54
@sebsura sebsura dismissed arogge’s stale review August 3, 2023 14:35

Its not relevant anymore.

@sebsura sebsura force-pushed the dev/pstorz/master/max_console_counting branch from cb91d80 to 3f1dc90 Compare August 4, 2023 10:56
pstorz and others added 2 commits August 4, 2023 13:01
When the allowed number of console connectinos was exceeded, before
only the fact that it is exceeded was logged without numbers.

Now both the allowed maximum and the current value are printed.
This adds a lease-based system to count open console connections. When
the connection limit is exceeded, the default console will log an
informational message, only named consoles will be denied access.
@sebsura sebsura force-pushed the dev/pstorz/master/max_console_counting branch from 3f1dc90 to 7234fb8 Compare August 4, 2023 11:03
@BareosBot BareosBot merged commit 73d372d into master Aug 4, 2023
@BareosBot BareosBot deleted the dev/pstorz/master/max_console_counting branch August 4, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants