Log In | Get Help   
Home My Page Projects Code Snippets Project Openings BonFIRE VCOC Demonstration Kit
Summary Activity SCM Files Wiki
[bonfiredemokit] Annotation of /virt-cluster/vc/vc-node-execd.py
[bonfiredemokit] / virt-cluster / vc / vc-node-execd.py Repository:
ViewVC logotype

Annotation of /virt-cluster/vc/vc-node-execd.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download) (as text)

1 : agomez 1 #!/usr/bin/python
2 :     import socket
3 :     import bonfire
4 :     import ogs
5 :     import sys
6 :     import time
7 :     import vcutil
8 :    
9 :     from logger import log,configure
10 :     if len(sys.argv) >1:
11 :     configure(logfile = sys.argv[1], debug=True, console=False)
12 :     else:
13 :     configure(debug=True, console=True)
14 :    
15 :     default_bonfire = "/etc/default/bonfire"
16 :     bonfire.read_defaults(default_bonfire)
17 :     log.info("Bonfire URI: %s" % bonfire.uri)
18 :     log.info("Credentials: %s:%s" % (bonfire.user,bonfire.password,))
19 :     log.info("Experiment: %s" % bonfire.experiment_id)
20 :    
21 :     while True:
22 :     try:
23 :     log.info("Get hostname")
24 :     hostname = socket.gethostname()
25 :     log.info("I am %s" % hostname)
26 :     #Check if it is registered
27 :     log.info("Get hosts")
28 :     hosts = ogs.get_execution_hosts()
29 :     log.debug(hosts)
30 :     if hostname in hosts:
31 :     log.info("Starting execd")
32 :     ogs.start_execd()
33 :     break
34 :     except Exception as excpt:
35 :     log.exception(excpt)
36 :     time.sleep(20)
37 :    
38 :    
39 :    
40 :    
41 :    

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge