Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to z2jh 2.0 #3418

Closed
yuvipanda opened this issue May 31, 2022 · 18 comments
Closed

Upgrade to z2jh 2.0 #3418

yuvipanda opened this issue May 31, 2022 · 18 comments

Comments

@yuvipanda
Copy link
Contributor

yuvipanda commented May 31, 2022

A new release of z2jh is coming soon, and we should start the upgrade process early to shake out bugs.

@yuvipanda
Copy link
Contributor Author

The pod definition no longer sets args on the container. So before the upgrade, pod definitions had this:

  - args:
    - jupyterhub-singleuser
    - --ip=0.0.0.0
    - --port=8888
    - --SingleUserNotebookApp.default_url=/retro

After, they don't. So pod startups error out with the following message:

➜ k -n data8-staging logs jupyter-yuvipanda
tini (tini version 0.18.0)
Usage: tini [OPTIONS] PROGRAM -- [ARGS] | --version

Execute a program under the supervision of a valid init process (tini)

Command line options:

  --version: Show version and exit.
  -h: Show this help message and exit.
  -s: Register as a process subreaper (requires Linux >= 3.4).
  -p SIGNAL: Trigger SIGNAL when parent dies, e.g. "-p SIGKILL".
  -v: Generate more verbose output. Repeat up to 3 times.
  -w: Print a warning when processes are getting reaped.
  -g: Send signals to the child's process group.
  -e EXIT_CODE: Remap EXIT_CODE (from 0 to 255) to 0.
  -l: Show license and exit.

Environment variables:

  TINI_SUBREAPER: Register as a process subreaper (requires Linux >= 3.4).
  TINI_VERBOSITY: Set the verbosity level (default: 1).
  TINI_KILL_PROCESS_GROUP: Send signals to the child's process group.

@yuvipanda
Copy link
Contributor Author

This is mostly thanks to jupyterhub/zero-to-jupyterhub-k8s#2449.

Setting this in values.yaml fixes this:

  singleuser:
    cmd:
      # Explicitly define this, as it's no longer set by z2jh
      # https://github.com/jupyterhub/zero-to-jupyterhub-k8s/pull/2449
      - jupyterhub-singleuser

However, this doesn't seem to respect the default url - we start in lab, not retro.

@yuvipanda
Copy link
Contributor Author

And I see that the default env var is in fact set:

    - name: JUPYTERHUB_DEFAULT_URL
      value: /retro

so not sure why that isn't working.

@yuvipanda
Copy link
Contributor Author

@minrk helped debug this, possibly fixed in jupyterhub/jupyterhub#3918

yuvipanda added a commit to yuvipanda/datahub that referenced this issue May 31, 2022
This is now a requirement for hub services - oauth client id
must start with service-

Ref berkeley-dsep-infra#3418
@yuvipanda
Copy link
Contributor Author

All service tokens (which we use to get our hubs to auth with the central datahub) now need to be prefixed with service- as well

yuvipanda added a commit to yuvipanda/datahub that referenced this issue May 31, 2022
Reverts berkeley-dsep-infra#3417 and
berkeley-dsep-infra#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra#3418
@minrk
Copy link

minrk commented Jun 1, 2022

All service tokens (which we use to get our hubs to auth with the central datahub) now need to be prefixed with service-

I'm not sure if it's a terminology issue, but this restriction only applies to oauth client ids, which aren't typically picked by hand. Not tokens themselves, which can be any (long enough) string. The default values are unchanged (service-$serviceName), but now this pattern is enforced. I don't think there's much reason to pick a value other than the default, really.

@yuvipanda
Copy link
Contributor Author

Next up - control panel is missing in classic notebook interface :( Exists in lab and retro tho.

@yuvipanda
Copy link
Contributor Author

With some testing, setting JUPYTERHUB_SINGLEUSER_APP: "notebook.notebookapp.NotebookApp" fixes the Control Panel issue by just ignoring jupyter_server. Let's try that out for now, but this should be fixed upstream.

yuvipanda added a commit to yuvipanda/datahub that referenced this issue Jun 1, 2022
This brings back the Control Panel button on classic notebook,
until we figure out why that doesn't show up in jupyter server

Ref berkeley-dsep-infra#3418 (comment)
@yuvipanda
Copy link
Contributor Author

I think the control panel issue is fixed in jupyterhub/jupyterhub#3919

yuvipanda added a commit to yuvipanda/datahub that referenced this issue Jun 2, 2022
As we also have a 1.3 authenticator now

Ref berkeley-dsep-infra#3418
yuvipanda added a commit to yuvipanda/datahub that referenced this issue Jun 2, 2022
This alias does work, I didn't want to find the actual
fully qualified name.

Ref berkeley-dsep-infra#3418
@yuvipanda
Copy link
Contributor Author

LTIAuthenticator's config needed to change from:

hub:
  config:
     LTIAuthenticator: 

to

hub:
   config:
      LTI11Authenticator:

@yuvipanda
Copy link
Contributor Author

Discovered that by default users can no longer access any services unless they are admin, so access to hubs using the primary hub as auth was broken for non-admin users.

Fixed with:

hub:
  config:
      JupyterHub:
        load_roles:
          - name: user
            scopes:
            - access:services
            - self

yuvipanda added a commit to yuvipanda/datahub that referenced this issue Jun 2, 2022
Without this, non-admin users weren't able to access
hubs that used the main datahub for auth.

Ref berkeley-dsep-infra#3418
yuvipanda added a commit to yuvipanda/datahub that referenced this issue Jun 3, 2022
@balajialg
Copy link
Contributor

balajialg commented Jun 7, 2022

@yuvipanda @felder @ryanlovett What is the significance of making this upgrade? Do we have any release notes for the same?

@ryanlovett
Copy link
Collaborator

@balajialg We typically try to stay close to upstream's latest (and at times we've used prereleased) since it will have more bug fixes and features. @minrk wrote a blog post about JH 2.0 at https://blog.jupyter.org/jupyterhub-2-0-7a038715e96d.

@balajialg
Copy link
Contributor

Thanks, @ryanlovett! Helpful :)

@yuvipanda
Copy link
Contributor Author

@balajialg I think the primary user facing change would be a redesigned admin interface. Check it out!

@balajialg
Copy link
Contributor

@yuvipanda Sounds good. Just reviewed the UI changes. Looks like, the changes are not that drastic enough that it require an update in our existing documentation - https://ds-modules.github.io/curriculum-guide/faq/admin.html?highlight=admin. Correct me if I am wrong.

@balajialg
Copy link
Contributor

@yuvipanda @ryanlovett Is this issue done? Can it be closed?

@yuvipanda yuvipanda removed their assignment Nov 29, 2022
@yuvipanda
Copy link
Contributor Author

yeah this is done i think!

shaneknapp pushed a commit to berkeley-dsep-infra/stat159-user-image that referenced this issue Aug 29, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
ryanlovett pushed a commit to berkeley-dsep-infra/stat20-user-image that referenced this issue Sep 3, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
shaneknapp pushed a commit to berkeley-dsep-infra/astro-user-image that referenced this issue Sep 6, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
shaneknapp pushed a commit to berkeley-dsep-infra/biology-user-image that referenced this issue Sep 6, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
shaneknapp pushed a commit to berkeley-dsep-infra/publichealth-user-image that referenced this issue Sep 11, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
shaneknapp pushed a commit to berkeley-dsep-infra/eecs-user-image that referenced this issue Sep 11, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
shaneknapp pushed a commit to berkeley-dsep-infra/julia-user-image that referenced this issue Sep 12, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
shaneknapp pushed a commit to berkeley-dsep-infra/ischool-user-image that referenced this issue Sep 24, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
shaneknapp pushed a commit to berkeley-dsep-infra/datahub-user-image that referenced this issue Sep 25, 2024
Reverts berkeley-dsep-infra/datahub#3417 and
berkeley-dsep-infra/datahub#3420. They both
work, and I think we're good to go - but I didn't want to deploy
it just now as I'll be asleep soon.

Ref berkeley-dsep-infra/datahub#3418
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants