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

forge delete is broken for cr and csr #163

Closed
rhs opened this Issue Mar 11, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@rhs
Contributor

rhs commented Mar 11, 2018

No description provided.

@rhs

This comment has been minimized.

Contributor

rhs commented Mar 11, 2018

$ forge -v delete ambassador
║ kubectl get csr,clusterrolebindings,clusterroles,cm,controllerrevisions,crd,ds,deploy,ep,ev,hpa,ing,jobs,limits,netpol,no,pvc,pv,pdb,po,psp,podtemplates,rs,rc,quota,rolebindings,roles,secrets,sa,svc,sts,sc --all-namespaces -lforge.service=ambassador -ogo-template={{range .items}}{{.kind}} {{.metadata.namespace}} {{.metadata.name}}{{"\n"}}{{end}}
║ ClusterRoleBinding ambassador
║ ClusterRole ambassador
║ Deployment datawire ambassador
║ Endpoints datawire ambassador
║ Endpoints datawire ambassador-admin
║ ServiceAccount datawire ambassador
║ Service datawire ambassador
║ Service datawire ambassador-admin
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 367, in execute
File ".bootstrap/_pex/pex.py", line 293, in _wrap_coverage
File ".bootstrap/_pex/pex.py", line 325, in _wrap_profiling
File ".bootstrap/_pex/pex.py", line 410, in _execute
File ".bootstrap/_pex/pex.py", line 468, in execute_entry
File ".bootstrap/_pex/pex.py", line 486, in execute_pkg_resources
File "/home/endrec/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/cli.py", line 350, in call_main
exit(forge())
File "/home/endrec/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/home/endrec/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/endrec/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/endrec/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/endrec/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/endrec/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/home/endrec/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/tasks.py", line 246, in call
return result.get()
File "/home/endrec/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/executor.py", line 402, in do_run
result.value = fun(*args, **kwargs)
File "/home/endrec/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/cli.py", line 345, in delete
kube.delete(labels)
File "/home/endrec/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/tasks.py", line 246, in call
return result.get()
File "/home/endrec/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/executor.py", line 402, in do_run
result.value = fun(*args, **kwargs)
File "/home/endrec/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/kubernetes.py", line 246, in delete
kind, namespace, name = line.split()
ValueError: need more than 2 values to unpack

@plombardi89

This comment has been minimized.

Contributor

plombardi89 commented Mar 12, 2018

I got a similar error?

forge delete --all
║ kubectl get csr,clusterrolebindings,clusterroles,cm,controllerrevisions,crd,ds,deploy,ep,ev,hpa,ing,jobs,limits,netpol,no,pvc,pv,pdb,po,psp,podtemplates,rs,rc,quota,rolebindings,roles,secrets,sa,svc,sts,sc --all-namespaces -lforge.service -ogo-template={{range .items}}{{.kind}} {{.metadata.namespace}} {{.metadata.name}}{{"\n"}}{{end}}
║ ClusterRoleBinding  ambassador-stable
║ ClusterRole  ambassador-stable
║ ConfigMap loadtest locust-stable-config
║ Deployment loadtest ambassador-stable
║ Deployment loadtest locust-stable-master
║ Deployment loadtest locust-stable-slave
║ Deployment loadtest target-stable
║ Endpoints default locust-stable-master
║ Endpoints loadtest ambassador-stable
║ Endpoints loadtest ambassador-stable-admin
║ Endpoints loadtest locust-stable-master
║ Endpoints loadtest target-stable
║ ServiceAccount loadtest ambassador-stable
║ Service default locust-stable-master
║ Service loadtest ambassador-stable
║ Service loadtest ambassador-stable-admin
║ Service loadtest locust-stable-master
║ Service loadtest target-stable
Traceback (most recent call last):
  File "/usr/local/bin/forge/.bootstrap/_pex/pex.py", line 367, in execute
  File "/usr/local/bin/forge/.bootstrap/_pex/pex.py", line 293, in _wrap_coverage
  File "/usr/local/bin/forge/.bootstrap/_pex/pex.py", line 325, in _wrap_profiling
  File "/usr/local/bin/forge/.bootstrap/_pex/pex.py", line 410, in _execute
  File "/usr/local/bin/forge/.bootstrap/_pex/pex.py", line 468, in execute_entry
  File "/usr/local/bin/forge/.bootstrap/_pex/pex.py", line 486, in execute_pkg_resources
  File "/home/plombardi/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/cli.py", line 350, in call_main
    exit(forge())
  File "/home/plombardi/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/plombardi/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/plombardi/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/plombardi/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/plombardi/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/plombardi/.pex/install/click-6.7-py2.py3-none-any.whl.6d9ff910081ac14222b6215822bc2664662de745/click-6.7-py2.py3-none-any.whl/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/plombardi/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/tasks.py", line 246, in __call__
    return result.get()
  File "/home/plombardi/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/executor.py", line 402, in do_run
    result.value = fun(*args, **kwargs)
  File "/home/plombardi/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/cli.py", line 345, in delete
    kube.delete(labels)
  File "/home/plombardi/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/tasks.py", line 246, in __call__
    return result.get()
  File "/home/plombardi/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/executor.py", line 402, in do_run
    result.value = fun(*args, **kwargs)
  File "/home/plombardi/.pex/install/Forge-0.4.5-py2-none-any.whl.2f6554740b81bdca990c9a01c816680026f7750a/Forge-0.4.5-py2-none-any.whl/forge/kubernetes.py", line 246, in delete
    kind, namespace, name = line.split()
ValueError: need more than 2 values to unpack
@rhs

This comment has been minimized.

Contributor

rhs commented Mar 13, 2018

This is fixed in 0.4.6

@rhs rhs closed this Mar 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment