gug-cvs Mailing List for Grid Underground (Page 6)
Status: Planning
Brought to you by:
szferi
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(67) |
Oct
(232) |
Nov
(76) |
Dec
(36) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(100) |
Feb
(89) |
Mar
(44) |
Apr
(71) |
May
(34) |
Jun
(81) |
Jul
(43) |
Aug
(42) |
Sep
(1) |
Oct
(87) |
Nov
(11) |
Dec
(9) |
2007 |
Jan
(203) |
Feb
(149) |
Mar
(94) |
Apr
(70) |
May
(35) |
Jun
(27) |
Jul
(4) |
Aug
|
Sep
(18) |
Oct
|
Nov
|
Dec
|
From: Roczei G. <ro...@us...> - 2007-04-04 12:33:13
|
Update of /cvsroot/gug/gug/gug/cli In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv12989/gug/cli Modified Files: cm.py Log Message: Better info... Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/cli/cm.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** cm.py 2 Apr 2007 10:58:16 -0000 1.17 --- cm.py 4 Apr 2007 12:33:11 -0000 1.18 *************** *** 189,192 **** --- 189,197 ---- print "running_jobs=%s" % item[1]['run'] print "completed_jobs=%s" % item[1]['completed'] + print "new_jobs=%s" % item[1]['new'] + print "terminated_jobs=%s" % item[1]['terminated'] + print "cancelled_jobs=%s" % item[1]['cancelled'] + print "suspended_jobs=%s" % item[1]['suspended'] + print "killed_jobs=%s" % item[1]['killed'] print "cpu_number=%s" % item[1]['cpunum'] print "job_number=%s" % item[1]['jobnum'] *************** *** 196,203 **** --- 201,216 ---- item = sum print "total_cpus=%s" % item[1]['cpu'] + print "free_cpus=%s" % item[1]['free_cpu'] print "total_running_jobs=%s" % item[1]['run'] print "total_completed_jobs=%s" % item[1]['completed'] + print "total_new_jobs=%s" % item[1]['new'] + print "total_terminated_jobs=%s" % item[1]['terminated'] + print "total_cancelled_jobs=%s" % item[1]['cancelled'] + print "total_suspended_jobs=%s" % item[1]['suspended'] + print "total_killed_jobs=%s" % item[1]['killed'] print "total_jobs=%s" % item[1]['job'] print "total_exec_services=%s" % item[1]['exec_number'] + print "architecture=%s" % item[1]['arch'] + print "operating_system=%s" % item[1]['os'] elif args[0] == '--xml': xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" *************** *** 212,215 **** --- 225,236 ---- xml += " \t<RunningJobs>%s" % item[1]['run'] xml += "</RunningJobs>\n" + xml += " \t<NewJobs>%s" % item[1]['new'] + xml += "</NewJobs>\n" + xml += " \t<TerminatedJobs>%s" % item[1]['terminated'] + xml += "</TerminatedJobs>\n" + xml += " \t<CancelledJobs>%s" % item[1]['cancelled'] + xml += "</CancelledJobs>\n" + xml += " \t<SuspendedJobs>%s" % item[1]['suspended'] + xml += "</SuspendedJobs>\n" xml += " \t<CompletedJobs>%s" % item[1]['completed'] xml += "</CompletedJobs>\n" *************** *** 225,236 **** --- 246,271 ---- xml += " \t<TotalCPUNumber>%s" % item[1]['cpu'] xml += "</TotalCPUNumber>\n" + xml += " \t<FreeCPUNumber>%s" % item[1]['free_cpu'] + xml += "</FreeCPUNumber>\n" xml += " \t<TotalJobs>%s" % item[1]['job'] xml += "</TotalJobs>\n" xml += " \t<TotalRunningJobs>%s" % item[1]['run'] xml += "</TotalRunningJobs>\n" + xml += " \t<TotalNewJobs>%s" % item[1]['new'] + xml += "</TotalNewJobs>\n" + xml += " \t<TotalTerminatedJobs>%s" % item[1]['terminated'] + xml += "</TotalTerminatedJobs>\n" + xml += " \t<TotalCancelledJobs>%s" % item[1]['cancelled'] + xml += "</TotalCancelledJobs>\n" + xml += " \t<TotalSuspendedJobs>%s" % item[1]['suspended'] + xml += "</TotalSuspendedJobs>\n" xml += " \t<TotalCompletedJobs>%s" % item[1]['completed'] xml += "</TotalCompletedJobs>\n" xml += " \t<ExecNodeCount>%s" % item[1]['exec_number'] xml += "</ExecNodeCount>\n" + xml += " \t<Architecture>%s" % item[1]['arch'] + xml += "</Architecture>\n" + xml += " \t<OperatingSystem>%s" % item[1]['os'] + xml += "</OperatingSystem>\n" xml += " </CMStatus>" xml += "\n</Response>" |
From: Roczei G. <ro...@us...> - 2007-04-04 12:33:13
|
Update of /cvsroot/gug/gug/gug/service/cm In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv12989/gug/service/cm Modified Files: cm.py Log Message: Better info... Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/cm/cm.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** cm.py 2 Apr 2007 12:15:31 -0000 1.32 --- cm.py 4 Apr 2007 12:33:11 -0000 1.33 *************** *** 655,658 **** --- 655,659 ---- out[item]['cancelled'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_CANCELLED, 'exec_id' : item}))) out[item]['suspended'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_SUSPENDED, 'exec_id' : item}))) + out[item]['killed'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_KILLED, 'exec_id' : item}))) out['sum'] = {} out['sum']['run'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_RUNNING}))) *************** *** 662,665 **** --- 663,667 ---- out['sum']['cancelled'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_CANCELLED}))) out['sum']['suspended'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_SUSPENDED}))) + out['sum']['killed'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_KILLED}))) out['sum']['job'] = str(len(self.cmids.select({}))) out['sum']['cpu'] = self.cpunum |
From: Nagy Z. <zs...@us...> - 2007-04-03 16:51:51
|
Update of /cvsroot/gug/gug/gug/service/sched In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7428/gug/service/sched Modified Files: sched.conf.default Log Message: I want to monitor the world! Index: sched.conf.default =================================================================== RCS file: /cvsroot/gug/gug/gug/service/sched/sched.conf.default,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sched.conf.default 7 Feb 2007 15:01:19 -0000 1.5 --- sched.conf.default 3 Apr 2007 16:51:50 -0000 1.6 *************** *** 10,12 **** --- 10,13 ---- <SchedulerPeriod>10</SchedulerPeriod> <AllowAnonymous>True</AllowAnonymous> + <MonitorUserDN>/C=HU/O=NIIF CA/OU=GRID/OU=NIIF/CN=Nagy Zsombor/emailAddress=zs...@ni...</MonitorUserDN> </ServiceConfig> |
From: Nagy Z. <zs...@us...> - 2007-04-03 16:51:16
|
Update of /cvsroot/gug/gug/gug/service/sched In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7045/gug/service/sched Modified Files: sched.py Log Message: MonitorUserDN - can get status about everything, but cannot remove jobs Index: sched.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/sched/sched.py,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** sched.py 3 Apr 2007 12:46:02 -0000 1.39 --- sched.py 3 Apr 2007 16:51:13 -0000 1.40 *************** *** 63,69 **** --- 63,77 ---- if not self.sudns: log.error('No SuperUserDN found.') + + path = '/ServiceConfig/MonitorUserDN' + self.monitordns = self.config.get_content(path,[]) + if self.monitordns: + log.msg('MonitorUserDN found:', self.monitordns) + self._set_service_name() create_provision_task(initdata, self._get_description, message_for_logging = 'Sched') + + def _set_service_name(self): self.longname = "Super Scheduler Service" *************** *** 131,137 **** try: if auth['x509']: ! subject = auth['x509'].get_subject() ! owner = '/CN=%s/emailAddress=%s' \ ! % (subject.CN, subject.emailAddress) elif auth['http']: type, data = auth['http'].split(' ',1) --- 139,143 ---- try: if auth['x509']: ! owner = str(auth['x509'].subject()) elif auth['http']: type, data = auth['http'].split(' ',1) *************** *** 232,236 **** selects = self.schedids.select_by_id_list(grid_ids) ! if owner not in self.sudns: # Filter user's jobs selects = [id for id in selects if self._own(owner,id)] --- 238,242 ---- selects = self.schedids.select_by_id_list(grid_ids) ! if owner not in self.sudns and owner not in self.monitordns: # Filter user's jobs selects = [id for id in selects if self._own(owner,id)] *************** *** 260,264 **** try: id = self.schedids.get(request[0]) ! if owner in self.sudns: if not self._own(owner,id): state_change_response.append((request[0],'Not allowed')) --- 266,270 ---- try: id = self.schedids.get(request[0]) ! if owner not in self.sudns: if not self._own(owner,id): state_change_response.append((request[0],'Not allowed')) |
From: Nagy Z. <zs...@us...> - 2007-04-03 16:49:36
|
Update of /cvsroot/gug/gug/gug/cli In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6584/gug/cli Modified Files: clgr.py Log Message: printing only the CN when 'status -o' Index: clgr.py =================================================================== RCS file: /cvsroot/gug/gug/gug/cli/clgr.py,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** clgr.py 2 Apr 2007 03:21:25 -0000 1.46 --- clgr.py 3 Apr 2007 16:49:36 -0000 1.47 *************** *** 9,12 **** --- 9,13 ---- import sys import socket + import re from gug.client.soap import find_working_service, set_tls, get_working_client, get_client, test_connection *************** *** 268,272 **** if show_owner: print self._make_status_owner_row('...'+grid_id.split('/')[1][:6]+'...', \ ! actmetadata.get('owner','Unknown'), state, jobname, jc_name) else: print self._make_status_row('...'+grid_id.split('/')[1][:6]+'...', state, jobname, jc_name) --- 269,274 ---- if show_owner: print self._make_status_owner_row('...'+grid_id.split('/')[1][:6]+'...', \ ! re.findall('CN=([^/]*)',actmetadata.get('owner','Unknown'))[0], \ ! state, jobname, jc_name) else: print self._make_status_row('...'+grid_id.split('/')[1][:6]+'...', state, jobname, jc_name) |
From: Nagy Z. <zs...@us...> - 2007-04-03 16:48:37
|
Update of /cvsroot/gug/gug/etc In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5821/etc Modified Files: site.conf.default Log Message: SuperScheduler listens to a secure port by default, only IPv4, because IPv6 SSL is not working for unknown reasons Index: site.conf.default =================================================================== RCS file: /cvsroot/gug/gug/etc/site.conf.default,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** site.conf.default 2 Mar 2007 11:42:25 -0000 1.46 --- site.conf.default 3 Apr 2007 16:48:37 -0000 1.47 *************** *** 16,19 **** --- 16,20 ---- <Network> <Insecure>21111</Insecure> + <Secure>21112</Secure> <Insecure>21113</Insecure> <!-- This port is for the file transfers of StC --> <Certificate> *************** *** 114,118 **** <Type>SuperScheduler</Type> <Class>gug.service.sched.sched.SuperScheduler</Class> ! <Listen>*:21111/Sched</Listen> <Startup>True</Startup> <InitData><ConfigFile>gug/service/sched/sched.conf.default</ConfigFile></InitData> --- 115,119 ---- <Type>SuperScheduler</Type> <Class>gug.service.sched.sched.SuperScheduler</Class> ! <Listen>0.0.0.0:21112/Sched</Listen> <Startup>True</Startup> <InitData><ConfigFile>gug/service/sched/sched.conf.default</ConfigFile></InitData> |
From: Nagy Z. <zs...@us...> - 2007-04-03 16:46:57
|
Update of /cvsroot/gug/gug/bin In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5422/bin Modified Files: grid.py Log Message: ability to set key and cert file from command line Index: grid.py =================================================================== RCS file: /cvsroot/gug/gug/bin/grid.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** grid.py 12 Feb 2007 10:51:27 -0000 1.21 --- grid.py 3 Apr 2007 16:46:55 -0000 1.22 *************** *** 10,13 **** --- 10,14 ---- from gug.common import log from gug.common.exception import * + from gug.client.soap import set_tls def usage(): *************** *** 19,23 **** print " -v --verbose : verbose" print " -c, --config=<config file> : set config file" ! print " -k, --keycert=<key and cert file> : set key and cert file" print " -l, --listmodules : list available modules" --- 20,25 ---- print " -v --verbose : verbose" print " -c, --config=<config file> : set config file" ! print " -k, --keyfile=<keyfile> : set keyfile" ! print " -r, --certfile=<certfile> : set certfile" print " -l, --listmodules : list available modules" *************** *** 33,38 **** # Parse arguments try: ! opts, args = getopt.getopt (sys.argv[1:], 'hvlc:k:', \ ! ['help', 'verbose', 'listmodules', 'config=', 'keycert=']) except getopt.GetoptError: # print help information and exit: --- 35,40 ---- # Parse arguments try: ! opts, args = getopt.getopt (sys.argv[1:], 'hvlc:k:r:', \ ! ['help', 'verbose', 'listmodules', 'config=', 'keyfile=','certfile=']) except getopt.GetoptError: # print help information and exit: *************** *** 44,48 **** config_file = None verbose = False ! keycert_file = None listmodules = False for o, a in opts: --- 46,51 ---- config_file = None verbose = False ! key_file = None ! cert_file = None listmodules = False for o, a in opts: *************** *** 54,62 **** if o in ('-c', '--config'): config_file = a ! if o in ('-k', '--keycert'): ! keycert_file = a if o in ('-l', '--listmodules'): listmodules = True if not config_file: config_file = find_config_file('client.conf') --- 57,69 ---- if o in ('-c', '--config'): config_file = a ! if o in ('-k', '--keyfile'): ! key_file = a ! if o in ('-r', '--certfile'): ! cert_file = a if o in ('-l', '--listmodules'): listmodules = True + set_tls(key_file, cert_file) + if not config_file: config_file = find_config_file('client.conf') |
From: Nagy Z. <zs...@us...> - 2007-04-03 14:38:49
|
Update of /cvsroot/gug/gug/gug/host In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv19340/gug/host Modified Files: http.py Log Message: use V6ONLY when binding to an IPv6 address Index: http.py =================================================================== RCS file: /cvsroot/gug/gug/gug/host/http.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** http.py 3 Apr 2007 12:42:21 -0000 1.17 --- http.py 3 Apr 2007 14:38:42 -0000 1.18 *************** *** 227,230 **** --- 227,234 ---- return 'HTTPListenerIPv6 (%s)' % id(self) + def server_bind(self): + self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 1) + HTTPListener.server_bind(self) + class SecureHTTPListener(HTTPListener): """ SecureHTTPListener is a HTTPListener with only one difference, *************** *** 282,291 **** try: # create a listener socket on *:port - listener = HTTPListener(('',port), RequestHandler) listener6 = HTTPListenerIPv6(('',port), RequestHandler) - log.msg('%s is bound to 0.0.0.0:%d' % (listener, port)) log.msg('%s is bound to [::]:%d' % (listener6, port)) # remember the listener - self.listeners[('0.0.0.0',port)] = listener self.listeners[('::',port)] = listener6 except KeyboardInterrupt: --- 286,292 ---- *************** *** 293,297 **** raise except: ! log.error('Error binding to *:%d' % port) log.error() for port in secure_ports: --- 294,310 ---- raise except: ! log.error('Error binding to [::]:%d' % port) ! log.error() ! try: ! # create a listener socket on *:port ! listener = HTTPListener(('',port), RequestHandler) ! log.msg('%s is bound to 0.0.0.0:%d' % (listener, port)) ! # remember the listener ! self.listeners[('0.0.0.0',port)] = listener ! except KeyboardInterrupt: ! self.running_lock.release() ! raise ! except: ! log.error('Error binding to 0.0.0.0:%d' % port) log.error() for port in secure_ports: *************** *** 424,427 **** --- 437,441 ---- try: # do a select on all the listeners + print self.listeners listeners = self.listeners.values() print listeners |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:52:16
|
Update of /cvsroot/gug/gug/gug/service/gis In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv9395/gug/service/gis Modified Files: gis.py Log Message: IPv6 Index: gis.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/gis/gis.py,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** gis.py 10 Mar 2007 11:29:45 -0000 1.48 --- gis.py 3 Apr 2007 12:52:15 -0000 1.49 *************** *** 75,79 **** log.msg('No address checking time given - use default: 60 sec') address_checking_time = 60 ! Task(self.id, self._check_address).start(address_checking_time, now = True, now_interval = 3) create_provision_task(initdata, self._get_description, message_for_logging = 'GIS') --- 75,79 ---- log.msg('No address checking time given - use default: 60 sec') address_checking_time = 60 ! Task(self.id, self._check_address).start(address_checking_time, now = True, now_interval = 5) create_provision_task(initdata, self._get_description, message_for_logging = 'GIS') *************** *** 152,158 **** urls = [] for url in desc['urls']: ! if '://*:' in url: for ip in self.myaddresses: ! urls.append(url.replace('*',ip,1)) else: urls.append(url) --- 152,163 ---- urls = [] for url in desc['urls']: ! if '://0.0.0.0:' in url: for ip in self.myaddresses: ! if ':' not in ip: # only use the IPv4 addresses ! urls.append(url.replace('0.0.0.0',ip,1)) ! elif '://[::]:' in url: ! for ip in self.myaddresses: ! if ':' in ip: # only use the IPv6 addresses ! urls.append(url.replace('::',ip,1)) else: urls.append(url) |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:51:23
|
Update of /cvsroot/gug/gug/sbin In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8631/sbin Modified Files: gugctl.py Log Message: IPv6 Index: gugctl.py =================================================================== RCS file: /cvsroot/gug/gug/sbin/gugctl.py,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** gugctl.py 19 Feb 2007 16:11:36 -0000 1.71 --- gugctl.py 3 Apr 2007 12:51:22 -0000 1.72 *************** *** 13,17 **** from gug.common.config import find_config_file, as_boolean ! from gug.common.share import import_class_from_string, get_ip_address, multi_dict from gug.common import log from gug.common import sysinfo --- 13,17 ---- from gug.common.config import find_config_file, as_boolean ! from gug.common.share import import_class_from_string, get_ip_addresses, multi_dict from gug.common import log from gug.common import sysinfo *************** *** 208,221 **** c = multi_dict(cert) for addr in c['Address']: ! address = get_ip_address(addr) ! if address is None: log.error('Wrong address in certificate definition:', addr) continue ! certs[address] = {'keyfile' : c['KeyFile'][0], 'certfile' : c['CertFile'][0], 'cacert' : c.get('CACertFile',[None])[0]} network_config = {'secure_ports' : secure_ports, 'insecure_ports' : insecure_ports, \ 'certificates' : certs } from gug.host.ctl import Controller from gug.host.http import HTTPServer, Location --- 208,226 ---- c = multi_dict(cert) for addr in c['Address']: ! ip4, ip6 = get_ip_addresses(addr) ! if ip4 is None and ip6 is None: log.error('Wrong address in certificate definition:', addr) continue ! d = {'keyfile' : c['KeyFile'][0], 'certfile' : c['CertFile'][0], 'cacert' : c.get('CACertFile',[None])[0]} + if ip4: + certs[ip4] = d + if ip6: + certs[ip6] = d network_config = {'secure_ports' : secure_ports, 'insecure_ports' : insecure_ports, \ 'certificates' : certs } + from gug.host.ctl import Controller from gug.host.http import HTTPServer, Location |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:50:23
|
Update of /cvsroot/gug/gug/gug/service/stc In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8152/gug/service/stc Modified Files: stc.py Log Message: IPv6 Index: stc.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/stc/stc.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** stc.py 19 Feb 2007 12:08:05 -0000 1.41 --- stc.py 3 Apr 2007 12:50:21 -0000 1.42 *************** *** 3,7 **** from gug.common.config import Config ! from gug.common.share import mkuid, create_provision_task from gug.common import log from gug.common.sysinfo import total_and_free_space, free_space --- 3,7 ---- from gug.common.config import Config ! from gug.common.share import mkuid, create_provision_task, get_ip_addresses from gug.common import log from gug.common.sysinfo import total_and_free_space, free_space *************** *** 27,31 **** self.timeout = int(initdata['RequestTimeout']) self.port = int(initdata['TransferPort']) ! self.addresses = initdata['TransferAddress'].split() self.server = initdata['server'] Task(self.id, self._init_task).start(0, once = True) --- 27,37 ---- self.timeout = int(initdata['RequestTimeout']) self.port = int(initdata['TransferPort']) ! addresses = initdata['TransferAddress'].split() ! self.addresses = [] ! for a in addresses: ! try: ! self.addresses.append(get_ip_addresses(a)) ! except: ! log.error() self.server = initdata['server'] Task(self.id, self._init_task).start(0, once = True) *************** *** 68,73 **** def _locations(self, token, id): ! return [Location(interface = (addr, self.port), path = '/%s.%d' % (token, id)) \ ! for addr in self.addresses] def _del_entity(self, token, id): --- 74,79 ---- def _locations(self, token, id): ! return [Location(ip4 = ip4, ip6 = ip6, port = self.port, path = '/%s.%d' % (token, id)) \ ! for (ip4, ip6) in self.addresses] def _del_entity(self, token, id): *************** *** 292,295 **** --- 298,308 ---- return locations + def _turls(self, locations): + turls = [] + for location in locations: + turls.extend(location.urls('http')) + print turls + return turls + def prepareToGet(self, auth, surls): """Prepare to get files identified by SURLs. *************** *** 313,317 **** locations = self._create_handler('get',filename, token, id) # create a TURL ! turls = ['http://%s' % location for location in locations] statuscode = 'request_prepared' else: --- 326,330 ---- locations = self._create_handler('get',filename, token, id) # create a TURL ! turls = self._turls(locations) statuscode = 'request_prepared' else: *************** *** 364,368 **** surl = self.id + '/' + filename # generate TURL: ! turls = ['http://%s' % location for location in locations] data = {'status': 'request_prepared', 'surl': surl, 'turls': turls, \ 'size': size, 'path': path, 'type' : 'put'} --- 377,381 ---- surl = self.id + '/' + filename # generate TURL: ! turls = self._turls(locations) data = {'status': 'request_prepared', 'surl': surl, 'turls': turls, \ 'size': size, 'path': path, 'type' : 'put'} |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:48:48
|
Update of /cvsroot/gug/gug/gug/service/sched/resource_iface In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7543/gug/service/sched/resource_iface Modified Files: job_controller.py Log Message: be able to parse IPv6 urls Index: job_controller.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/sched/resource_iface/job_controller.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** job_controller.py 22 Feb 2007 17:26:43 -0000 1.19 --- job_controller.py 3 Apr 2007 12:48:46 -0000 1.20 *************** *** 11,14 **** --- 11,15 ---- import time import socket + from gug.common.share import get_ip_and_port import urlparse *************** *** 26,31 **** url = meta_res[0]['urls'][0] parsed = urlparse.urlparse(url) ! ip, port = parsed[1].split(':') path = parsed[2] try: host = socket.gethostbyaddr(ip)[0] --- 27,36 ---- url = meta_res[0]['urls'][0] parsed = urlparse.urlparse(url) ! ip4, ip6, port = get_ip_and_port(parsed[1]) path = parsed[2] + if ip4: + ip = ip4 + else: + ip = ip6 try: host = socket.gethostbyaddr(ip)[0] |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:46:04
|
Update of /cvsroot/gug/gug/gug/service/sched In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6111/gug/service/sched Modified Files: sched.py Log Message: small changes, first signs of HTTP BaseAuth Index: sched.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/sched/sched.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** sched.py 15 Mar 2007 09:42:18 -0000 1.38 --- sched.py 3 Apr 2007 12:46:02 -0000 1.39 *************** *** 22,25 **** --- 22,26 ---- import shutil import socket + import base64 JC_ID_UNKNOWN = 'Unknown' *************** *** 113,134 **** self.sched_run = False ! def _check_x509(self, x509): if not self.allow_anonymous: ! if x509 == None: ! raise UserNotAllowedException, 'no x509' ! subject = x509.get_subject() ! if subject == None: ! raise UserNotAllowedException, 'no subject' ! if subject.CN == None: ! raise UserNotAllowedException, 'no CN' ! if subject.CN == '': ! raise UserNotAllowedException, 'empty CN' ! if subject.CN == 'Roadwarrior': ! raise UserNotAllowedException, 'Roadwarrior not allowed' try: ! subject = x509.get_subject() ! owner = '/CN=%s/emailAddress=%s' \ ! % (subject.CN, subject.emailAddress) except: owner = ANONYMOUS return owner --- 114,150 ---- self.sched_run = False ! def _check_auth(self, auth): if not self.allow_anonymous: ! #if auth == None: ! # raise UserNotAllowedException, 'no auth' ! #subject = auth.get_subject() ! #if subject == None: ! # raise UserNotAllowedException, 'no subject' ! #if subject.CN == None: ! # raise UserNotAllowedException, 'no CN' ! #if subject.CN == '': ! # raise UserNotAllowedException, 'empty CN' ! #if subject.CN == 'Roadwarrior': ! # raise UserNotAllowedException, 'Roadwarrior not allowed' ! if not auth['http'] and not auth['x509']: ! raise UserNotAllowedException, 'not authenticated' try: ! if auth['x509']: ! subject = auth['x509'].get_subject() ! owner = '/CN=%s/emailAddress=%s' \ ! % (subject.CN, subject.emailAddress) ! elif auth['http']: ! type, data = auth['http'].split(' ',1) ! if type == 'Basic': ! user, pw = base64.decodestring(data).split(':') ! owner = user ! else: ! raise UserNotAllowedException, 'not supported authentication method' ! else: ! owner = ANONYMOUS ! except UserNotAllowedException: ! raise except: + log.error() owner = ANONYMOUS return owner *************** *** 176,181 **** # Other name of Submit job ! def CreateActivityFromJSDL(self, x509, jsdl_doc): ! owner = self._check_x509(x509) grid_id = self.id + '/' + mkuid() log.msg('New job from %s:' % owner, grid_id) --- 192,197 ---- # Other name of Submit job ! def CreateActivityFromJSDL(self, auth, jsdl_doc): ! owner = self._check_auth(auth) grid_id = self.id + '/' + mkuid() log.msg('New job from %s:' % owner, grid_id) *************** *** 193,198 **** return s ! def GetActivityJSDLDocuments(self, x509, grid_ids): ! owner = self._check_x509(x509) if len(grid_ids) == 0: # Get all job --- 209,214 ---- return s ! def GetActivityJSDLDocuments(self, auth, grid_ids): ! owner = self._check_auth(auth) if len(grid_ids) == 0: # Get all job *************** *** 206,213 **** for id in ids] ! def GetActivityStatus(self, x509, grid_ids): if isinstance(grid_ids, str): grid_ids = [grid_ids] ! owner = self._check_x509(x509) if len(grid_ids) == 0: # Get all job --- 222,229 ---- for id in ids] ! def GetActivityStatus(self, auth, grid_ids): if isinstance(grid_ids, str): grid_ids = [grid_ids] ! owner = self._check_auth(auth) if len(grid_ids) == 0: # Get all job *************** *** 256,261 **** return state_change_response ! def RequestActivityStateChanges(self, x509, requests): ! owner = self._check_x509(x509) state_change_request = [] for request in requests: --- 272,277 ---- return state_change_response ! def RequestActivityStateChanges(self, auth, requests): ! owner = self._check_auth(auth) state_change_request = [] for request in requests: |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:42:25
|
Update of /cvsroot/gug/gug/gug/host In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4409/gug/host Modified Files: http.py Log Message: rewritten Location for handling IPv6 addresses as well other modifications becouse of IPv6 Index: http.py =================================================================== RCS file: /cvsroot/gug/gug/gug/host/http.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** http.py 20 Mar 2007 13:13:47 -0000 1.16 --- http.py 3 Apr 2007 12:42:21 -0000 1.17 *************** *** 16,28 **** ! def any_interface(interface): ! return '', interface[1] class Location: ! """ Location class wraps ip, port and path information. ! A Location object is callable, the call returns the three value: ! (ip, port), path = location() """ ! def __init__(self, from_string = '', interface = None, path = None): """ The constructor of the Location class. --- 16,31 ---- ! def any_interface(interface, IPv6 = False): ! if IPv6: ! return '::', interface[1] ! else: ! return '0.0.0.0', interface[1] class Location: ! """ Location class wraps IPv4 and IPv6 ips, port and path information. ! A Location object is callable, the call returns the IPv4 and IPv6 interface and the path: ! ip4, ip6, port, path = location() """ ! def __init__(self, from_string = '', ip4 = None, ip6 = None, port = None, path = None): """ The constructor of the Location class. *************** *** 37,41 **** self.from_string(from_string) else: ! self.set(interface,path) def from_string(self, s): --- 40,44 ---- self.from_string(from_string) else: ! self.set(ip4, ip6, port, path) def from_string(self, s): *************** *** 47,85 **** """ try: ! try: ! interface, path = s.split('/',1) ! except: ! interface = s ! path = '' ! ip, port = get_ip_and_port(interface) ! port = int(port) ! ip = get_ip_address(ip) ! if ip is None: ! raise Exception, 'invalid ip address' ! self.interface = (ip, port) ! self.path = '/' + path ! return self except: ! return None ! ! def interface(self): ! """ Returns the interface part of the Location, which is an (ip, port) tuple.""" ! return self.interface ! def path(self): ! """ Returns the path part of the Location. """ ! return self.path ! ! def set(self, interface, path): ! """ Sets the Location with given interface and path. ! set(interface, path) - 'interface' is a (string, int) tuple of (ip, port), where ip can be '' for anyaddr - 'path' is an arbitrary string """ ! (ip, addr) = interface ! ip = get_ip_address(ip) ! self.interface = (ip, addr) self.path = path --- 50,73 ---- """ try: ! interface, path = s.split('/',1) except: ! interface = s ! path = '' ! ip4, ip6, port = get_ip_and_port(interface) ! self.ip4 = ip4 ! self.ip6 = ip6 ! self.port = port ! self.path = '/' + path ! return self ! def set(self, ip4, ip6, port, path): ! """ Sets the Location with given interfaces and path. ! set(ip4, ip6, port, path) """ ! self.ip4 = ip4 ! self.ip6 = ip6 ! self.port = port self.path = path *************** *** 90,100 **** def __call__(self): """ Returns the interface and the path. """ ! return self.interface, self.path def __repr__(self): ! return str((self.interface, self.path)) def __str__(self): ! return '%s:%d%s' % (self.interface[0] or '*', self.interface[1], self.path) class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): --- 78,100 ---- def __call__(self): """ Returns the interface and the path. """ ! return self.ip4, self.ip6, self.port, self.path def __repr__(self): ! return str((self.ip4, self.ip6, self.port, self.path)) def __str__(self): ! return ' '.join(self.urls()) ! ! def urls(self, proto = ''): ! urls = [] ! if proto and not proto.endswith('://'): ! proto = proto + '://' ! if self.ip4: ! urls.append('%s%s:%d%s' % (proto, self.ip4, self.port, self.path)) ! if self.ip6: ! urls.append('%s[%s]:%d%s' % (proto, self.ip6, self.port, self.path)) ! return urls ! ! class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): *************** *** 137,140 **** --- 137,144 ---- # get the client address client_address = self.request.getpeername() + if len(client_address) == 2: + IPv6 = False + else: + IPv6 = True # create the auth dictionary auth = {'addr' : client_address, 'x509': None} *************** *** 148,159 **** data = self.rfile.read(length) #print 'data', data ! # if it is a PUT just check the lengtj if method == 'PUT': length = int(self.headers['content-length']) ! # if it is a GET, do nothin # get the server side address ! sockname = self.request.getsockname() # put it into the auth dict, maybe the service want to use it auth['sockname'] = sockname # check if there is any path entry for this server socket if interfaces.has_key(sockname): --- 152,164 ---- data = self.rfile.read(length) #print 'data', data ! # if it is a PUT just check the length if method == 'PUT': length = int(self.headers['content-length']) ! # if it is a GET, do nothing # get the server side address ! sockname = self.request.getsockname()[:2] # put it into the auth dict, maybe the service want to use it auth['sockname'] = sockname + print auth # check if there is any path entry for this server socket if interfaces.has_key(sockname): *************** *** 162,166 **** paths = {} # include the paths which are in the 'anyaddr' part of this port ! anyinterface = any_interface(sockname) if interfaces.has_key(anyinterface): paths.update(interfaces[anyinterface]) --- 167,171 ---- paths = {} # include the paths which are in the 'anyaddr' part of this port ! anyinterface = any_interface(sockname, IPv6) if interfaces.has_key(anyinterface): paths.update(interfaces[anyinterface]) *************** *** 215,218 **** --- 220,230 ---- return 'HTTPListener (%s)' % id(self) + class HTTPListenerIPv6(HTTPListener): + + address_family = socket.AF_INET6 + + def __str__(self): + return 'HTTPListenerIPv6 (%s)' % id(self) + class SecureHTTPListener(HTTPListener): """ SecureHTTPListener is a HTTPListener with only one difference, *************** *** 233,236 **** --- 245,255 ---- pass + class SecureHTTPListenerIPv6(SecureHTTPListener): + + address_family = socket.AF_INET6 + + def __str__(self): + return 'SecureHTTPListenerIPv6 (%s)' % id(self) + class HTTPServer: """ This class is handling (Secure)HTTPListener instances. """ *************** *** 264,270 **** # create a listener socket on *:port listener = HTTPListener(('',port), RequestHandler) ! log.msg('%s is bound to *:%d' % (listener, port)) # remember the listener ! self.listeners[('',port)] = listener except KeyboardInterrupt: self.running_lock.release() --- 283,292 ---- # create a listener socket on *:port listener = HTTPListener(('',port), RequestHandler) ! listener6 = HTTPListenerIPv6(('',port), RequestHandler) ! log.msg('%s is bound to 0.0.0.0:%d' % (listener, port)) ! log.msg('%s is bound to [::]:%d' % (listener6, port)) # remember the listener ! self.listeners[('0.0.0.0',port)] = listener ! self.listeners[('::',port)] = listener6 except KeyboardInterrupt: self.running_lock.release() *************** *** 275,285 **** for port in secure_ports: # for each port in secure_ports ! if ssl_contexts.has_key(''): ! # if there is a SSL context for 'anyaddr', then only using that try: # creating the secure listener object ! listener = SecureHTTPListener(('',port), RequestHandler, self.ssl_contexts['']) ! log.msg('%s is bound to *:%d' % (listener, port)) ! self.listeners[('',port)] = listener except KeyboardInterrupt: self.running_lock.release() --- 297,307 ---- for port in secure_ports: # for each port in secure_ports ! if ssl_contexts.has_key('0.0.0.0'): ! # if there is a SSL context for IPv4 'anyaddr', then only using that try: # creating the secure listener object ! listener = SecureHTTPListener(('',port), RequestHandler, self.ssl_contexts['0.0.0.0']) ! log.msg('%s is bound to 0.0.0.0:%d' % (listener, port)) ! self.listeners[('0.0.0.0',port)] = listener except KeyboardInterrupt: self.running_lock.release() *************** *** 288,292 **** log.error('Error binding to *:%d' % port) log.error() ! else: # if there is no SSL context for 'anyaddr', then different contexts can be used # for different interfaces --- 310,327 ---- log.error('Error binding to *:%d' % port) log.error() ! if ssl_contexts.has_key('::'): ! # if there is a SSL context for IPv6 'anyaddr', then only using that ! try: ! # creating the secure listener object ! listener = SecureHTTPListener6(('',port), RequestHandler, self.ssl_contexts['::']) ! log.msg('%s is bound to [::]:%d' % (listener, port)) ! self.listeners[('::',port)] = listener ! except KeyboardInterrupt: ! self.running_lock.release() ! raise ! except: ! log.error('Error binding to *:%d' % port) ! log.error() ! if not self.ssl_contexts.has_key('0.0.0.0') and not self.ssl_contexts.has_key('::'): # if there is no SSL context for 'anyaddr', then different contexts can be used # for different interfaces *************** *** 294,299 **** try: # create a secure listener object for each ip ! listener = SecureHTTPListener((ip,port), RequestHandler, self.ssl_contexts[ip]) ! log.msg('%s is bound to *:%d' % (listener, port)) self.listeners[(ip,port)] = listener except KeyboardInterrupt: --- 329,339 ---- try: # create a secure listener object for each ip ! if ':' in ip: ! listener = SecureHTTPListener6((ip,port), \ ! RequestHandler, self.ssl_contexts[ip]) ! else: ! listener = SecureHTTPListener((ip,port), \ ! RequestHandler, self.ssl_contexts[ip]) ! log.msg('%s is bound to %s:%d' % (listener, ip, port)) self.listeners[(ip,port)] = listener except KeyboardInterrupt: *************** *** 337,346 **** """ print 'Adding handler', handler, 'to', location ! interface, path = location() ! # if this is the first location with this interface ! if not interfaces.has_key(interface): ! interfaces[interface] = {} ! # add this path to this interface ! interfaces[interface][path] = handler print interfaces --- 377,388 ---- """ print 'Adding handler', handler, 'to', location ! ip4, ip6, port, path = location() ! for interface in [(ip4, port), (ip6, port)]: ! if interface: ! # if this is the first location with this interface ! if not interfaces.has_key(interface): ! interfaces[interface] = {} ! # add this path to this interface ! interfaces[interface][path] = handler print interfaces *************** *** 353,372 **** """ print 'Removing handler from', location ! interface, path = location() ! # try to remove it if it is there at all ! if interfaces.has_key(interface): ! i = interfaces[interface] ! if i.has_key(path): ! print 'removing', i[path] ! del i[path] ! print 'removed, remaining:', i, len(i) ! # if this was the last path on this interface, then remove the top-level key as well ! if len(i) == 0: ! del interfaces[interface] ! return True ! else: ! return False ! else: ! return False def serve_one(self, timeout = -1): --- 395,411 ---- """ print 'Removing handler from', location ! ip4, ip6, port, path = location() ! for interface in [(ip4, port), (ip6, port)]: ! if interface: ! # try to remove it if it is there at all ! if interfaces.has_key(interface): ! i = interfaces[interface] ! if i.has_key(path): ! print 'removing', i[path] ! del i[path] ! print 'removed, remaining:', i, len(i) ! # if this was the last path on this interface ! if len(i) == 0: # remove the top-level key as well ! del interfaces[interface] def serve_one(self, timeout = -1): *************** *** 386,394 **** --- 425,436 ---- # do a select on all the listeners listeners = self.listeners.values() + print listeners if timeout < 0: selected, _, _ = select.select(listeners, [], []) else: selected, _, _ = select.select(listeners, [], [], timeout) + print selected for listener in selected: + print listener # handle this request # this method is in python's BaseHTTPServer module |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:40:56
|
Update of /cvsroot/gug/gug/gug/host In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3439/gug/host Modified Files: ctl.py Log Message: generating IPv6 urls as well Index: ctl.py =================================================================== RCS file: /cvsroot/gug/gug/gug/host/ctl.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ctl.py 20 Mar 2007 13:13:47 -0000 1.25 --- ctl.py 3 Apr 2007 12:40:50 -0000 1.26 *************** *** 24,27 **** --- 24,28 ---- """ log.msg('Controller is initializing.') + print network_config self.insecure_ports = network_config['insecure_ports'] self.secure_ports = network_config['secure_ports'] *************** *** 370,384 **** return self.__Proxy(instance) ! def _url(self, location): try: ! ((ip, port), path) = location() ! if port in self.secure_ports: proto = 'https' else: proto = 'http' ! url = proto + '://' + str(location) ! return url except: ! return None def get_description(self, sid): --- 371,384 ---- return self.__Proxy(instance) ! def _urls(self, location): try: ! if location.port in self.secure_ports: proto = 'https' else: proto = 'http' ! return location.urls(proto) except: ! log.error() ! return [] def get_description(self, sid): *************** *** 398,402 **** desc['urls'] = [] for location in service['locations']: ! desc['urls'].append(self._url(location)) return desc --- 398,402 ---- desc['urls'] = [] for location in service['locations']: ! desc['urls'].extend(self._urls(location)) return desc |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:39:29
|
Update of /cvsroot/gug/gug/gug/common/sysinfo In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3167/gug/common/sysinfo Modified Files: __init__.py Log Message: using getfqdn Index: __init__.py =================================================================== RCS file: /cvsroot/gug/gug/gug/common/sysinfo/__init__.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** __init__.py 5 Mar 2007 14:52:22 -0000 1.10 --- __init__.py 3 Apr 2007 12:39:28 -0000 1.11 *************** *** 52,56 **** def hostname(): ! return socket.gethostbyaddr(socket.gethostname())[0] def operating_system(): --- 52,57 ---- def hostname(): ! return socket.getfqdn() ! def operating_system(): |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:37:56
|
Update of /cvsroot/gug/gug/gug/common In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2330/gug/common Modified Files: share.py Log Message: new get_ip_addresses for IPv6 rewritten get_ip_and_port Index: share.py =================================================================== RCS file: /cvsroot/gug/gug/gug/common/share.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** share.py 19 Mar 2007 11:32:00 -0000 1.18 --- share.py 3 Apr 2007 12:37:54 -0000 1.19 *************** *** 181,194 **** return False ! def get_ip_and_port(ipport): ! if ipport[0] == '[': ! # IPv6 address ! ip, port = ipport[1:].split(']') ! if port: ! return ip, port[1:] ! else: ! return ip, port else: ! return ipport.split(':') def get_ip_address(addr): --- 181,224 ---- return False ! def get_ip_addresses(host): ! if host == '*': ! host4 = '0.0.0.0' ! host6 = '::' else: ! host4 = host ! host6 = host ! try: ! ip4 = socket.getaddrinfo(host4, None, socket.AF_INET, socket.SOCK_STREAM)[0][4][0] ! except: ! ip4 = None ! try: ! ip6 = socket.getaddrinfo(host6, None, socket.AF_INET6, socket.SOCK_STREAM)[0][4][0] ! except: ! ip6 = None ! return ip4, ip6 ! ! ! def get_ip_and_port(hostport): ! if not hostport: ! return None, None, None ! if hostport[0] == '[': ! host, port = hostport[1:].split(']') ! try: ! port = int(port[1:]) ! except: ! return None, None, None ! else: ! try: ! host, port = hostport.split(':') ! port = int(port) ! except: ! return None, None, None ! try: ! ip4, ip6 = get_ip_addresses(host) ! except: ! return None, None, None ! return ip4, ip6, port ! ! def get_ip_address(addr): *************** *** 231,234 **** --- 261,265 ---- gis.set(description, provision) except Exception, e: + log.error() log.error('Cannot provide %s:' % sid, str(e)) return False |
From: Nagy Z. <zs...@us...> - 2007-04-03 12:37:21
|
Update of /cvsroot/gug/gug/gug/client In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv413/gug/client Modified Files: storage.py Log Message: commenting out a misterious line... Index: storage.py =================================================================== RCS file: /cvsroot/gug/gug/gug/client/storage.py,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** storage.py 19 Feb 2007 12:26:01 -0000 1.44 --- storage.py 3 Apr 2007 12:37:17 -0000 1.45 *************** *** 262,265 **** --- 262,266 ---- chunk = localfile.read(CHUNKSIZE) resp = h.getresponse() + # XXX: handle response h.close() *************** *** 356,360 **** if test_connection(turl): self._http_put(localfilename, size, turl, cb = cb) ! urllib.urlretrieve(turl, localfilename) self.working_hostname = hostname break --- 357,361 ---- if test_connection(turl): self._http_put(localfilename, size, turl, cb = cb) ! # ??? urllib.urlretrieve(turl, localfilename) self.working_hostname = hostname break |
From: Roczei G. <ro...@us...> - 2007-04-02 13:12:32
|
Update of /cvsroot/gug/gug/gug/service/jc/lrms In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11467 Modified Files: cm.py Log Message: bugfix Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/jc/lrms/cm.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** cm.py 15 Mar 2007 09:41:15 -0000 1.15 --- cm.py 2 Apr 2007 13:12:28 -0000 1.16 *************** *** 15,19 **** log.msg('Initialize Cluster Manager LRMS backend') desc_query = { 'type' : 'ClusterManager' } ! service_data = self.gis_proxy.get(desc_query) if len(service_data) == 0: log.error('No ClusterManager service found.') --- 15,19 ---- log.msg('Initialize Cluster Manager LRMS backend') desc_query = { 'type' : 'ClusterManager' } ! service_data = self.gis_proxy.get(desc_query, True) if len(service_data) == 0: log.error('No ClusterManager service found.') |
From: Roczei G. <ro...@us...> - 2007-04-02 12:15:33
|
Update of /cvsroot/gug/gug/gug/service/cm In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21452 Modified Files: cm.py Log Message: grid cm info Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/cm/cm.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** cm.py 2 Apr 2007 09:31:37 -0000 1.31 --- cm.py 2 Apr 2007 12:15:31 -0000 1.32 *************** *** 72,77 **** idsel = self.cmids.select({}) ! ids = [ id for id in idsel if id['status'] not in \ ! [ BES_OVERALL_STATE_COMPLETED, BES_OVERALL_STATE_KILLED, BES_OVERALL_STATE_CANCELLED, BES_OVERALL_STATE_NEW, BES_OVERALL_STATE_TERMINATED ] ] for job in ids: --- 72,76 ---- idsel = self.cmids.select({}) ! ids = [ id for id in idsel if id['status'] in [ BES_OVERALL_STATE_RUNNING ] ] for job in ids: *************** *** 652,658 **** --- 651,665 ---- out[item]['jobnum'] = str(len(self.cmids.select({'exec_id' : item}))) out[item]['cpunum'] = self.cpucount[item] + out[item]['new'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_NEW, 'exec_id' : item}))) + out[item]['terminated'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_TERMINATED, 'exec_id' : item}))) + out[item]['cancelled'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_CANCELLED, 'exec_id' : item}))) + out[item]['suspended'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_SUSPENDED, 'exec_id' : item}))) out['sum'] = {} out['sum']['run'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_RUNNING}))) out['sum']['completed'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_COMPLETED}))) + out['sum']['new'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_NEW}))) + out['sum']['terminated'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_TERMINATED}))) + out['sum']['cancelled'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_CANCELLED}))) + out['sum']['suspended'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_SUSPENDED}))) out['sum']['job'] = str(len(self.cmids.select({}))) out['sum']['cpu'] = self.cpunum |
From: Roczei G. <ro...@us...> - 2007-04-02 10:58:18
|
Update of /cvsroot/gug/gug/gug/cli In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23961 Modified Files: cm.py Log Message: Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/cli/cm.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** cm.py 2 Apr 2007 10:56:40 -0000 1.16 --- cm.py 2 Apr 2007 10:58:16 -0000 1.17 *************** *** 169,173 **** try: result = cm.info() - print result if len(args) == 0 or (args[0] != '-l' and args[0] != '--xml'): print " ----------------------------------------------------------------------------------------------------------------------" --- 169,172 ---- |
From: Roczei G. <ro...@us...> - 2007-04-02 10:56:48
|
Update of /cvsroot/gug/gug/gug/cli In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23558 Modified Files: cm.py Log Message: bugfix Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/cli/cm.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** cm.py 2 Apr 2007 09:30:46 -0000 1.15 --- cm.py 2 Apr 2007 10:56:40 -0000 1.16 *************** *** 139,143 **** def _rm(self, args): try: ! cm = find_working_service(self.gis_peers, self.send_job_to) result = cm.delete(args) if result: --- 139,143 ---- def _rm(self, args): try: ! cm = self._cm() result = cm.delete(args) if result: *************** *** 154,158 **** def _stop(self, args): try: ! cm = find_working_service(self.gis_peers, self.send_job_to) result = cm.stop(args[0]) if result == 1: --- 154,158 ---- def _stop(self, args): try: ! cm = self._cm() result = cm.stop(args[0]) if result == 1: *************** *** 166,172 **** def _info(self, args): ! cm = find_working_service(self.gis_peers, self.send_job_to) try: result = cm.info() if len(args) == 0 or (args[0] != '-l' and args[0] != '--xml'): print " ----------------------------------------------------------------------------------------------------------------------" --- 166,173 ---- def _info(self, args): ! cm = self._cm() try: result = cm.info() + print result if len(args) == 0 or (args[0] != '-l' and args[0] != '--xml'): print " ----------------------------------------------------------------------------------------------------------------------" *************** *** 270,274 **** self.usage() return False ! cm = find_working_service(self.gis_peers, self.send_job_to) result = cm.revoke(args[0]) if result: --- 271,275 ---- self.usage() return False ! cm = self._cm() result = cm.revoke(args[0]) if result: *************** *** 287,291 **** self.usage() return False ! cm = find_working_service(self.gis_peers, self.send_job_to) result = cm.suspend(args[0]) if result: --- 288,292 ---- self.usage() return False ! cm = self._cm() result = cm.suspend(args[0]) if result: |
From: Roczei G. <ro...@us...> - 2007-04-02 09:31:38
|
Update of /cvsroot/gug/gug/gug/service/cm In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21955 Modified Files: cm.py Log Message: info, status correcting Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/service/cm/cm.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** cm.py 19 Mar 2007 13:46:02 -0000 1.30 --- cm.py 2 Apr 2007 09:31:37 -0000 1.31 *************** *** 51,55 **** self.ownedcpunum = 0 self.runningjob = 0 ! self.jobnum = 0 self.lastexeceslog = '' --- 51,55 ---- self.ownedcpunum = 0 self.runningjob = 0 ! self.cpucount = {} self.lastexeceslog = '' *************** *** 508,512 **** execes = {} cpunum = 0 - jobnum = 0 freecpunum = 0 for item in self.gis.get({'type' : 'Exec'}): --- 508,511 ---- *************** *** 524,530 **** execes[item[0]['sid']] = client data = SimpleXML(memory = item[1]) ! cpunum += int(data.get_content('/ServiceDescription/ClusterElement/CPUCount')[0]) ! jobnum += int(data.get_content('/ServiceDescription/ClusterElement/TotalNumberOfActivities')[0]) ! freecpunum += int(data.get_content('/ServiceDescription/ClusterElement/FreeCpuNum')[0]) except Exception, e: print 'error on parsing Exec provision data', nice_exception(e) --- 523,530 ---- execes[item[0]['sid']] = client data = SimpleXML(memory = item[1]) ! cpucount = int(data.get_content('/ServiceDescription/ClusterElement/CPUCount')[0]) ! cpunum = cpunum + cpucount ! self.cpucount[item[0]['sid']] = cpucount ! freecpunum = freecpunum + int(data.get_content('/ServiceDescription/ClusterElement/FreeCpuNum')[0]) except Exception, e: print 'error on parsing Exec provision data', nice_exception(e) *************** *** 536,540 **** self.execes = execes self.cpunum = cpunum - self.jobnum = jobnum self.freecpunum = freecpunum --- 536,539 ---- *************** *** 634,638 **** </ComputingElement> <Capabilities></Capabilities> ! </ServiceDescription>""" % (site_id, self.cpunum, self.jobnum, self.arch,self.os,self.freecpunum) def info(self, auth): --- 633,637 ---- </ComputingElement> <Capabilities></Capabilities> ! </ServiceDescription>""" % (site_id, self.cpunum, str(len(self.cmids.select({}))), self.arch,self.os,self.freecpunum) def info(self, auth): *************** *** 647,664 **** continue for item in self.execes.keys(): ! out[item] = {'url': self.execes[item].proxy.url } ! out[item]['run'] = len(self.cmids.select({'status' : BES_OVERALL_STATE_RUNNING, 'exec_id' : item})) ! out[item]['completed'] = len(self.cmids.select({'status' : BES_OVERALL_STATE_COMPLETED, 'exec_id' : item})) ! data = self.gis.get({'type' : 'Exec', 'sid' : item}) ! try: ! data = SimpleXML(memory = data[0][1]) ! cpunum = int(data.get_content('/ServiceDescription/ClusterElement/CPUCount')[0]) ! jobnum = int(data.get_content('/ServiceDescription/ClusterElement/TotalNumberOfActivities')[0]) ! out[item]['cpunum'] = cpunum ! out[item]['jobnum'] = jobnum ! except Exception, e: ! log.error() out['sum'] = {} ! out['sum']['job'] = self.jobnum out['sum']['cpu'] = self.cpunum out['sum']['exec_number'] = count --- 646,659 ---- continue for item in self.execes.keys(): ! out[item] = {} ! out[item]['url'] = str(self.execes[item].proxy.url) ! out[item]['run'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_RUNNING, 'exec_id' : item}))) ! out[item]['completed'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_COMPLETED, 'exec_id' : item}))) ! out[item]['jobnum'] = str(len(self.cmids.select({'exec_id' : item}))) ! out[item]['cpunum'] = self.cpucount[item] out['sum'] = {} ! out['sum']['run'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_RUNNING}))) ! out['sum']['completed'] = str(len(self.cmids.select({'status' : BES_OVERALL_STATE_COMPLETED}))) ! out['sum']['job'] = str(len(self.cmids.select({}))) out['sum']['cpu'] = self.cpunum out['sum']['exec_number'] = count |
From: Roczei G. <ro...@us...> - 2007-04-02 09:30:48
|
Update of /cvsroot/gug/gug/gug/cli In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21541 Modified Files: cm.py Log Message: info, status correcting Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/cli/cm.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** cm.py 2 Apr 2007 03:38:33 -0000 1.14 --- cm.py 2 Apr 2007 09:30:46 -0000 1.15 *************** *** 170,197 **** result = cm.info() if len(args) == 0 or (args[0] != '-l' and args[0] != '--xml'): ! print "-----------------------------------------------------------------------------------------------------" ! print "| Exec URL | RUNNING | COMPLETED | CPU number | Job number |" ! print "----------------------------------+----------+--------------+---------------+------------------------" for item in result: if item[0] != 'sum': ! print "| %s | %5s | %5s | %5s | %5s |" % (item[1]['url'], item[1]['run'], item[1]['completed'], item[1]['cpunum'], item[1]['jobnum']) ! print "-----------------------------------------------------------------------------------------------------" else: ! print " Total: %5s | | %6s | %6s " % (item[1]['exec_number'], item[1]['cpu'], item[1]['job']) elif args[0] == '-l' or args[0] == '--xml': if args[0] == '-l': for item in result: if item[0] != 'sum': ! print "\n exec_url = ", item[1]['url'] ! print " exec_id = ", item[0] ! print " running_jobs = ", item[1]['run'] ! print " completed_jobs = ", item[1]['completed'] ! print " cpu_number = ", item[1]['cpunum'] ! print " job_number = ", item[1]['jobnum'] ! print "\ntotal_cpu_number = ", item[1]['cpu'] ! print "total_job_number = ", item[1]['job'] ! print "\n" elif args[0] == '--xml': ! xml = "<?xml version='1.0'?>\n" xml += "<Response xmlns=\"http://schemas.ggf.org/bes/2006/08/bes-factory\">" for item in result: --- 170,205 ---- result = cm.info() if len(args) == 0 or (args[0] != '-l' and args[0] != '--xml'): ! print " ----------------------------------------------------------------------------------------------------------------------" ! print " | Exec service URL | RUNNING jobs | COMPLETED jobs | CPU number | Total job number |" ! print " -----------------------------------------------+--------------+----------------+---------------+----------------------" for item in result: if item[0] != 'sum': ! print " | %40s | %5s | %5s | %5s | %5s |" % (item[1]['url'][:40], item[1]['run'], item[1]['completed'], item[1]['cpunum'], item[1]['jobnum']) ! print " -----------------------------------------------+--------------+----------------+---------------+----------------------" else: ! sum = item ! item = sum ! print " Total: %5s | %5s | %5s | %5s | %5s " % (item[1]['exec_number'], item[1]['run'], item[1]['completed'], item[1]['cpu'], item[1]['job']) elif args[0] == '-l' or args[0] == '--xml': if args[0] == '-l': for item in result: if item[0] != 'sum': ! print "exec_service_url=%s" % item[1]['url'] ! print "exec_service_id=%s" % item[0] ! print "running_jobs=%s" % item[1]['run'] ! print "completed_jobs=%s" % item[1]['completed'] ! print "cpu_number=%s" % item[1]['cpunum'] ! print "job_number=%s" % item[1]['jobnum'] ! print "\n" ! else: ! sum = item ! item = sum ! print "total_cpus=%s" % item[1]['cpu'] ! print "total_running_jobs=%s" % item[1]['run'] ! print "total_completed_jobs=%s" % item[1]['completed'] ! print "total_jobs=%s" % item[1]['job'] ! print "total_exec_services=%s" % item[1]['exec_number'] elif args[0] == '--xml': ! xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" xml += "<Response xmlns=\"http://schemas.ggf.org/bes/2006/08/bes-factory\">" for item in result: *************** *** 210,222 **** xml += " \t<JobNumber>%s" % item[1]['jobnum'] xml += "</JobNumber>\n" ! xml += " </ExecStatus>" ! xml += " \t<CMStatus>%s" % item[1]['jobnum'] xml += " \t<TotalCPUNumber>%s" % item[1]['cpu'] xml += "</TotalCPUNumber>\n" ! xml += " \t<TotalJobNumber>%s" % item[1]['job'] ! xml += "</TotalJobNumber>\n" xml += " \t<ExecNodeCount>%s" % item[1]['exec_number'] xml += "</ExecNodeCount>\n" ! xml += "</CMStatus>" xml += "\n</Response>" print xml --- 218,237 ---- xml += " \t<JobNumber>%s" % item[1]['jobnum'] xml += "</JobNumber>\n" ! xml += " </ExecStatus>\n" ! else: ! sum = item ! item = sum ! xml += " <CMStatus>\n" xml += " \t<TotalCPUNumber>%s" % item[1]['cpu'] xml += "</TotalCPUNumber>\n" ! xml += " \t<TotalJobs>%s" % item[1]['job'] ! xml += "</TotalJobs>\n" ! xml += " \t<TotalRunningJobs>%s" % item[1]['run'] ! xml += "</TotalRunningJobs>\n" ! xml += " \t<TotalCompletedJobs>%s" % item[1]['completed'] ! xml += "</TotalCompletedJobs>\n" xml += " \t<ExecNodeCount>%s" % item[1]['exec_number'] xml += "</ExecNodeCount>\n" ! xml += " </CMStatus>" xml += "\n</Response>" print xml |
From: Roczei G. <ro...@us...> - 2007-04-02 03:38:38
|
Update of /cvsroot/gug/gug/gug/cli In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16669 Modified Files: cm.py Log Message: grid cm status Index: cm.py =================================================================== RCS file: /cvsroot/gug/gug/gug/cli/cm.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** cm.py 2 Apr 2007 03:22:58 -0000 1.13 --- cm.py 2 Apr 2007 03:38:33 -0000 1.14 *************** *** 95,100 **** print "exit_code=%s" % item[1]['exit_code'] print "mem_usage=%s" % item[1]['mem_usage'] ! print "status=%s" % overall_states[int(item[1]['status'])] ! print "last_checkt_time=%s" % strftime("%Y. %m. %d. %A, %H:%M:%S ",localtime( item[1]['last_check_time'])) print "submit_time=%s" % strftime("%Y. %m. %d. %A, %H:%M:%S ",localtime( item[1]['submit_time'])) # print "wall_time=%s" % strftime("%Y. %m. %d. %A, %H:%M:%S ",localtime( item[1]['walltimelimit'])) --- 95,100 ---- print "exit_code=%s" % item[1]['exit_code'] print "mem_usage=%s" % item[1]['mem_usage'] ! print "job_status=%s" % overall_states[int(item[1]['status'])] ! print "last_check_time=%s" % strftime("%Y. %m. %d. %A, %H:%M:%S ",localtime( item[1]['last_check_time'])) print "submit_time=%s" % strftime("%Y. %m. %d. %A, %H:%M:%S ",localtime( item[1]['submit_time'])) # print "wall_time=%s" % strftime("%Y. %m. %d. %A, %H:%M:%S ",localtime( item[1]['walltimelimit'])) *************** *** 105,109 **** print "input=%s" % item[1]['input'] print "username=%s" % item[1]['username'] ! print "exec_url=%s" % item[1]['exec_url'] print "exec_service_id=%s" % item[1]['exec_id'] print "checkpoint=%s" % item[1]['checkpoint'] --- 105,109 ---- print "input=%s" % item[1]['input'] print "username=%s" % item[1]['username'] ! print "exec_service_url=%s" % item[1]['exec_url'] print "exec_service_id=%s" % item[1]['exec_id'] print "checkpoint=%s" % item[1]['checkpoint'] |