Whilst deploying a change to jupyterhub T336951: Reduce alert noise associated with individual users' jupyterhub-singleuser services the jupyterhub-conda services were restarted on all stat servers.
The service failed to restart, producing log entries like this:
May 25 11:24:42 stat1007 jupyterhub-conda[7958]: [I 2023-05-25 11:24:42.109 JupyterHub app:2479] Running JupyterHub version 1.5.0 May 25 11:24:42 stat1007 jupyterhub-conda[7958]: [I 2023-05-25 11:24:42.109 JupyterHub app:2509] Using Authenticator: builtins.PosixGroupCheckingAuthenticator May 25 11:24:42 stat1007 jupyterhub-conda[7958]: [I 2023-05-25 11:24:42.109 JupyterHub app:2509] Using Spawner: spawners.CondaEnvProfilesSpawner May 25 11:24:42 stat1007 jupyterhub-conda[7958]: [I 2023-05-25 11:24:42.109 JupyterHub app:2509] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-1.5.0 May 25 11:24:42 stat1007 jupyterhub-conda[7958]: [I 2023-05-25 11:24:42.113 JupyterHub app:1554] Loading cookie_secret from /srv/jupyterhub-conda/data/jupyterhub_cookie_secret May 25 11:24:42 stat1007 jupyterhub-conda[7958]: [D 2023-05-25 11:24:42.113 JupyterHub app:1721] Connecting to db: sqlite:////srv/jupyterhub-conda/data/jupyterhub.sqlite.db May 25 11:24:42 stat1007 jupyterhub-conda[7958]: [E 2023-05-25 11:24:42.123 JupyterHub app:2989] May 25 11:24:42 stat1007 jupyterhub-conda[7958]: Traceback (most recent call last): May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/jupyterhub/app.py", line 2986, in launch_instance_async May 25 11:24:42 stat1007 jupyterhub-conda[7958]: await self.initialize(argv) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/jupyterhub/app.py", line 2521, in initialize May 25 11:24:42 stat1007 jupyterhub-conda[7958]: self.init_db() May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/jupyterhub/app.py", line 1726, in init_db May 25 11:24:42 stat1007 jupyterhub-conda[7958]: self.session_factory = orm.new_session_factory( May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/jupyterhub/orm.py", line 880, in new_session_factory May 25 11:24:42 stat1007 jupyterhub-conda[7958]: check_db_revision(engine) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/jupyterhub/orm.py", line 771, in check_db_revision May 25 11:24:42 stat1007 jupyterhub-conda[7958]: current_table_names = set(inspect(engine).get_table_names()) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/inspection.py", line 111, in inspect May 25 11:24:42 stat1007 jupyterhub-conda[7958]: ret = reg(subject) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/engine/reflection.py", line 304, in _engine_insp May 25 11:24:42 stat1007 jupyterhub-conda[7958]: return Inspector._construct(Inspector._init_engine, bind) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/engine/reflection.py", line 237, in _construct May 25 11:24:42 stat1007 jupyterhub-conda[7958]: init(self, bind) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/engine/reflection.py", line 248, in _init_engine May 25 11:24:42 stat1007 jupyterhub-conda[7958]: engine.connect().close() May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3264, in connect May 25 11:24:42 stat1007 jupyterhub-conda[7958]: return self._connection_cls(self) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 174, in __init__ May 25 11:24:42 stat1007 jupyterhub-conda[7958]: self.dispatch.engine_connect(self) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/event/attr.py", line 487, in __call__ May 25 11:24:42 stat1007 jupyterhub-conda[7958]: fn(*args, **kw) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/event/legacy.py", line 100, in wrap_leg May 25 11:24:42 stat1007 jupyterhub-conda[7958]: return fn(*conv(*args)) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/jupyterhub/orm.py", line 737, in ping_connection May 25 11:24:42 stat1007 jupyterhub-conda[7958]: connection.scalar(select([1])) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/sql/_selectable_constructors.py", line 489, in select May 25 11:24:42 stat1007 jupyterhub-conda[7958]: return Select(*entities) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/sql/selectable.py", line 5132, in __init__ May 25 11:24:42 stat1007 jupyterhub-conda[7958]: self._raw_columns = [ May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/sql/selectable.py", line 5133, in <listcomp> May 25 11:24:42 stat1007 jupyterhub-conda[7958]: coercions.expect( May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/sql/coercions.py", line 413, in expect May 25 11:24:42 stat1007 jupyterhub-conda[7958]: resolved = impl._literal_coercion( May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/sql/coercions.py", line 652, in _literal_coercion May 25 11:24:42 stat1007 jupyterhub-conda[7958]: self._raise_for_expected(element, argname) May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/sql/coercions.py", line 1143, in _raise_for_expected May 25 11:24:42 stat1007 jupyterhub-conda[7958]: return super()._raise_for_expected( May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/sql/coercions.py", line 711, in _raise_for_expected May 25 11:24:42 stat1007 jupyterhub-conda[7958]: super()._raise_for_expected( May 25 11:24:42 stat1007 jupyterhub-conda[7958]: File "/opt/conda-analytics/lib/python3.10/site-packages/sqlalchemy/sql/coercions.py", line 536, in _raise_for_expected May 25 11:24:42 stat1007 jupyterhub-conda[7958]: raise exc.ArgumentError(msg, code=code) from err May 25 11:24:42 stat1007 jupyterhub-conda[7958]: sqlalchemy.exc.ArgumentError: Column expression, FROM clause, or other columns clause element expected, got [1]. Did you mean to say select(1)? May 25 11:24:42 stat1007 jupyterhub-conda[7958]: May 25 11:24:42 stat1007 jupyterhub-conda[7958]: [D 2023-05-25 11:24:42.127 JupyterHub application:1028] Exiting application: jupyterhub
The change to the jupyterhub configuration was reverted, but the services still didn't restart cleanly, suggesting that the change in T336951 may not have been the direct cause of the error.
We need to work on resolving this issue with a high priority.