Commit 9dba3670 authored by Paul Rich's avatar Paul Rich
Browse files

Merge branch 'develop' into 37-ssh-interactive-mode

Conflicts:
	src/lib/Components/system/CraySystem.py
parents 7e8e9790 db7bb983
......@@ -49,14 +49,8 @@ start_component () {
then
(
date=`/bin/date`
if [ "$component" == "alps_script_forker" ]
then
echo "--- $date: START ${component} ---" >>/var/log/cobalt/${component}_${HOSTNAME}.out
nohup "${DAEMONDIR}/${component}.py" $component_args --config-files "${CONFIGFILE}" >>/var/log/cobalt/${component}_${HOSTNAME}.out 2>&1 &
else
echo "--- $date: START ${component} ---" >>/var/log/cobalt/${component}.out
nohup "${DAEMONDIR}/${component}.py" $component_args --config-files "${CONFIGFILE}" >>/var/log/cobalt/${component}.out 2>&1 &
fi
)
echo "done"
return 0
......
......@@ -278,6 +278,8 @@ class Component (object):
self._component_lock = threading.Lock()
self._component_lock_acquired_time = None
self.statistics = Statistics()
self.logger.info("%s:%s component executing on %s", self.name,
self.implementation, socket.gethostname())
def __getstate__(self):
state = {}
......@@ -296,6 +298,8 @@ class Component (object):
self._component_lock = threading.Lock()
self._component_lock_acquired_time = None
self.statistics = Statistics()
self.logger.info("%s:%s component executing on %s", self.name,
self.implementation, socket.gethostname())
def component_lock_acquire(self):
entry_time = time.time()
......
......@@ -55,6 +55,5 @@ class ALPSProcessGroup(ProcessGroup):
'''
if self.mode == 'interactive':
if len(USER_SESSION_HOSTS):
pass
return super(ALPSProcessGroup, self).start()
......@@ -15,9 +15,16 @@ from Cobalt.Components.base import Component, exposed, automatic, query, locking
from Cobalt.Components.system.base_system import BaseSystem
from Cobalt.Components.system.CrayNode import CrayNode
from Cobalt.Components.system.base_pg_manager import ProcessGroupManager
from Cobalt.Components.system.ALPSProcessGroup import ALPSProcessGroup
from Cobalt.Exceptions import ComponentLookupError
from Cobalt.Exceptions import JobNotInteractive
<<<<<<< Updated upstream
from Cobalt.Components.system.ALPSProcessGroup import ALPSProcessGroup
from Cobalt.Exceptions import JobValidationError
from Cobalt.DataTypes.ProcessGroup import ProcessGroup
=======
from Cobalt.Exceptions import JobValidationError
>>>>>>> Stashed changes
from Cobalt.Util import compact_num_list, expand_num_list
from Cobalt.Util import init_cobalt_config, get_config_option
......@@ -25,6 +32,7 @@ _logger = logging.getLogger(__name__)
init_cobalt_config()
SYSTEM_SIZE = int(get_config_option('system', 'size'))
UPDATE_THREAD_TIMEOUT = int(get_config_option('alpssystem',
'update_thread_timeout', 10))
TEMP_RESERVATION_TIME = int(get_config_option('alpssystem',
......@@ -39,10 +47,13 @@ CLEANUP_DRAIN_WINDOW = get_config_option('system', 'cleanup_drain_window', 300)
#Epsilon for backfilling. This system does not do this on a per-node basis.
BACKFILL_EPSILON = int(get_config_option('system', 'backfill_epsilon', 120))
ELOGIN_HOSTS = [host for host in ":".split(get_config_option('alpssystem', 'elogin_hosts', ''))]
DRAIN_MODES = ['first-fit', 'backfill']
CLEANING_ID = -1
def chain_loc_list(loc_list):
'''Take a list of compact Cray locations,
expand and concatenate them.
......@@ -1228,15 +1239,36 @@ class CraySystem(BaseSystem):
'''
#Right now this does nothing. Still figuring out what a valid
#specification looks like.
# mode on this system defaults to script.
mode = spec.get('mode', None)
if ((mode is None) or (mode == False)):
spec['mode'] = 'script'
if spec['mode'] not in ['script', 'interactive']:
raise JobValidationError("Mode %s is not supported on Cray systems." % mode)
# FIXME: Pull this out of the system configuration from ALPS ultimately.
# For now, set this from config for the PE count per node
# nodes = int(spec['nodes'])
spec['nodecount'] = int(spec['nodecount'])
# proccount = spec.get('proccount', None)
# if proccount is None:
# nodes *
spec['proccount'] = spec['nodecount']
if spec['proccount'] > SYSTEM_SIZE:
raise JobValidationError('Job requested %s nodes. Maximum permitted size is %s' %
(spec['proccount'], SYSTEM_SIZE))
spec['proccount'] = spec['nodecount'] #set multiplier for default depth
mode = spec.get('mode', 'script')
spec['mode'] = mode
if mode == 'interactive':
# Handle which script host should handle their job if they're on a
# login.
if spec.get('qsub_host', None) in ELOGIN_HOSTS:
spec['ssh_host'] = self._get_ssh_host()
return spec
def _get_ssh_host(self):
return None
@exposed
def verify_locations(self, nodes):
'''verify that a list of nodes exist on this system. Return the list
......
......@@ -46,15 +46,15 @@ alter table "##COBALT_SCHEMA##"."RESERVATION_DATA"
add BLOCK_PASSTHROUGH INTEGER;
------------------------------------------------
-- DDL Statements for table "##COBALT_SCHEMA##"."RESERVATION_DATA"
-- DDL Statements for table "##COBALT_SCHEMA##"."RESERVATION_EVENTS"
------------------------------------------------
update table "##COBALT_SCHEMA##"."RESERVATION_EVENTS"
SET NAME = "terminating"
where NAME = "ending";
update "##COBALT_SCHEMA##"."RESERVATION_EVENTS"
SET NAME = 'terminating'
where NAME = 'ending';
insert into "##COBALT_SCHEMA##"."RESERVATION_EVENTS" values
(default, "deferred"),
(default, "deactivating"),
(default, "released"),
(default, "instance_end");
(default, 'deferred'),
(default, 'deactivating'),
(default, 'released'),
(default, 'instance_end');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment