Azure / azure-init

A minimal provisioning agent designed for Azure Linux VMs.
MIT License
7 stars 10 forks source link

[RFE] improve way how build-time configuration variables are handled #89

Open dongsupark opened 3 weeks ago

dongsupark commented 3 weeks ago

Quote from a comment by @jeremycline:

I don't think we should have these configuration options at all. The operating systems already provide a well-known tunable for executable discovery (PATH) so providing a second way to do it feels unnecessary and potentially surprising.

If we add support for other tools some settings becomes irrelevant and confusing. I don't think FreeBSD has hostnamectl. From a library-user perspective, set_hostname() isn't abstracting how it sets the hostname as it takes path_hostnamectl as an argument, so it's not clear how the API can accommodate alternate tools. I think it would be better to drop these environment variables and document that tools need to be on the PATH.

The question remains on how you want to handle the library side of this. Does the library API let you select a backend to use, or do we make users select at compile time? I think it makes sense to design the API to allow callers to select a backend if we're providing a library.