From: Thierry Parmentelat Date: Mon, 25 Jun 2012 08:02:08 +0000 (+0200) Subject: temporary rename bwlimit as bwlimitlxc for a dry run of the X-Git-Tag: nodemanager-2.1-3~1 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=e35cdeb5ae4e37a7205150195735ab8c69e6d522 temporary rename bwlimit as bwlimitlxc for a dry run of the nodemanager@lxc_devel branch on a vserver node --- diff --git a/NodeManager.spec b/NodeManager.spec index f7bcfdc..deccf5e 100644 --- a/NodeManager.spec +++ b/NodeManager.spec @@ -76,7 +76,7 @@ install -d -m 755 $RPM_BUILD_ROOT/var/lib/nodemanager install -D -m 644 logrotate/nodemanager $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/nodemanager install -D -m 755 sshsh $RPM_BUILD_ROOT/bin/sshsh -install -D -m 644 bwlimit.py ${RPM_BUILD_ROOT}/${PYTHON_SITEARCH}/bwlimit.py +install -D -m 644 bwlimitlxc.py ${RPM_BUILD_ROOT}/${PYTHON_SITEARCH}/bwlimitlxc.py ########## %post @@ -135,7 +135,7 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/logrotate.d/nodemanager /var/lib/ /bin/sshsh -%{python_sitearch}/bwlimit.py* +%{python_sitearch}/bwlimitlxc.py* %changelog * Thu Jun 21 2012 Thierry Parmentelat - nodemanager-2.1-2 diff --git a/bwlimit.py b/bwlimitlxc.py similarity index 98% rename from bwlimit.py rename to bwlimitlxc.py index e310762..ae4a020 100644 --- a/bwlimit.py +++ b/bwlimitlxc.py @@ -1,4 +1,14 @@ #!/usr/bin/python +# +# TEMPORARY +# this file historically came with util-vserver-pl which is not available +# on lxc-powered nodes +# it is thus intended to become packaged separately at some point +# +# It was renamed into bwlimitlxc so that this branch can be tested on +# vserver nodes as well +# TEMPORARY + # # Bandwidth limit module for PlanetLab nodes. The intent is to use the # Hierarchical Token Bucket (HTB) queueing discipline (qdisc) to allow @@ -46,8 +56,6 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: bwlimit.py,v 1.15 2007/02/07 04:21:11 mlhuang Exp $ -# import sys, os, re, getopt import pwd diff --git a/bwmon.py b/bwmon.py index affa092..ba59fe8 100644 --- a/bwmon.py +++ b/bwmon.py @@ -23,9 +23,9 @@ import socket import copy import threading +import bwlimitlxc as bwlimit import logger import tools -import bwlimit import database from config import Config diff --git a/net.py b/net.py index 100720c..a2b28ca 100644 --- a/net.py +++ b/net.py @@ -7,7 +7,8 @@ import os, string, time, socket import sioc, plnet # local modules -import bwlimit, logger, iptables, tools +import bwlimitlxc as bwlimit +import logger, iptables, tools # we can't do anything without a network priority=1 diff --git a/setup.py b/setup.py index 98ec085..75f2bd3 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( 'api', 'api_calls', 'bwmon', - 'bwlimit', + 'bwlimitlxc', 'cgroups', 'conf_files', 'config', diff --git a/sliver_libvirt.py b/sliver_libvirt.py index 619448f..54b11f1 100644 --- a/sliver_libvirt.py +++ b/sliver_libvirt.py @@ -9,7 +9,7 @@ import libvirt from account import Account import logger -import bwlimit +import bwlimitlxc as bwlimit import cgroups STATES = { diff --git a/sliver_lxc.py b/sliver_lxc.py index 9c88538..441b2e6 100644 --- a/sliver_lxc.py +++ b/sliver_lxc.py @@ -11,7 +11,7 @@ from string import Template import libvirt import logger -import bwlimit +import bwlimitlxc as bwlimit from initscript import Initscript from sliver_libvirt import Sliver_Libvirt diff --git a/slivermanager.py b/slivermanager.py index 4caa1ad..ea446fc 100644 --- a/slivermanager.py +++ b/slivermanager.py @@ -18,7 +18,7 @@ import account import controller import sliver_lxc -try: from bwlimit import bwmin, bwmax +try: from bwlimitlxc import bwmin, bwmax except ImportError: bwmin, bwmax = 8, 1000*1000*1000 priority=10