diagnostics

package
v0.0.0-...-12c5f08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

The diagnostics package contains different tools to collect data they can be executed using the following flags at the test suite

- `--collect-conntrack`: Call `conntrack -L` - `--collect-iptables`: Call `iptables -L -n` - `--collect-ovsflows`: Call `ovs-ofctl dump-flows` per interface - `--collect-tcpdump`: Call `tcpdump -vvv -nne` per interface and expression

To integratre them with new test first instance the diagnostics package with

```golang fr = wrappedTestFramework("my-test-suite") d = diagnostics.New(fr) ```

Then at the beginning of test initialize conntrack, ovsflows and iptables like

```golang

d.ConntrackDumpingDaemonSet()
d.OVSFlowsDumpingDaemonSet("breth0")
d.IPTablesDumpingDaemonSet()

```

And add tcpdump to the test place where the expression can be composed, for example to dump tcpdump related to a service nodeport, the expression will be composed after creating the service, also specifying the interfaces.

```golang

d.TCPDumpDaemonSet([]string{"any", "eth0", "breth0"}, fmt.Sprintf("port %s or port %s", port, nodePort))

```

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFlags

func RegisterFlags(flags *flag.FlagSet)

Types

type Diagnostics

type Diagnostics struct {
	// contains filtered or unexported fields
}

func New

func (*Diagnostics) ConntrackDumpingDaemonSet

func (d *Diagnostics) ConntrackDumpingDaemonSet()

func (*Diagnostics) IPTablesDumpingDaemonSet

func (d *Diagnostics) IPTablesDumpingDaemonSet()

func (*Diagnostics) OVSFlowsDumpingDaemonSet

func (d *Diagnostics) OVSFlowsDumpingDaemonSet(iface string)

func (*Diagnostics) TCPDumpDaemonSet

func (d *Diagnostics) TCPDumpDaemonSet(ifaces []string, expression string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL