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 daskhub from 4.5.1->4.5.4 appears to break or change config #131

Closed
kyprifog opened this issue Nov 11, 2020 · 10 comments
Closed

Upgrade daskhub from 4.5.1->4.5.4 appears to break or change config #131

kyprifog opened this issue Nov 11, 2020 · 10 comments

Comments

@kyprifog
Copy link

kyprifog commented Nov 11, 2020

Using vanilla Daskhub 4.5.1 I get the following dask config:

export API_TOKEN=$(openssl rand -hex 32)

helm upgrade --install dhub dask/daskhub --version v4.5.1 --set jupyterhub.hub.cookieSecret=${API_TOKEN} --set jupyterhub.proxy.secretToken=${API_TOKEN} --set jupyterhub.proxy.service.type=LoadBalancer --set jupyterhub.hub.services.dask-gateway.apiToken=${API_TOKEN} --set dask-gateway.gateway.auth.jupyterhub.apiToken=${API_TOKEN} --set jupyterhub.proxy.service.type=LoadBalancer
dask.config.config
>>
{'distributed': {'version': 2,
  'dashboard': {'link': '/user/{JUPYTERHUB_USER}/proxy/{port}/status'},
  'scheduler': {'idle-timeout': '3600s'},
  'admin': {'tick': {'limit': '5s'}}},
 'logging': {'distributed': 'warning',
  'bokeh': 'critical',
  'tornado': 'critical',
  'tornado.application': 'error'},
 'kubernetes': {'name': 'dask-{JUPYTERHUB_USER}-{uuid}',
  'worker-template': {'spec': {'serviceAccount': 'daskkubernetes',
    'restartPolicy': 'Never',
    'containers': [{'name': 'dask-worker',
      'image': '${JUPYTER_IMAGE_SPEC}',
      'args': ['dask-worker',
       '--nthreads',
       '2',
       '--no-dashboard',
       '--memory-limit',
       '7GB',
       '--death-timeout',
       '60'],
      'resources': {'limits': {'cpu': '1.75', 'memory': '7G'},
       'requests': {'cpu': 1, 'memory': '7G'}}}]}}},
 'labextension': {'factory': {'module': 'dask_gateway',
   'class': 'GatewayCluster',
   'args': [],
   'kwargs': {}}},
 'gateway': {'auth': {'type': 'jupyterhub'},
  'public_address': '/services/dask-gateway/',
  'address': 'http://100.67.197.82:8000/services/dask-gateway/',
  'proxy_address': 'gateway://traefik-dhub-dask-gateway.default:80'},
 'root_config': '/srv/conda/etc',
 'temporary-directory': None,
 'dataframe': {'shuffle-compression': None},
 'array': {'svg': {'size': 120}},
 'optimization': {'fuse': {'active': True,
   'ave-width': 1,
   'max-width': None,
   'max-height': None,
   'max-depth-new-edges': None,
   'subgraphs': None,
   'rename-keys': True}}}

And as a result when I go into the dask labextension and click new cluster I get a GatewayCluster. This seems to be working correctly.

However, without changing anything but the daskhub version to 4.5.4 (this is current version so same command removing --version v4.5.1), I get the following dask.config.config:

{'gateway': {'auth': {'type': 'jupyterhub'},
  'public_address': '/services/dask-gateway/',
  'address': 'http://100.70.59.227:8000/services/dask-gateway/',
  'proxy_address': 'gateway://traefik-dhub-dask-gateway.default:80'},
 'root_config': '/srv/conda/etc',
 'temporary-directory': None,
 'dataframe': {'shuffle-compression': None},
 'array': {'svg': {'size': 120}, 'slicing': {'split-large-chunks': None}},
 'optimization': {'fuse': {'active': True,
   'ave-width': 1,
   'max-width': None,
   'max-height': inf,
   'max-depth-new-edges': None,
   'subgraphs': None,
   'rename-keys': True}}}

and as a result when I create a new cluster it spins up a LocalCluster (missing dask lab extension amongst other configs)
Is this intentional? Can some documentation be added to configure 4.5.4 in the same way that 4.5.1 was configured?

@kyprifog kyprifog changed the title Upgrade daskhub 4.5.4 appears to break or change dask-gateway config Upgrade daskhub 4.5.4 appears to break or change config Nov 11, 2020
@kyprifog kyprifog changed the title Upgrade daskhub 4.5.4 appears to break or change config Upgrade daskhub from 4.5.1->4.5.4 appears to break or change config Nov 11, 2020
@kyprifog
Copy link
Author

git diff 0.8.0 0.9.0 on dask-gateway leads me to believe one of these changes caused the difference I'm seeing here.

@jacobtomlinson
Copy link
Member

@jcrist could you help point in the direction of what needs updating here?

@TomAugspurger
Copy link
Member

@kyprifog can you confirm that you're using the default single user image?

pangeo-data/pangeo-docker-images#152 changed how the config works. Will need to look into how to do this properly.

@kyprifog
Copy link
Author

kyprifog commented Nov 17, 2020

@TomAugspurger yeah I'm using the default for everything, this is the only thing i'm overriding:

jupyterhub:
  loglevel: TRACE
  proxy:
    https:
      enabled: true
      hosts:
        - <HOST>
      letsencrypt:
        contactEmail: <EMAIL>

You can see the full command I'm using above to spin it up, just default remote dask/daskhub, i'm hitting upgrade once to get the ssl stuff I referenced here.

@TomAugspurger
Copy link
Member

OK, thanks.

For now, I recommend baking the config into your application config (similar to https://github.com/pangeo-data/pangeo-cloud-federation/pull/820/files)

@kyprifog
Copy link
Author

@TomAugspurger sorry for being dense about this but do you know how I would configure these bits using that approach?

 'gateway': {'auth': {'type': 'jupyterhub'},
  'public_address': '/services/dask-gateway/',
  'address': 'http://100.67.197.82:8000/services/dask-gateway/',
  'proxy_address': 'gateway://traefik-dhub-dask-gateway.default:80'},

I tried this but with no luck (gets stuck with "Cluster starting..." in lab extension)

              DASK_GATEWAY__CLUSTER__OPTIONS__IMAGE: '{JUPYTER_IMAGE_SPEC}'
              DASK_GATEWAY__PROXY_ADDRESS: "gateway://traefik-dhub-dask-gateway.default:80"
              DASK_GATEWAY__ADDRESS: "http://proxy-http.default:8000/services/dask-gateway/"
              DASK_GATEWAY__AUTH__TYPE: "jupyterhub"
              DASK_DISTRIBUTED__DASHBOARD_LINK: '/user/{JUPYTERHUB_USER}/proxy/{port}/status'
              DASK_LABEXTENSION__FACTORY__MODULE: 'dask_gateway'
              DASK_LABEXTENSION__FACTORY__CLASS: 'GatewayCluster'

Maybe i'll just wait to hear back from @jcrist because I feel like that correct config above has alot of moving parts I may be missing other essential pieces.

@TomAugspurger
Copy link
Member

TomAugspurger commented Nov 19, 2020 via email

@kyprifog
Copy link
Author

kyprifog commented Dec 4, 2020

@jcrist @TomAugspurger Any further thoughts on this? I noticed this issue that could possible be related? dask/dask-gateway#348

I have not had any luck with changing those variables to get it working like it was in 4.5.1

@kyprifog
Copy link
Author

kyprifog commented Apr 7, 2021

Awaiting: dask/dask-gateway#381 (I think)

@consideRatio
Copy link
Collaborator

Awaiting: dask/dask-gateway#381 (I think)

Closed as resolved by a new release of dask-gateway.

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