conjure-up / spells

conjure-up spells registry
79 stars 37 forks source link

cdk Failure in step 02_get-kubectl after-deploy (macos, py3.7 can't find yaml) #202

Closed kwmonroe closed 5 years ago

kwmonroe commented 6 years ago

Deployed cdk to aws. Step 2 failed with this in the after-deploy.err:

$ conjure-up --version
conjure-up 2.5.9
$ uname
Darwin

$ cat ~/.cache/conjure-up/canonical-kubernetes/steps/02_get-kubectl/after-deploy.err
Traceback (most recent call last):
  File "/Users/kwmonroe/.cache/conjure-up/canonical-kubernetes/steps/02_get-kubectl/update_kube_config.py", line 4, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
kwmonroe commented 6 years ago

Here's the view from conjure-up.log, fwiw:

2018-07-03 15:39:25,580 [DEBUG] conjure-up/canonical-kubernetes - telemetry.py:17 - Showing screen: Running Post-Deploy Steps
2018-07-03 15:39:25,582 [INFO] conjure-up/canonical-kubernetes - step.py:220 - Running Canonical Distribution of Kubernetes step: 00_process-providertype after-deploy.
2018-07-03 15:39:25,754 [DEBUG] conjure-up/canonical-kubernetes - step.py:261 - Storing environment
2018-07-03 15:39:25,778 [DEBUG] conjure-up/canonical-kubernetes - step.py:267 - Executing script: /Users/kwmonroe/.cache/conjure-up/canonical-kubernetes/steps/00_process-providertype/after-deploy
2018-07-03 15:39:25,807 [INFO] conjure-up/canonical-kubernetes - step.py:220 - Running Canonical Distribution of Kubernetes step: 02_get-kubectl after-deploy.
2018-07-03 15:39:25,984 [DEBUG] conjure-up/canonical-kubernetes - step.py:261 - Storing environment
2018-07-03 15:39:25,995 [DEBUG] conjure-up/canonical-kubernetes - step.py:267 - Executing script: /Users/kwmonroe/.cache/conjure-up/canonical-kubernetes/steps/02_get-kubectl/after-deploy
2018-07-03 15:39:44,203 [DEBUG] conjure-up/canonical-kubernetes - events.py:52 - Setting Error at conjureup/events.py:149
2018-07-03 15:39:44,204 [ERROR] conjure-up/canonical-kubernetes - events.py:161 - Unhandled exception in <Task finished coro=<RunStepsController.run_steps() done, defined at /usr/local/Cellar/conjure-up/2.5.9/libexec/lib/python3.7/site-packages/conjureup/controllers/juju/runsteps/gui.py:14> exception=Exception('Failure in step 02_get-kubectl after-deploy')>
Traceback (most recent call last):
  File "/usr/local/Cellar/conjure-up/2.5.9/libexec/lib/python3.7/site-packages/conjureup/controllers/juju/runsteps/gui.py", line 19, in run_steps
    step.result = await step.after_deploy(view.set_footer)
  File "/usr/local/Cellar/conjure-up/2.5.9/libexec/lib/python3.7/site-packages/conjureup/models/step.py", line 137, in after_deploy
    return await self.run(PHASES.AFTER_DEPLOY, msg_cb)
  File "/usr/local/Cellar/conjure-up/2.5.9/libexec/lib/python3.7/site-packages/conjureup/models/step.py", line 282, in run
    phase.value))
Exception: Failure in step 02_get-kubectl after-deploy
2018-07-03 15:39:44,230 [DEBUG] conjure-up/canonical-kubernetes - __init__.py:27 - Showing dialog for exception: Failure in step 02_get-kubectl after-deploy
kwmonroe commented 6 years ago

This is an issue with pyyaml and python 3.7:

https://github.com/yaml/pyyaml/issues/126

I'm unclear why the pyyaml-4.2b2 resource wasn't installed for me, but if i install pyyaml manually, conjure-up works:

$ pip3 install pyyaml==4.2b4
adam-stokes commented 6 years ago

Very odd, we have the beta referenced in the formula.

I'll need to see if we're missing something the tests aren't catching

adam-stokes commented 6 years ago

Looks like pyyaml 3.13 will be released with 3.7 support, so we'll want to update the brew formula when that is released, hopefully today or tomorrow

spjz commented 5 years ago

Still having this issue as of today with a fresh install of Ubuntu 16.04 Server LTS, with current snaps for lxd and conjure-up, deploying kubernetes-core on localhost.

kwmonroe commented 5 years ago

Oof, sorry I left this open so long. Confirmed fixed in conjure-up 2.6.0 on macos. This fixed me a few months ago:

https://github.com/Homebrew/homebrew-core/commit/6bc6dd64a1f810db99d4acfcb3cd7accd14ec2ea

@spjz, this was an issue with homebrew/macos deps, so it won't be the same root cause for ubuntu.