Juju Charm - Magpie infra testing
Go to file
Andrew McLeod 9388f28568
Merge pull request #8 from marosg42/proper_iperf_ip
iperf server needs to listen on a correct IP from magpie interface
2019-09-19 11:37:16 +02:00
deps/layer adding iperf 2017-04-02 21:04:05 +02:00
lib/charms/layer iperf server needs to listen on a correct IP from magpie interface 2019-09-18 15:24:05 +02:00
reactive fix peering 2019-09-06 14:56:39 +02:00
tests fix timeouts 2016-10-01 01:20:30 +02:00
LICENSE Initial implementation of hadoop-client layer 2016-01-07 18:31:24 -05:00
README.md fixed README.md error 2018-01-10 16:27:47 +01:00
config.yaml add min mtu and min speed config variables 2017-08-31 12:19:53 +02:00
copyright Initial implementation of hadoop-client layer 2016-01-07 18:31:24 -05:00
icon.svg added icon 2016-09-29 22:54:35 +02:00
layer.yaml adding iperf 2017-04-02 21:04:05 +02:00
metadata.yaml Enable disco 2019-06-27 15:22:36 +02:00
perf.py adding iperf 2017-04-02 21:04:05 +02:00

README.md

Overview

Magpie is a charm used for testing the networking of a juju provider/substrate. Simply deploy more than one Magpie charm and watch the status messages and debug logs.

Magpie will test:

  • DNS functionality
  • Local hostname lookup
  • ICMP between peers
  • MTU between leader and clients
  • Transfer between leader and clients

MTU and transfer speed are tested with iperf2

Status messages will show the unit numbers that have issues - if there are no problems, there will not be a verbose status message.

All actions, strings, queries and actions are logged in the juju logs.

MTU Notes

The MTU size reported by iperf is sometimes 8 or 12 bytes less than the configured MTU on the interface. This is due to TCP options not being included in the measurement, and therefore we ignore that difference and report everything OK.

Workload Status

In addition to ICMP and DNS status messages, if a networking problem is detected, the workload status of the agent which has found the issues will be set to blocked.

Reactive States

This layer will set the following states:

  • magpie-icmp.failed ICMP has failed to one or more units in the peer relation.
  • magpie-dns.failed DNS has failed to one or more units in the peer relation.

Note: work stopped on these states as it is currently unlikely magpie will be consumed as a layer. Please open an issue against this github repo if more states are required.

Usage

juju deploy magpie -n 2
juju deploy magpie -n 1 --to lxd:1

This charm also supports the following config values:

  check_local_hostname:
    default: true
    description: Check if local hostname is resolvable
    type: boolean
  dns_server:
    default: ''
    description: DNS Server to use (default: system default)
    type: string
  dns_tries:
    default: 1
    description: Number of DNS resolution attempts per query
    type: int
  dns_time:
    default: 3
    description: Timeout in seconds per DNS query try
    type: int
  ping_timeout:
    default: 2
    description: Timeout in seconds per ICMP request
    type: int
  ping_tries:
    default: 1
    description: Number of ICMP packets per ping
    type: int
  required_mtu:
    default: 0
    description: |
        Desired MTU for all nodes - block if the unit MTU is different 
        (accounting for encapsulation). 0 disables.        
    type: int
  min_speed:
    default: 0
    description: |
        Minimum transfer speed in mbits/s required to pass the test. 
        0 disables.        

e.g.

juju set magpie dns_server=8.8.8.8 required_mtu=9000 min_speed=1000