hep-gc / shoal

A squid cache publishing and advertising tool designed to work in fast changing environments
Apache License 2.0
4 stars 8 forks source link

Alternative method to locate shoal-agent configuration #168

Open DrDaveD opened 3 years ago

DrDaveD commented 3 years ago

What was the reason behind commit cde60ce7d9530f0a1fc57f52280c362eeea6fbf8? It messed up the frontier-squid distribution because I want to put shoal_conf in /etc/squid instead of /etc/shoal. Can there at least be a command line option to choose a different file location?

Meanwhile for now I'll put a symlink at /etc/shoal/shoal_agent.conf.

MarcusEbert commented 3 years ago

The reason behind having a single place for the config file was to simplify the whole setup. The shoal-agent install script also tries to locate a previous config file now to use the old config options as default for the new config file. Having multiple locations and possible multiple files on a system would make things unnecessary complicated. It was also not clear in which order files should be used when there are multiple on a system, e.g. which file should to be used when reading the configuration? It seems previously we only supported ~/.shoal/ and /etc/shoal - what was removed is the use of the home directory since the user who installs the shoal-agent and the user who later runs it can be different; while /etc/shoal/ is an absolute directory and always points to the correct file. As far as I can see, /etc/squid/ was not searched for previously.

We wanted to reduce the previous choices to a single location. Since it is a config file, it should be in /etc. And since it does not configure the squid itself or change anything on the squid configuration, /etc/shoal/shoal-agent.conf was chosen.

While we can look into using command line options to change the path, a symlink should work fine if you prefer another location. I'm not sure I understand why you can't use /etc/shoal/ as the directory where the config file is.

DrDaveD commented 3 years ago

I don't want to use /etc/shoal because I'd like people to be able to install their own copy of the shoal agent on the same machine as frontier-squid without conflicts. They might not want to use the frontier-squid distribution of it for some reason.