temporary rename bwlimit as bwlimitlxc for a dry run of the
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 25 Jun 2012 08:02:08 +0000 (10:02 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 25 Jun 2012 08:02:08 +0000 (10:02 +0200)
nodemanager@lxc_devel branch on a vserver node

NodeManager.spec
bwlimitlxc.py [moved from bwlimit.py with 98% similarity]
bwmon.py
net.py
setup.py
sliver_libvirt.py
sliver_lxc.py
slivermanager.py

index f7bcfdc..deccf5e 100644 (file)
@@ -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 <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.1-2
similarity index 98%
rename from bwlimit.py
rename to bwlimitlxc.py
index e310762..ae4a020 100644 (file)
@@ -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 <mlhuang@cs.princeton.edu>
 # 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
index affa092..ba59fe8 100644 (file)
--- 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 (file)
--- 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
index 98ec085..75f2bd3 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ setup(
         'api',
         'api_calls',
         'bwmon',
-        'bwlimit',
+        'bwlimitlxc',
         'cgroups',
         'conf_files',
         'config',
index 619448f..54b11f1 100644 (file)
@@ -9,7 +9,7 @@ import libvirt
 
 from account import Account
 import logger
-import bwlimit
+import bwlimitlxc as bwlimit
 import cgroups
 
 STATES = {
index 9c88538..441b2e6 100644 (file)
@@ -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
 
index 4caa1ad..ea446fc 100644 (file)
@@ -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