vse-sync-collection-tools

command module
v0.0.0-...-5dac8ea Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: GPL-2.0 Imports: 1 Imported by: 0

README

synchronization-testsuites

The main purpose of this repo is build the necessary tooling to collect necessary synchronization-related data logs from a running OpenShift cluster. This data will then be leveraged by different analysis tools to determine if the cluster is running within acceptable bounds synchronization-wise.```

The core approach taken is to strongly encourage and enforce separation of concerns between:

  1. Declarative description of the cluster(s) under test
  2. Configuration of a test (e.g. number of repetitions, acceptable thresholds, etc.)
  3. Collectors - methods of collecting indicative information about the cluster
  4. Checks - performed on collected values

Setup

  1. Install Go
  2. Install dependencies with go mod tidy
Development Extras
  1. Install dev binaries: make install-tools. Ensure your $GOBIN is on your $PATH
  2. yamllint
    1. Install yamllint with sudo yum install yamllint
    2. run with yamllint ./
  3. golangci-lint
    1. Install golangci-lint
    2. run with make lint
  4. license-eye
    1. Install license-eye with go install github.com/apache/skywalking-eyes/cmd/license-eye@latest
    2. run with license-eye header check or license-eye header fix
  5. pre-commit
    1. on RHEL, pre-commit requires recompiling python to include optional sqlite modules:
      1. sudo yum install sqlite-devel
      2. See instructions here
    2. install pre-commit with pip3.10 install pre-commit
    3. configure your repository to run pre-commit hooks with pre-commit install
    4. manually run against all files with pre-commit run --all-files or against staged files with pre-commit run.
    5. Otherwise pre-commit will now run automatically when you make a new commit.

Usage

Building binary

Run the following command to build the binary used in the following commands:

go build
NOTE: use the --race flag when developing collectors.
Checking Enviroment

Run the following command (check help string for more details):

./vse-sync-collection-tools env verify --interface="<ptp interface>" --kubeconfig="${KUBECONFIG}"
Running Collectors

Run the following command (check help string for more details):

./vse-sync-collection-tools collect --interface="<ptp interface>" --kubeconfig="${KUBECONFIG}"
Fetching logs

The log subcommand has been removed. Instead we have implimented at collector which is enabled by default. If possible you should use a log aggregator. You can control the collectors running using the --collector flag.

Running tests

TODO: implement tests for all packages

To test the framework components run ginkgo pkg/<packagename>, for example to run the unit tests for the config package use ginkgo pkg/config

Contributing to the repo

See Adding a collector

To Do List

  • unit tests for all of pkg/
  • add more collectors
  • better data persistance options

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
cmd
collectors/devices
Devices collected methods for getting device information from a system under test
Devices collected methods for getting device information from a system under test

Jump to

Keyboard shortcuts

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