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

sysdump: Collect hubble flows #458

Merged
merged 2 commits into from
Aug 5, 2021
Merged

Conversation

michi-covalent
Copy link
Contributor

@michi-covalent michi-covalent commented Jul 30, 2021

Optionally collect hubble flows as a part of sysdump. This PR adds two
new flags to the sysdump subcommand:

--hubble-flows-timeout

Timeout for the flow collection task. Default to 5 seconds.

--hubble-flows-count

Specifies the --last flag to pass to hubble observe command. Default
to zero, which disables the flow collection altogether. Note that the
actual number of flows that get collected might be different from the
value specified by this flag.

The output file can then be passed to hubble observe command, for example:

cat hubble-flows-cilium-nq247-20210729-220228.json | hubble observe

Signed-off-by: Michi Mutsuzaki michi@isovalent.com

@michi-covalent michi-covalent requested a review from a team as a code owner July 30, 2021 05:15
@michi-covalent michi-covalent temporarily deployed to ci July 30, 2021 05:15 Inactive
Copy link
Member

@christarazi christarazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Amazing

sysdump/constants.go Outdated Show resolved Hide resolved
@michi-covalent michi-covalent temporarily deployed to ci July 30, 2021 16:28 Inactive
@michi-covalent
Copy link
Contributor Author

test failures are not releated to the PR, but hubble observe command failed: https://github.com/cilium/cilium-cli/pull/458/checks?check_run_id=3203831181#step:18:81

⚠️ hubble-flows-cilium-jf8xn: failed to collect hubble flows for "cilium-jf8xn" in namespace "kube-system": command terminated with exit code 1
⚠️ hubble-flows-cilium-ncqg8: failed to collect hubble flows for "cilium-ncqg8" in namespace "kube-system": command terminated with exit code 1

looking into it...

@michi-covalent michi-covalent temporarily deployed to ci July 30, 2021 17:20 Inactive
@ldelossa
Copy link
Contributor

🤟

@michi-covalent
Copy link
Contributor Author

marking as draft 😞

@michi-covalent michi-covalent temporarily deployed to ci August 3, 2021 05:30 Inactive
@michi-covalent michi-covalent marked this pull request as ready for review August 3, 2021 05:30
@michi-covalent
Copy link
Contributor Author

working around cilium/cilium#17036 for now by running hubble observe --follow --last N with a timeout.

@michi-covalent
Copy link
Contributor Author

attempting to fix the external workloads failure in #463

Optionally collect hubble flows as a part of sysdump. This PR adds two
new flags to the sysdump subcommand:

--hubble-flows-timeout

  Timeout for the flow collection task. Default to 5 seconds.

--hubble-flows-count

  Specifies the --last flag to pass to hubble observe command. Default
  to zero, which disables the flow collection altogether. Note that the
  actual number of flows that get collected might be different from the
  value specified by this flag.

The output file can then be passed to hubble observe command, for example:

    cat hubble-flows-cilium-nq247-20210729-220228.json | hubble observe

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Set --hubble-flows-count in the Kind workflow to test the flow collection
logic. I'll update other workflows once this PR gets merged.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
@michi-covalent michi-covalent temporarily deployed to ci August 5, 2021 20:33 Inactive
@michi-covalent
Copy link
Contributor Author

rebased to pick up #463

@michi-covalent michi-covalent merged commit 8775e21 into master Aug 5, 2021
@michi-covalent michi-covalent deleted the pr/michi/sysdump-flows branch August 5, 2021 22:08
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

Successfully merging this pull request may close these issues.

None yet

5 participants