Skip to content

apiserver: log unenrolled-console message at warning level - #4811

Closed
bharathvemula wants to merge 1 commit into
crowdsecurity:masterfrom
bharathvemula:fix-4809-console-enrollment-warning
Closed

bharathvemula wants to merge 1 commit into
crowdsecurity:masterfrom
bharathvemula:fix-4809-console-enrollment-warning

Conversation

@bharathvemula

Copy link
Copy Markdown

Fixes #4809

With CAPI enabled on a machine that is not enrolled in the console, startup logged "Machine is not enrolled in the console, can't synchronize with the console" at error level. Enrollment is optional, so a deliberate non-enrollment looked like a failure. The message is now logged at warning level, matching the parallel message in initAPIC ("can't synchronize decisions", already a warning).

Tested: new TestNewServerConsoleEnrollmentLogLevel (fails before, passes after — unenrolled case logs the message once at warning and never at error; enrolled case logs nothing about enrollment); go test ./pkg/apiserver/... passes; go vet clean; golangci-lint run ./pkg/apiserver/... (v2.13.0) 0 issues. Full make test not run.

Note: #4809 still carries needs/triage.

Testing above was run by an AI agent; no human has independently verified it yet.

Disclosure: this PR was prepared with AI assistance.

Console enrollment is optional, but the message was logged at error level
whenever CAPI was enabled on a machine that is not enrolled. Demote it to
warning, matching the parallel message in initAPIC, and cover both the
enrolled and unenrolled paths with a regression test.
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

@bharathvemula: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

@bharathvemula: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@bharathvemula

Copy link
Copy Markdown
Author

/kind fix
/area local-api

@blotus

blotus commented Nov 9, 2026

Copy link
Copy Markdown
Member

So let me get this straight:

  • You opened an issue to get something fixed: good
  • You opened a PR to fix it: good, great even
  • You used a LLM for a single line fix: very very questionable
  • You added over 100 lines of tests that I'm not even going to bother reading: are you kidding me ?

Testing above was run by an AI agent; no human has independently verified it yet.

I guess you did not even have the basic decency of looking at the change ?

We all have access to LLMs, please please please don't bother opening PRs or issues if you are not even going to have the slightest look at them, I can also ask Claude to slop its way through the repo.

@blotus blotus closed this Nov 9, 2026
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.

"Machine is not enrolled in the console, can't synchronize with the console" should not be an error log

2 participants