Skip to content

Updating a hub from using profile_list to no profile_list results in user_options not being cleanup up from the hub db #902

Description

@GeorgianaElena

Bug description

After updating a z2jh hub deployment from having a profileList to spawning directly an image, my spawn failed.

I don't have the hub logs anymore, but this is the log message it printed
https://github.com/jupyterhub/jupyterhub/blob/ab91bdd4732e3840ca6aaf6b8ff713fbd972d436/jupyterhub/handlers/pages.py#L251
before failing to spawn because it couldn't find whatever the default profile option was set on the initial profileList setup.

Upon inspecting the spawners table in the hub db, it looked like user_options still had data related to the initial profile setup:

1|11||{"kubespawner_version": "7.0.0", "pod_name": "jupyter-georgianaelena", "namespace": "staging", "dns_name": "jupyter-georgianaelena.staging.svc.cluster.local"}|||2025-11-19 12:02:13.566780|{"profile": "only-choice", "image": "bnext-nucleus", "resource_allocation": "mem_4_gb"}|

Manually updating the table to emtpy the userdata_options dict unblocked me.

How to reproduce

  1. Deploy z2jh hub with profileLists
  2. Start a server
  3. Re-deploy the same hub, after removing the profileList
  4. Try to start a server
  5. See error

Expected behaviour

Server spawns

Actual behaviour

Error about profille option not being there.

Your personal set up

Z2JH 4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions