GithubHelp home page GithubHelp logo

khosrow / lvsm Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 9.0 372 KB

LVS Manager - a shell to manage LVS (ipvs) and iptables on a Linux server

Home Page: http://code.khosrow.ca/lvsm

License: MIT License

Python 99.59% Shell 0.41%

lvsm's People

Contributors

khosrow avatar

Stargazers

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

Watchers

 avatar

lvsm's Issues

SVN use should be optional

Program assumes SVN even if files are not under version control. This leads to warnings when quitting.

Manage config files using git

Probably easiest to keep all the config files under /etc/lvsm or something. Then commit the whole repo to a local git.

Possible way to set it up:

node1

git init /etc/lvsm
git add <files>
git commit

node 2

git clone node1:/etc/lvsm -o node1

Updating

Locally: git commit <file>
Remotely: ssh node2; git pull node1 master

lvsdirector.py line 349: the logic is wrong

Code:
if hostport in f:

Example:
If we have host=192.168.1.10 port=80 giving hostport=192.168.1.10:80, the following hosts will also be enabled: 192.168.1.10:8080, 192.168.1.10:8000

The logic needs to be fixed.

Display firewall info for a VIP in show virtual

Modify the show virtual command to also display iptables rules related to the VIP - if it exists.

possilbe output:

lvsm(status)# show virtual tcp www.example.com http
TCP  www.example.com:http         rr
  -> fe01.example.com:http        Masq    1      0          0
  -> fe02.example.com:http        Masq    1      0          0

ACCEPT     tcp  --  anywhere            www.example.com tcp dpt:http

Add "real" level to shell

Feature existed in the 0.4 series. Available commands should be
show <real> <ip>

And maybe:
enable <real> <ip>
disable <real> <ip>

Replace weird error message in ipvsadm

In Ubuntu 12.04 the following command will return a Memory allocation problem error (where the address used is not configured in ipvsadm)

$ ipvsadm -L -t 192.168.1.202:80

Capture this error and show the user something meaningful.

if RIP is disabled manually, enable function fails

If a user has created a $MAINTENANCE/hostname:port by hand, and then lvsm is invoked to enalbe the RIP using

status enable real hostname port

It fails, since it will not translate the filename back to IP and make the match.

remove execute function in utils.py

This function can be removed and it's code put in the modules directly. If not, after catching exceptions the calling function will proceed normally and cause other exceptions.

Fix --version flag

using the --version flag will display the version number but will also launch the application. Instead the application should just return.

Colorize output

Make the output more readable by adding colour to all the VIPs in the ipvsadm output. Do the same for iptables.

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.