Skip to content

packaging: detect api.server.enable: false in postinst - #4818

Merged
sabban merged 1 commit into
masterfrom
fix-postinst-lapi-enable
Nov 13, 2026
Merged

sabban merged 1 commit into
masterfrom
fix-postinst-lapi-enable

Conversation

@sabban

@sabban sabban commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4651 by using -o json to avoid cscli output as &false.

What and why

Fixes #4651

How it was tested

I am building packages against this branch to test the packages with this new option.

Checklist

  • One concern only.
  • No break to LAPI/CAPI payloads, database schema, config keys, or cscli -o json|raw output.
  • A human has reviewed this diff line by line.
  • A human has tested this change, not only an agent.

AI assistance used:

cscli config show --key prints *bool values as "&false", so the
"= false" check added in #3802 never matched. On agent-only hosts with
a listen_uri set and the port held by something else, the service was
not started after install/upgrade. -o json prints a plain "false".

Fixes #4651

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

@sabban: 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

Copy link
Copy Markdown

@sabban: 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.

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.84%. Comparing base (1584fcc) to head (5e5f636).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4818      +/-   ##
==========================================
+ Coverage   64.79%   71.84%   +7.04%     
==========================================
  Files         545      545              
  Lines       37167    37167              
==========================================
+ Hits        24082    26702    +2620     
+ Misses      13074    10464    -2610     
+ Partials       11        1      -10     
Flag Coverage Δ
bats 45.30% <ø> (ø)
unit-linux 49.78% <ø> (?)
unit-windows 37.82% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blotus blotus added this to the 1.8.3 milestone Nov 12, 2026
@buixor
buixor requested a review from blotus November 13, 2026 13:01
@sabban

sabban commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

/area agent
/kind fix

@sabban
sabban merged commit e20782b into master Nov 13, 2026
17 checks passed
@sabban
sabban deleted the fix-postinst-lapi-enable branch November 13, 2026 15:07
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.

postinst/rpm scriptlet never detects api.server.enable: false (cscli prints &false), skips service start on agent-only hosts

2 participants