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

(#2112) Ensure CHORIA_SRV_DOMAIN is actually getting used #2113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

treydock
Copy link
Contributor

@treydock treydock commented Feb 8, 2024

The logic to pull config defaults from an environment variable is only used when a config has a default. This adds empty string default for SRV domain which will trigger the logic to pull a default value also from the CHORIA_SRV_DOMAIN environment variable.

@treydock
Copy link
Contributor Author

treydock commented Feb 8, 2024

Got a local build working on Mac and did this:

$ export CHORIA_SRV_DOMAIN=dev.company.net
$ ./choria-0.28.0-darwin-amd64 tool config
<SNIP>
Connectivity:

       Main Collective: mcollective
           Collectives: mcollective
      Service Registry: disabled
            SRV Domain: dev.company.net

The logic to pull config defaults from an environment variable is only used when a config has a default.
This adds empty string default for SRV domain which will trigger the logic to pull a default value also from the CHORIA_SRV_DOMAIN environment variable.
@ripienaar
Copy link
Member

ripienaar commented Feb 9, 2024

Are you 100% sure you updated? For me this works fine:

% export CHORIA_SRV_DOMAIN=dev.company.net
% choria tool config srv
.....
            SRV Domain: dev.company.net
.....
Configuration item: plugin.choria.srv_domain

║        Value: dev.company.net
║          URL: https://choria.io/docs/deployment/dns/
║    Data Type: string
║  Environment: CHORIA_SRV_DOMAIN
║
║ The domain to use for SRV records, defaults to the domain the
║ server FQDN is in
╙─
% choria --version
0.99.0.20240209

@ripienaar
Copy link
Member

ripienaar commented Feb 9, 2024

There's definitely something pretty weird going on, let me check, this should be working but testing in a docker container for example it does not.

I am not sure why yet but the exact same binary works in normal OS but not in docker, are you by any chance in docker?

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.

2 participants