Skip to content

Accept ca_server and report_server without server when running as root - #661

Draft
silug wants to merge 2 commits into
OpenVoxProject:mainfrom
silug:fix/accept-ca-server-report-server-as-root
Draft

silug wants to merge 2 commits into
OpenVoxProject:mainfrom
silug:fix/accept-ca-server-report-server-as-root

Conversation

@silug

@silug silug commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Short description

The :ca and :report services fall back on ca_server and report_server before server. When running as a non-privileged user those settings were already enough, but as root any missing server setting raised, and the deprecation warning fired even when the service-specific setting was configured.

Check the service-specific settings first, for both root and non-root, so the two code paths agree on which setting is required.

Generated by Claude Code

Checklist

I have:

silug and others added 2 commits September 8, 2026 13:32
Since OpenVoxProject#536 removed the default `server=puppet`, `create_service` raised
(or warned) whenever `server` was not set in the config, even when the
caller had already resolved a server through `server_list`, DNS SRV
records, or an explicit `puppet://host/...` URL. An agent configured
with only `server_list`, or with `use_srv_records` and `srv_domain`,
could not connect at all.

Move the check into `check_server_setting` and skip it when the
resolver passes an explicit server. The settings-based resolver, which
is the only one that falls back on `server`, keeps the existing errors
and deprecation warning.

Fixes OpenVoxProject#658

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Steven Pritchard <steven.pritchard@gmail.com>
The `:ca` and `:report` services fall back on `ca_server` and
`report_server` before `server`. When running as a non-privileged user
those settings were already enough, but as root any missing `server`
setting raised, and the deprecation warning fired even when the
service-specific setting was configured.

Check the service-specific settings first, for both root and non-root,
so the two code paths agree on which setting is required.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Steven Pritchard <steven.pritchard@gmail.com>
@silug

silug commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

This PR is meant to stack on top of #659.

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.

1 participant