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

calicoctl node diags has unexplained 'exit status 1' in its output #810

Closed
tmjd opened this issue May 22, 2017 · 2 comments
Closed

calicoctl node diags has unexplained 'exit status 1' in its output #810

tmjd opened this issue May 22, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@tmjd
Copy link
Member

tmjd commented May 22, 2017

When running the command sudo calicoctl node diags the output includes exit status 1.

Expected Behavior

Whatever command is returning exit status 1 should be reported in the output or the message should be eliminated if it is an unimportant failure.

Current Behavior

This is the current output

Collecting diagnostics
Using temp dir: /tmp/calico458969731
Dumping netstat
Dumping routes (IPv4)
Dumping routes (IPv6)
Dumping interface info (IPv4)
Dumping interface info (IPv6)
Dumping iptables (IPv4)
Dumping iptables (IPv6)
Dumping ipsets
exit status 1
Dumping ipsets (container)
Copying journal for calico-node.service
Dumping felix stats
Copying Calico logs

Diags saved to /tmp/calico458969731/diags-20170522_193031.tar.gz
If required, you can upload the diagnostics bundle to a file sharing service 
such as transfer.sh using curl or similar.  For example:

    curl --upload-file /tmp/calico458969731/diags-20170522_193031.tar.gz https://transfer.sh//tmp/calico458969731/diags-20170522_193031.tar.gz

Steps to Reproduce (for bugs)

  1. Setup kubernetes cluster in vagrant following http://docs.projectcalico.org/v2.2/getting-started/kubernetes/installation/vagrant/
  2. Install calicoctl and make executable
  3. Run sudo calicoctl node diags

Context

Your Environment

  • Calico version v2.2 installed
    • Using the calicoctl versions from Calico v2.2, v2.1 and v2.0 all contained the exit status 1 line
  • Kubernetes 1.6.2
@heschlie
Copy link
Contributor

So it looks like it is cause by ipset list throwing an error:

ipset v6.20.1: Kernel and userspace incompatible: settype by userspace. with revision 1378325840 not supported

And when a command fails we just dump the Go error to stdout, which with exec.Command is what we see here, exit status 1. I feel like we have two good low hanging fruit:

  1. Change the output to be something more like "Failed to run command: $command"
  2. Show the actual error message (and probably command) in the output

I'm mostly just not sure how much noise we want to generate, @tmjd WDYT?

@tmjd
Copy link
Member Author

tmjd commented Aug 15, 2017

I think 1 would work, just show the failed command. I'm thinking, then if they want to see more they can just run that command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants