Fix Version/s: None
Sprint:TSSW Sprint - Oct 24 - Nov 07
Team:Telescope and Site
The Tucson teststand butler registries are now in postgres, with secrets.
Kian-Tat Lim suggests setting these two environment variables:
The data is available in the source of secrets that exposurelog already uses.
As mentioned on SLAC, I think this is actually the wrong way to go. We should use Postgres mechanisms to give the account you're already using access to the Butler schemas.
OK, so you'll use the original env vars to get access for the exposurelog code and the "new" PG* env vars to allow the Butler to get access, all with the same credentials. That seems reasonable, although you could theoretically get rid of the original ones.
I would much rather have two sets of credentials in case we ever want to make the butler credentials different than the exposurelog database credentials.
Tagged exposurelog 0.9.6 (after fixing deployment issues in 0.9.5).
Deployment succeeded on the summit but failed on the Tucson test stand with:
Failed to instantiate Butler from config file:///volume_1/butler.yaml.
ERROR: Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
File "/opt/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
psycopg2.errors.InsufficientPrivilege: permission denied for schema lsstcomcam
LINE 2: FROM lsstcomcam.butler_attributes
The problem was that I forgot that we need these commands as well, which Joshua Hoblitt has now run for us:
GRANT USAGE ON SCHEMA latiss TO exposurelog;
GRANT USAGE ON SCHEMA lsstcomcam TO exposurelog;
in addition to the two original commands to give access to the tables:
GRANT SELECT ON ALL TABLES IN SCHEMA latiss TO exposurelog;
GRANT SELECT ON ALL TABLES IN SCHEMA lsstcomcam TO exposurelog;