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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (download) (as text) (annotate)
Mon Aug 27 11:46:35 2012 UTC (11 years, 9 months ago) by agomez
File size: 886 byte(s)
#!/usr/bin/python
import socket
import bonfire
import ogs
import sys
import time
import vcutil

from logger import log,configure
if len(sys.argv) >1:
        configure(logfile = sys.argv[1], debug=True, console=False)
else:
        configure(debug=True, console=True)

default_bonfire = "/etc/default/bonfire"
bonfire.read_defaults(default_bonfire)
log.info("Bonfire URI: %s" % bonfire.uri)
log.info("Credentials: %s:%s" % (bonfire.user,bonfire.password,))
log.info("Experiment: %s" % bonfire.experiment_id)

while True:
	try:
		log.info("Get hostname")
		hostname = socket.gethostname()
		log.info("I am %s" % hostname)
		#Check if it is registered	
		log.info("Get hosts")
		hosts = ogs.get_execution_hosts()
		log.debug(hosts)
		if hostname in hosts:
			log.info("Starting execd")
			ogs.start_execd()
			break
	except Exception as excpt:
		log.exception(excpt)
	time.sleep(20)






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

Powered By FusionForge