X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=RunlevelAgent.py;h=04dcfeef447c74019c7637a15d01faeb2de71e31;hb=bf02dca4b0f09d86990a50a4406ab8ecd79cbd5d;hp=c2f13f9947805373b54e5e0a962b67ca857d8d3b;hpb=36067abfce5ba638e6166d754bc8c573f164dceb;p=monitor.git diff --git a/RunlevelAgent.py b/RunlevelAgent.py index c2f13f9..04dcfee 100644 --- a/RunlevelAgent.py +++ b/RunlevelAgent.py @@ -1,4 +1,11 @@ #!/usr/bin/python +# +# RunlevelAgent - acts as a heartbeat back to myplc reporting that the node is +# online and whether it is in boot or pre-boot run-level. +# This is useful to identify nodes that are behind a firewall, as well as to +# have the machine report run-time status both in safeboot and boot modes, +# so that it is immediately visible at myplc (gui or api). +# import xml, xmlrpclib import logging @@ -93,6 +100,7 @@ def main(): session_str=f.read().strip() api = PLC(Auth(session=session_str), api_server_url) # NOTE: What should we do if this call fails? + # TODO: handle dns failure here. api.AuthCheck() try: