Git Product home page Git Product logo

tegu's Introduction

Tegu

Tegu is a reservation manager which provides the ability to create and manage:

  • quality of service bandwidth reservations between network endpoints
  • flow steering reservations
  • wide area network stitching
  • port mirroring reservations

Tegu uses an underlying agent, also included in this repository, to directly manage the physical components (Open vSwitch or physical switches) as is needed to implement the reservations. The underlying agent scripts are contained in the agent directory and the tegu_agent binary is in the main directory.

Directory Overview

The Tegu source is divided into the following subdirectories/packages:

agent/bandwidth

This directory contains various direct interfaces (shell scripts) to things like OVS, Arista switches, Floodlight (skoogie), etc.

agent/mirror

This directory contains shell scripts used to create and remove mirrors to ports in an OpenStack environment.

doc

The manual pages for the executables rjprt, tegu, tegu_req and a manual page describing the Tegu API.

gizmos

Source files which implement objects, interfaces and the functions that operate directly on them (link, host, switch, pledge, etc.).

main

Entry point functions (tegu, tegu_agent, and rjprt).

managers

Functions that are driven as goroutines and thus implement major components of the application (reservation manager, fq manager, etc.).

support

Regressions tests.

system

Scripts used to start, stop, and manage Tegu in a Linux environment, as well as the tegu_ha Python script.

File Overview

Here is an overview of the purpose of some of the .go files in this repository.

gizmos directory

fence.go - Implements a user limit fence mechanism.
flight_if.go - A floodlight interface providing methods that allow queries to the controller for gathering link and host information.
host.go - Represents a single host in the network graph and in a path.
init.go - Package level initialization.
link.go - Represents a link between switches in the network graph and in a path.
lite.go - Functions that were implemented quickly to support tegu-lite. These probably should be moved to separate files, or likely into tools, but during the hasty implementation of -lite it was easier to keep them bunched here.
mbox.go - Middlebox representation for steering reservations.
obligation.go - Used to manage an obligation of something over time; references many time slices.
path.go - Manages a path that has been created with a given amount of bandwith.
pledge.go - An interface representing a reservation tracked by resmgr. Implemented by the various pledge types in the pledge_* files.
pledge_window.go - Manages a time window for pledges and provides basic is_active, is_expired functions.
queue.go - Manages information needed to set individual queues for a reservation.
spq.go - A very simple object which allows the return of queue information to a caller in a single bundle (presently, just the struct, no functions exist).
switch.go - Represents a switch in the network graph.
time_slice.go - A single range of time for which a given amount of bandwith has been allocated.
tools.go - Some generic tools but not generic enough to put in gopkgs.

managers directory

fq_mgr.go - Flowmod/queue manager.
fq_mgr_steer.go - Steering based FQ-mgr support.
fq_req.go - Fqmgr request structure and related functions.
globals.go - Constants and a few globals shared by *.go in this directory.
This module also contains the initialisation function that sets all globals up.
http_api.go - Provides the HTTP server, and code to serve URL's under /tegu/api.
http_mirror_api.go - The HTTP interface for mirroring.
network.go - Manages the network graph.
net_req.go - Network manager request struct and related functions.
res_mgr.go - Provides the reservation management logic, supplemented by three support modules: res_mgr_bw.go, res_mgr_mirror.go, and res_mgr_steer.go.
osif.go - OpenStack interface manager.
osif_proj.go - Project specific OpenStack interface functions.

Building Tegu

The Tegu source depends on a set of Go packages that were developed along with Tegu, but are general enough to warrant their not being included here. They are all a part of the github.com/att/gopkgs package library. To use them, clone the git project as described below. They will be referenced as needed during the build process (unlike C, there is no need to build a library to link against). You should be able to do go get github.com/att/gopkgs to pull them down.

Go Environment

The GOPATH variable must be set to the top level directory in your source tree. Within that directory there should be src, bin, and pkg directories. Under src there should be a github.com directory which will hold all of your Go related repositories that are checked out of github.

For example:

export GOPATH=$HOME/godev
cd $GOPATH
mkdir github.com
cd github.com

# fork a copy of the tegu and gopkgs first!!!

# replace XXXXX with your user id, then clone your forks 
git clone https://[email protected]/~XXXXXX/tegu.git
git clone https://[email protected]/~XXXXXX/gopkgs.git

cd tegu
git checkout master

Build Tegu by:

go build main/rjprt.go   		# builds the rjprt binary
go build main/tegu.go   		# builds the tegu binary
go build main/tegu_agent.go		# builds the tegu agent binary

What is a Tegu?

A type of lizard (https://en.wikipedia.org/wiki/Tegu).

tegu's People

Contributors

dhanunjaya avatar krjoshi avatar robert-eby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tegu's Issues

tegu startup logic can choose the wrong checkpoint file

The startup logic for tegu can pick the wrong checkpoint file to pass to Tegu if the last several checkpoint files were all created within the same second. For example, right now i have 28 checkpoint files, but on restart tegu started with resmgr_b26.ckpt. This is because they are sorted by mod time, and Linux only keeps modification times to a granularity of a second. Need a better way to arbitrate; either make sure each checkpoint is created within a unique 1 second period, or store metadata with each file to indicate millisecond granularity.

Refresh creds causing problems for bandwidth reservation.

The change to suss out new projects at the time a reservation request is made is causing an Openstack API call to be made which in some environments results in a 20 to 45 second block while Openstack processes. This call isn't necessary and should be removed.

tegu_ha does not properly handle hostnames which do not have a domain

The tegu_ha.py script does not handle the case where a host name does not have an associated domain name (foo is returned instead of foo.somedom.com). The script needs properly handle this case.

Relevant trace:

2015/09/08 14:28 tegu_ha v1.1 started
Traceback (most recent call last):
  File "/usr/bin/tegu_ha", line 408, in <module>
    main()
  File "/usr/bin/tegu_ha", line 374, in main
    + this_node[this_node.index("."):])
ValueError: substring not found

tegu_ha config file parsing bug

The tegu_ha.py script does not properly handle the case where the "fqmgr" section does not have the phost_suffix defined. This is a legitmate case, and the value used if the pair is missing from the control file should be the same as if phost_suffix = "" were in the config file.

Relevant trace:

root@mtmac1:/var/log/tegu# cat tegu_ha.log
2015/09/08 14:23 tegu_ha v1.1 started
Traceback (most recent call last):
  File "/usr/bin/tegu_ha", line 408, in <module>
    main()
  File "/usr/bin/tegu_ha", line 367, in main
    if not cdata["fqmgr"]["phost_suffix"]:
KeyError: 'phost_suffix'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.