I’m usins a postgres database for Hub component with NativeAuthenticator. The problem is, that for some reasone, if the hub pod needs a restart (after helm upgrade for instance) it seems that the users that is already persisted on database, are not beign recongnize and not being listed on Jupyter Hub UI.
When hub pod restarts, it seems that is recreating all users.
Loading /usr/local/etc/jupyterhub/secret/values.yaml
No config at /usr/local/etc/jupyterhub/existing-secret/values.yaml
[I 2024-08-09 21:25:13.379 JupyterHub app:2885] Running JupyterHub version 4.1.5
[I 2024-08-09 21:25:13.380 JupyterHub app:2915] Using Authenticator: nativeauthenticator.nativeauthenticator.NativeAuthenticator
[I 2024-08-09 21:25:13.380 JupyterHub app:2915] Using Spawner: kubespawner.spawner.KubeSpawner-6.2.0
[I 2024-08-09 21:25:13.380 JupyterHub app:2915] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-4.1.5
[I 2024-08-09 21:25:13.401 alembic.runtime.migration migration:216] Context impl SQLiteImpl.
[I 2024-08-09 21:25:13.401 alembic.runtime.migration migration:219] Will assume non-transactional DDL.
[I 2024-08-09 21:25:13.412 alembic.runtime.migration migration:622] Running stamp_revision -> 0eee8c825d24
[I 2024-08-09 21:25:13.579 JupyterHub roles:173] Role jupyterhub-idle-culler added to database
[W 2024-08-09 21:25:13.583 JupyterHub auth:38]
The shared database session at Authenticator.db is deprecated, and will be removed.
Please manage your own database and connections.
Contact JupyterHub at https://github.com/jupyterhub/jupyterhub/issues/3700
if you have questions or ideas about direct database needs for your Authenticator.
[I 2024-08-09 21:25:13.591 JupyterHub roles:239] Adding role admin for User: pmesserschmidt
[I 2024-08-09 21:25:13.598 JupyterHub roles:239] Adding role user for User: pmesserschmidt
[I 2024-08-09 21:25:13.605 JupyterHub roles:239] Adding role admin for User: bpitol
[I 2024-08-09 21:25:13.611 JupyterHub roles:239] Adding role user for User: bpitol
[I 2024-08-09 21:25:13.619 JupyterHub roles:239] Adding role admin for User: rferraz
[I 2024-08-09 21:25:13.625 JupyterHub roles:239] Adding role user for User: rferraz
The users that appears in the log are configure as admin users. The other regular users (not admin) that was created before hub pod restart disapears.
How can I solve this?
This is how the helm chart is configured
hub:
revisionHistoryLimit:
config:
JupyterHub:
admin_access: true
authenticator_class: nativeauthenticator.NativeAuthenticator
db_url: ${DB_CONN_DEV}
NativeAuthenticator:
open_signup: false
enable_auth_state: true
Authenticator:
admin_users:
- pmesserschmidt
- bribeiro
- bpitol
- tgomes
- rferraz