S.Çağlar Onur [Wed, 12 May 2010 14:47:28 +0000 (14:47 +0000)]
Setting tag NodeManager-2.0-7
Fix typos in plugins/drl.py and doc/NMAPI.xml.in
Added some precautions to the slice id-saving code
Added log message to code that records the slice id
S.Çağlar Onur [Wed, 12 May 2010 14:42:10 +0000 (14:42 +0000)]
fix log message
Thierry Parmentelat [Fri, 7 May 2010 09:15:19 +0000 (09:15 +0000)]
typo
S.Çağlar Onur [Wed, 5 May 2010 21:37:51 +0000 (21:37 +0000)]
s/install/update/g
Sapan Bhatia [Wed, 28 Apr 2010 15:09:36 +0000 (15:09 +0000)]
Tweaks
Sapan Bhatia [Tue, 27 Apr 2010 18:22:22 +0000 (18:22 +0000)]
Added log message to code that records the slice id.
Sapan Bhatia [Tue, 27 Apr 2010 16:34:15 +0000 (16:34 +0000)]
Added some precautions to the slice id-saving code.
Sapan Bhatia [Mon, 26 Apr 2010 21:37:52 +0000 (21:37 +0000)]
Setting tag NodeManager-2.0-6
This version changes the location of the slice id for components such as PlanetFlow to look up. Previously this piece
of information was stored in the 'vserver name' field of the per-vserver context structure in the kernel but we needed
to move it elsewhere since Daniel decided to use that for something else (the vserver name... pedantic!).
Sapan Bhatia [Mon, 26 Apr 2010 21:28:47 +0000 (21:28 +0000)]
Do we really need an exec trace for this expected state - not sure, please change if appropriate.
Sapan Bhatia [Mon, 26 Apr 2010 20:15:07 +0000 (20:15 +0000)]
Thsi appears to be a typo.
Sapan Bhatia [Mon, 26 Apr 2010 20:10:06 +0000 (20:10 +0000)]
Correction to the previous commit. This is the version that was tested.
Sapan Bhatia [Mon, 26 Apr 2010 20:07:33 +0000 (20:07 +0000)]
Recommitting this patch, after testing it on a PLC node.
This patch stores the slice id in a file in /etc/vservers instead of poking it in the kernel as was done previously.
Barış Metin [Wed, 14 Apr 2010 13:22:20 +0000 (13:22 +0000)]
Setting tag NodeManager-2.0-5
fix log_call in plugins/drl.py
Barış Metin [Wed, 14 Apr 2010 09:38:35 +0000 (09:38 +0000)]
lag_call requires the command to be an array
Thierry Parmentelat [Fri, 2 Apr 2010 13:18:29 +0000 (13:18 +0000)]
Setting tag NodeManager-2.0-4
protect against nodes in migrated PLC's not having the hrn tag yet
Thierry Parmentelat [Mon, 22 Mar 2010 13:13:54 +0000 (13:13 +0000)]
hrn might be empty during transition period
Thierry Parmentelat [Fri, 12 Mar 2010 21:03:17 +0000 (21:03 +0000)]
Setting tag NodeManager-2.0-3
new omf-resctl and drl plugins
specialaccount optimized to overwrite authorized keys only upon changes
codemux plugin has support for a new 'ip' setting
mainloop to display ordered modules&plugins at all times
Thierry Parmentelat [Fri, 12 Mar 2010 10:19:48 +0000 (10:19 +0000)]
expose node hrn to the OMF resource controller
Thierry Parmentelat [Thu, 11 Mar 2010 17:43:05 +0000 (17:43 +0000)]
handle all installed versions
Thierry Parmentelat [Wed, 10 Mar 2010 15:51:51 +0000 (15:51 +0000)]
change the way 'vref' gets set on omf-control'ed slivers
Thierry Parmentelat [Wed, 10 Mar 2010 15:49:14 +0000 (15:49 +0000)]
nodenetworks are now known as interfaces
S.Çağlar Onur [Tue, 9 Mar 2010 21:29:58 +0000 (21:29 +0000)]
S.Çağlar Onur [Tue, 9 Mar 2010 21:19:11 +0000 (21:19 +0000)]
merge rev 17315
Thierry Parmentelat [Tue, 9 Mar 2010 11:48:45 +0000 (11:48 +0000)]
new omf-oriented plugins
new tool for changing files only when needed
S.Çağlar Onur [Thu, 4 Mar 2010 15:44:58 +0000 (15:44 +0000)]
cosmetic fix
S.Çağlar Onur [Mon, 1 Mar 2010 21:41:40 +0000 (21:41 +0000)]
DRL plugin
Marc Fiuczynski [Tue, 23 Feb 2010 01:30:43 +0000 (01:30 +0000)]
don't invoke /etc/init.d/codemux if it is not installed
Daniel Hokka Zakrisson [Fri, 19 Feb 2010 17:36:25 +0000 (17:36 +0000)]
Enable/disable the initscript as well.
Thierry Parmentelat [Thu, 11 Feb 2010 15:12:22 +0000 (15:12 +0000)]
Setting tag NodeManager-2.0-2
modules and plugins have a priority
specialaccounts appears soon in the priority chain
logger.log_call logs process output, and has a timeout
vuser{add,del} run through bash -x
nm initscript has support for 'service nm restartverbose'
logs reviewed for consistency
use hashlib module instead of sha when available
Thierry Parmentelat [Thu, 11 Feb 2010 12:12:37 +0000 (12:12 +0000)]
fix log_call deadlock
initscript cleaned up - now supports 'service nm restartverbose'
run vuseradd and vuserdel through bash -x (should be in verbose only but..)
Thierry Parmentelat [Wed, 10 Feb 2010 17:25:41 +0000 (17:25 +0000)]
Barış Metin [Wed, 10 Feb 2010 16:34:20 +0000 (16:34 +0000)]
use hashlib and fallback to sha (for python 2.4)
Thierry Parmentelat [Tue, 9 Feb 2010 17:37:04 +0000 (17:37 +0000)]
(*) the various modules have a priority; lower gets invoked first
(*) default is net, conf_files, specialaccounts, sm, bwmon, then the rest
(*) log_call can log child output on the fly even if hangs
(*) log_call has timeout and terminates hanging child if too long
Thierry Parmentelat [Fri, 5 Feb 2010 17:28:31 +0000 (17:28 +0000)]
expects the 'interfaces' key in GetSlivers - review logs to always mention module
Thierry Parmentelat [Sat, 30 Jan 2010 07:14:17 +0000 (07:14 +0000)]
cosmetic
Marc Fiuczynski [Sat, 30 Jan 2010 04:42:17 +0000 (04:42 +0000)]
more graceful log message when GetSlivers() API called failed
Marc Fiuczynski [Sat, 30 Jan 2010 04:41:15 +0000 (04:41 +0000)]
gracefully handle case where the sliver has not yet been instantiated
Thierry Parmentelat [Fri, 29 Jan 2010 14:21:18 +0000 (14:21 +0000)]
Setting tag NodeManager-2.0-1
first working version of 5.0:
pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
nodefamily is 3-fold with pldistro-fcdistro-arch
relies on GetSlivers to expose 'GetSliceFamily' for slivers
(in addition to the 'vref' tag that's still exposed too)
logging reviewed for more convenience
support for 'service nm restartdebug'
make sync knows how to publish uncommitted code on a test node
Thierry Parmentelat [Fri, 29 Jan 2010 14:14:38 +0000 (14:14 +0000)]
Branch 2.0 for module NodeManager created (as new trunk) from tag NodeManager-1.8-23
Thierry Parmentelat [Thu, 28 Jan 2010 17:24:03 +0000 (17:24 +0000)]
logs for when PLC is unreachable
Thierry Parmentelat [Thu, 28 Jan 2010 14:12:32 +0000 (14:12 +0000)]
fixed broken slice-creation
Thierry Parmentelat [Wed, 27 Jan 2010 18:44:46 +0000 (18:44 +0000)]
fixed and moved the server-side yum scripts, from nodeconfig/yum to BootstrapFS/nodeconfig/yum
now known as the nodeyum package
(might need some moer work for properly handling kexcludes in multi-fc plcs)
cleaned up all uses of /etc/planetlab/{node,slice}family
nodeconfig now does not need the build/ module anymore at build time
Thierry Parmentelat [Fri, 22 Jan 2010 11:29:00 +0000 (11:29 +0000)]
various tricks and notes for smoother debugging
Thierry Parmentelat [Fri, 22 Jan 2010 10:17:45 +0000 (10:17 +0000)]
log the setname operation
Thierry Parmentelat [Thu, 21 Jan 2010 15:14:53 +0000 (15:14 +0000)]
log_data_in_file is helpful of its own when debugging
Thierry Parmentelat [Thu, 21 Jan 2010 15:14:27 +0000 (15:14 +0000)]
undo broken change
Thierry Parmentelat [Wed, 20 Jan 2010 21:20:27 +0000 (21:20 +0000)]
run curl without the silent flag; provide more details when cannot connect
Thierry Parmentelat [Wed, 20 Jan 2010 18:57:08 +0000 (18:57 +0000)]
svn:keywords
Thierry Parmentelat [Wed, 20 Jan 2010 18:54:19 +0000 (18:54 +0000)]
revised layout
Thierry Parmentelat [Tue, 19 Jan 2010 22:38:26 +0000 (22:38 +0000)]
new global PLC_FLAVOUR category to globally chose sliver vref image
new method GetSliceFamily, value passed in GetSlivers
NodeManager does not have this logic anymore
Sapan Bhatia [Tue, 12 Jan 2010 21:02:48 +0000 (21:02 +0000)]
Store the slice id of the current vserver on disk, rather than sticking it in the kernel.
Thierry Parmentelat [Tue, 12 Jan 2010 14:48:48 +0000 (14:48 +0000)]
Setting tag NodeManager-1.8-23
emergency tag - make the setting of hmac by the sliverauth plugin more robust
Thierry Parmentelat [Tue, 12 Jan 2010 14:41:36 +0000 (14:41 +0000)]
emergency fix for sliverauth & delegated slices
Thierry Parmentelat [Mon, 11 Jan 2010 14:57:53 +0000 (14:57 +0000)]
Setting tag NodeManager-1.8-22
support for f10 and f12 in the vref slice tag
Thierry Parmentelat [Mon, 11 Jan 2010 14:51:24 +0000 (14:51 +0000)]
support for f10 and f12 in the vref slice tag
Thierry Parmentelat [Sat, 9 Jan 2010 07:42:19 +0000 (07:42 +0000)]
Setting tag NodeManager-1.8-21
build on fedora12
uses slicename 'sfacm' instead of 'genicw'
Tony Mack [Wed, 6 Jan 2010 02:16:16 +0000 (02:16 +0000)]
renmaed _genicw to _sfacm
Tony Mack [Wed, 16 Dec 2009 02:20:30 +0000 (02:20 +0000)]
pl_genicw is allowed to call all methods
Thierry Parmentelat [Tue, 15 Dec 2009 09:49:06 +0000 (09:49 +0000)]
fix specfile
Sapan Bhatia [Fri, 30 Oct 2009 18:18:11 +0000 (18:18 +0000)]
Setting tag NodeManager-1.8-20
This tag is identical to 1.8-19. The main addition is PLC-controllable vsys scripts. The reason I am
retagging is to eliminate any confusion associated with the -19 tag which was (temporarily) modified a few
days ago.
Marc Fiuczynski [Fri, 30 Oct 2009 18:06:00 +0000 (18:06 +0000)]
Make usage of sliver auth configurable from the _default slice attribute
Sapan Bhatia [Wed, 28 Oct 2009 01:47:07 +0000 (01:47 +0000)]
Setting tag NodeManager-1.8-19
This patch makes vsys scripts PLC-configurable. Previously, vsys scripts needed to be
self-contained. With this change, they will be able to refer to the attributes associated with a
slice.
Sapan Bhatia [Wed, 28 Oct 2009 01:43:26 +0000 (01:43 +0000)]
Bug
Sapan Bhatia [Wed, 28 Oct 2009 01:42:19 +0000 (01:42 +0000)]
Bug fix: bracket
Sapan Bhatia [Wed, 28 Oct 2009 01:27:39 +0000 (01:27 +0000)]
Added a log message for every time a slice is blessed.
Sapan Bhatia [Wed, 28 Oct 2009 01:22:14 +0000 (01:22 +0000)]
New plugin for making vsys scripts PLC-controllable.
Barış Metin [Thu, 22 Oct 2009 09:13:40 +0000 (09:13 +0000)]
fix for syntax error
Setting tag NodeManager-1.8-18
--This line, and those below, will be ignored--
Please write a changelog for this new tag in the section above
DIFF=========
Index: tools.py
===================================================================
--- tools.py (.../tags/NodeManager-1.8-17) (révision 15402)
+++ tools.py (.../trunk) (révision 15402)
@@ -18,18 +18,21 @@
return interface
def get_hwaddr_from_plnode():
- for line in open("/usr/boot/plnode.txt", 'r').readlines():
- if line.startswith("NET_DEVICE"):
- return line.split("=")[1].strip().strip('"')
+ try:
+ for line in open("/usr/boot/plnode.txt", 'r').readlines():
+ if line.startswith("NET_DEVICE"):
+ return line.split("=")[1].strip().strip('"')
+ except:
+ pass
return None
def get_if_from_hwaddr(hwaddr):
- import sioc
- devs = sioc.gifconf()
- for dev in devs:
- dev_hwaddr = sioc.gifhwaddr(dev)
- if dev_hwaddr == hwaddr: return dev
- return None
+ import sioc
+ devs = sioc.gifconf()
+ for dev in devs:
+ dev_hwaddr = sioc.gifhwaddr(dev)
+ if dev_hwaddr == hwaddr: return dev
+ return None
def as_daemon_thread(run):
"""Call function <run> with no arguments in its own thread."""
Index: bwmon.py
===================================================================
--- bwmon.py (.../tags/NodeManager-1.8-17) (révision 15402)
+++ bwmon.py (.../trunk) (révision 15402)
@@ -324,7 +324,7 @@
(self.name,
bwlimit.format_tc_rate(maxrate),
bwlimit.format_tc_rate(maxi2rate)), 1)
- bwlimit.set(xid = self.xid, dev = dev_default
+ bwlimit.set(xid = self.xid, dev = dev_default,
minrate = self.MinRate * 1000,
maxrate = self.MaxRate * 1000,
maxexemptrate = self.Maxi2Rate * 1000,
Anil-Kumar Vengalil [Thu, 22 Oct 2009 07:39:05 +0000 (07:39 +0000)]
bug-fix
Barış Metin [Wed, 21 Oct 2009 15:42:34 +0000 (15:42 +0000)]
wrap open() with try/except
Anil-Kumar Vengalil [Wed, 21 Oct 2009 10:40:20 +0000 (10:40 +0000)]
Setting tag NodeManager-1.8-17
-fixed problem with sioc import at the build side
-bwlimit.set() now accepts the device and does not asume that it is eth0
Barış Metin [Wed, 21 Oct 2009 10:19:34 +0000 (10:19 +0000)]
import sioc only when needed.
Anil-Kumar Vengalil [Wed, 21 Oct 2009 10:15:07 +0000 (10:15 +0000)]
testing: this is to avoid building failing while building myplc-doc
Barış Metin [Tue, 20 Oct 2009 12:58:19 +0000 (12:58 +0000)]
- don't hardcode the device name (depends on util-vserver-pl change rev. 15385)
Setting tag NodeManager-1.8-16
--This line, and those below, will be ignored--
Please write a changelog for this new tag in the section above
DIFF=========
Index: tools.py
===================================================================
--- tools.py (.../tags/NodeManager-1.8-15) (révision 15386)
+++ tools.py (.../trunk) (révision 15386)
@@ -8,12 +8,31 @@
import threading
import fcntl
import commands
+import sioc
import logger
PID_FILE = '/var/run/nm.pid'
+def get_default_if():
+ interface = get_if_from_hwaddr(get_hwaddr_from_plnode())
+ if not interface: interface = "eth0"
+ return interface
+
+def get_hwaddr_from_plnode():
+ for line in open("/usr/boot/plnode.txt", 'r').readlines():
+ if line.startswith("NET_DEVICE"):
+ return line.split("=")[1].strip().strip('"')
+ return None
+
+def get_if_from_hwaddr(hwaddr):
+ devs = sioc.gifconf()
+ for dev in devs:
+ dev_hwaddr = sioc.gifhwaddr(dev)
+ if dev_hwaddr == hwaddr: return dev
+ return None
+
def as_daemon_thread(run):
"""Call function <run> with no arguments in its own thread."""
thr = threading.Thread(target=run)
Index: bwmon.py
===================================================================
--- bwmon.py (.../tags/NodeManager-1.8-15) (révision 15386)
+++ bwmon.py (.../trunk) (révision 15386)
@@ -52,8 +52,9 @@
seconds_per_day = 24 * 60 * 60
bits_per_byte = 8
+dev_default = tools.get_default_if()
# Burst to line rate (or node cap). Set by NM. in KBit/s
-default_MaxRate = int(bwlimit.get_bwcap() / 1000)
+default_MaxRate = int(bwlimit.get_bwcap(dev_default) / 1000)
default_Maxi2Rate = int(bwlimit.bwmax / 1000)
# 5.4 Gbyte per day. 5.4 * 1024 k * 1024M * 1024G
# 5.4 Gbyte per day max allowed transfered per recording period
@@ -323,7 +324,7 @@
(self.name,
bwlimit.format_tc_rate(maxrate),
bwlimit.format_tc_rate(maxi2rate)), 1)
- bwlimit.set(xid = self.xid,
+ bwlimit.set(xid = self.xid, dev = dev_default
minrate = self.MinRate * 1000,
maxrate = self.MaxRate * 1000,
maxexemptrate = self.Maxi2Rate * 1000,
@@ -704,7 +705,7 @@
nmdbcopy = copy.deepcopy(database.db)
database.db_lock.release()
try:
- if getDefaults(nmdbcopy) and len(bwlimit.tc("class show dev eth0")) > 0:
+ if getDefaults(nmdbcopy) and len(bwlimit.tc("class show dev %s" % dev_default)) > 0:
# class show to check if net:InitNodeLimit:bwlimit.init has run.
sync(nmdbcopy)
else: logger.log("bwmon: BW limits DISABLED.")
Index: net.py
===================================================================
--- net.py (.../tags/NodeManager-1.8-15) (révision 15386)
+++ net.py (.../trunk) (révision 15386)
@@ -11,8 +11,10 @@
import sioc, plnet
# local modules
-import bwlimit, logger, iptables
+import bwlimit, logger, iptables, tools
+dev_default = tools.get_default_if()
+
def start(options, conf):
logger.log("net plugin starting up...")
@@ -22,7 +24,7 @@
if 'OVERRIDES' in dir(config):
if config.OVERRIDES.get('net_max_rate') == '-1':
logger.log("net: Slice and node BW Limits disabled.")
- if len(bwlimit.tc("class show dev eth0")):
+ if len(bwlimit.tc("class show dev %s" % dev_default)):
logger.verbose("*** DISABLING NODE BW LIMITS ***")
bwlimit.stop()
else:
Index: plugins/rawdisk.py
===================================================================
--- plugins/rawdisk.py (.../tags/NodeManager-1.8-15) (révision 15386)
+++ plugins/rawdisk.py (.../trunk) (révision 15386)
@@ -39,7 +39,6 @@
break
buf = buf.strip()
fields = re.split(pat, buf)
- print fields
dev = fields[-1]
if not dev.startswith("dm-") and dev.endswith("1") and dev not in in_vg:
devices.append("/dev/%s" % dev)
Daniel Hokka Zakrisson [Fri, 16 Oct 2009 15:12:03 +0000 (15:12 +0000)]
Remove debugging statement.
Anil-Kumar Vengalil [Wed, 14 Oct 2009 09:23:51 +0000 (09:23 +0000)]
correcting file path
Barış Metin [Wed, 14 Oct 2009 09:03:16 +0000 (09:03 +0000)]
use dev_default for bwlimit.set()
Barış Metin [Wed, 14 Oct 2009 08:47:48 +0000 (08:47 +0000)]
don't hardcode the device name.
Marc Fiuczynski [Fri, 9 Oct 2009 15:43:24 +0000 (15:43 +0000)]
The seed for random previously was the meaning of life (i.e., 42) but
that resulted in a not so random choice for the hmac. This
implementation now uses a random.seed that is based on the current
time.
Setting tag NodeManager-1.8-15
Thierry Parmentelat [Fri, 9 Oct 2009 15:19:13 +0000 (15:19 +0000)]
typo
Marc Fiuczynski [Wed, 7 Oct 2009 21:47:54 +0000 (21:47 +0000)]
minor improvements with the hope that slivers across machines get different hmacs
Marc Fiuczynski [Tue, 6 Oct 2009 20:43:59 +0000 (20:43 +0000)]
Setting tag NodeManager-1.8-14
Minor fix such that sliverauth.py makes a more specific call to
GetSliceTags that include that specific tagname it is looking for.
Daniel Hokka Zakrisson [Sat, 26 Sep 2009 12:30:50 +0000 (12:30 +0000)]
Only get the hmac tag.
Stephen Soltesz [Sun, 20 Sep 2009 01:52:21 +0000 (01:52 +0000)]
Setting tag NodeManager-1.8-13
Fix bug that prevented 'OVERRIDES' for working correctly.
Stephen Soltesz [Sat, 19 Sep 2009 19:55:30 +0000 (19:55 +0000)]
fixing the logic for r14697 and adding a clarifying note.
Marc Fiuczynski [Sat, 19 Sep 2009 01:57:31 +0000 (01:57 +0000)]
Faiyaz Ahmed [Tue, 8 Sep 2009 20:14:03 +0000 (20:14 +0000)]
Setting tag NodeManager-1.8-12
Increase disk limits to 10G per sliver
Sanity check slice for home directory before starting (hack)
Check codemux arguments
Faiyaz Ahmed [Mon, 7 Sep 2009 19:10:31 +0000 (19:10 +0000)]
Increase disk limit.
Marc Fiuczynski [Thu, 13 Aug 2009 16:17:15 +0000 (16:17 +0000)]
Be a bit more robust to poorly defined codemux attribute values
Marc Fiuczynski [Thu, 13 Aug 2009 16:16:31 +0000 (16:16 +0000)]
clean up of the 'configure' method. Now provides more failure information
Faiyaz Ahmed [Thu, 6 Aug 2009 20:23:31 +0000 (20:23 +0000)]
Setting tag NodeManager-1.8-11
* Fix Delegation
* Move plcapi in plugin-api GetSlivers() calls.
* Persistent Authcheck and resync session when auth failure
Faiyaz Ahmed [Thu, 6 Aug 2009 20:21:20 +0000 (20:21 +0000)]
loop on authcheck code in case session is wrong AND api is unavailable.
Faiyaz Ahmed [Thu, 6 Aug 2009 16:35:33 +0000 (16:35 +0000)]
Change plugin API (GetSlivers()) argument order to avoid unnecessary PLCAPI dependency. Fixes Delegation.
Faiyaz Ahmed [Tue, 4 Aug 2009 17:09:41 +0000 (17:09 +0000)]
formatting
Faiyaz Ahmed [Tue, 4 Aug 2009 16:29:19 +0000 (16:29 +0000)]
Setting tag NodeManager-1.8-10
Disabling sliverauth module. Not ready for deployment.
Faiyaz Ahmed [Tue, 4 Aug 2009 16:27:18 +0000 (16:27 +0000)]
bump util-vserver-python requires. old util-vserver-python's paths are wrong.
Faiyaz Ahmed [Tue, 4 Aug 2009 16:18:44 +0000 (16:18 +0000)]
Disabling sliverauth
Faiyaz Ahmed [Mon, 3 Aug 2009 21:35:17 +0000 (21:35 +0000)]
Setting tag NodeManager-1.8-9
Fixing overrides semantics.
Faiyaz Ahmed [Mon, 3 Aug 2009 21:31:26 +0000 (21:31 +0000)]
Fix overrides to clean out when none present.
Faiyaz Ahmed [Mon, 3 Aug 2009 20:57:44 +0000 (20:57 +0000)]
Setting tag NodeManager-1.8-8
Generalized plugins
Fixed initscript start up bug.
Faiyaz Ahmed [Mon, 3 Aug 2009 20:55:38 +0000 (20:55 +0000)]
Rearranging and moving trunk to 1.8.