X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=db-config;h=dc984cb3a3193202048e857252a2ce71e7a3a038;hb=5dc092481f31d1ee07253b2dc592882d8af5cd64;hp=f4d2c3d504af13c6290afb61406f0a1dab001e80;hpb=874403524bccbcb02e82a5a1d12597682ddf3b19;p=myplc.git diff --git a/db-config b/db-config index f4d2c3d..dc984cb 100755 --- a/db-config +++ b/db-config @@ -7,7 +7,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id$ +# $Id: db-config,v 1.11 2006/12/12 10:13:31 thierry Exp $ # from plc_config import PLCConfiguration @@ -360,7 +360,7 @@ def main(): 'postinstall_cmd': '/sbin/iptables-restore --noflush < /etc/planetlab/blacklist', 'error_cmd': '', 'ignore_cmd_errors': True, - 'always_update': True}, + 'always_update': False}, # /etc/issue {'enabled': True, @@ -386,7 +386,7 @@ def main(): 'postinstall_cmd': '/sbin/sysctl -e -p /etc/sysctl.conf', 'error_cmd': '', 'ignore_cmd_errors': False, - 'always_update': True}, + 'always_update': False}, # Sendmail configuration {'enabled': True, @@ -587,7 +587,7 @@ def main(): plc_ticket_pubkey = '%KEY%' # Create/update system slices - default_slices = [ + legacy_slices = [ # XXX Required for old Node Manager {'name': "pl_conf", 'description': "PlanetLab Slice Creation Service (SCS)", @@ -609,7 +609,8 @@ def main(): 'attributes': [('cpu_share', "32"), ('plc_slice_type', "VServerSlice"), ('disk_max', "5000000")]}, - + ] + default_slices = [ # PlanetFlow {'name': plc['slice_prefix'] + "_netflow", 'description': "PlanetFlow Traffic Auditing Service", @@ -624,7 +625,19 @@ def main(): ('proper_op', "bind_socket")]}, ] - + ### xxx - to review once new node manager rolls out + # if PLC_SLICE_PREFIX is left to default - this is meant for the public PL only + if plc['slice_prefix'] == 'pl': + # create both legacy slices together with netflow through default_slices + default_slices += legacy_slices + else: + # we use another slice prefix : disable legacy slices if already created + for legacy_slice in legacy_slices: + try: + DeleteSlice(legacy_slice['name']) + except: + pass + for default_slice in default_slices: slices = GetSlices([default_slice['name']]) if slices: