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

Cache the last used shoal-client proxy info #141

Open colsond opened 6 years ago

colsond commented 6 years ago

Since it takes so long to run the cvmfs-talk command to update the proxies it would be a good idea to write the proxy string to a file or environment variable so each run the new string can be checked against it. If the new proxies are the same as the old we can forgo running the cvmfs-talk command which will save the 1-2 minutes it takes to run the command.

rptaylor commented 6 years ago

It should only take ~ 2 seconds to run the 'cvmfs_talk proxy group switch'. If it takes longer there may be something wrong with the node.

colsond commented 6 years ago

Hrm it would have to be a systematic issue then since most of the VMs seem to take quite some time to run cvmfs-talk commands. cvmfs-talk proxy info can take up to 30s and it isn't even updating any info.

The command being run to update the proxies is as follows: p = Popen(["cvmfs_talk", "proxy", "set", cvmfs_http_proxy], stdout=PIPE, stderr=PIPE)

rptaylor commented 6 years ago

That should also take only a few seconds. Is it only slow the first time you run it (i.e. caching)?