Loading bin/cc-node +4 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ DEFAULT_CONFIGURATION = { MAX_AUTH_TIMEOUT = 10 def run_node(options): def run_node(options, hypervisor=True): # Setup logging facility: level = logging.ERROR Loading @@ -60,7 +60,8 @@ def run_node(options): logging.debug('Connecting to server') try: node = CCNode(options['address'], int(options['port'])) node = CCNode(options['address'], int(options['port']), hypervisor) except Exception as err: logging.critical('Starting fail: %s' % err) return Loading Loading @@ -138,6 +139,6 @@ if __name__ == '__main__': options[opt] = default while True: run_node(options) run_node(options, hypervisor=not bool(cliopts.skip_hypervisor)) logging.warning('Critical error, restarting node') sleep(2) ccnode/ccnode.py +2 −2 Original line number Diff line number Diff line Loading @@ -12,9 +12,9 @@ class CCNode(object): ''' This class handles node initialization and connection and authentication ''' def __init__(self, server, port, cert=None): def __init__(self, server, port, hypervisor, cert=None): self.manager = SimpleRpcClient.from_addr(server, port, enable_ssl=True, default_handler=NodeHandler(self)) default_handler=NodeHandler(self, hypervisor)) self.server = ConnectionProxy(self.manager) def run(self): Loading ccnode/ccnodehandlers.py +3 −3 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #TODO: catch livbirt disconnection errors and handle it from interface import Node from interface import Host from kvm import * from sjrpc.utils import RpcHandler from sjrpc.utils import pure Loading Loading @@ -57,11 +57,11 @@ class NodeHandler(RpcHandler): the node interface to the server. ''' def __init__(self, connection): def __init__(self, connection, hypervisor): super(RpcHandler, self).__init__() self._connection = connection #do not detect hypervisor if connection is disable in configuration if config[skip_hypervisor]: if not hypervisor: logging.debug('Hypervisor detection disabled, running as regular' ' node') self.hv_handle = Host() Loading Loading
bin/cc-node +4 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ DEFAULT_CONFIGURATION = { MAX_AUTH_TIMEOUT = 10 def run_node(options): def run_node(options, hypervisor=True): # Setup logging facility: level = logging.ERROR Loading @@ -60,7 +60,8 @@ def run_node(options): logging.debug('Connecting to server') try: node = CCNode(options['address'], int(options['port'])) node = CCNode(options['address'], int(options['port']), hypervisor) except Exception as err: logging.critical('Starting fail: %s' % err) return Loading Loading @@ -138,6 +139,6 @@ if __name__ == '__main__': options[opt] = default while True: run_node(options) run_node(options, hypervisor=not bool(cliopts.skip_hypervisor)) logging.warning('Critical error, restarting node') sleep(2)
ccnode/ccnode.py +2 −2 Original line number Diff line number Diff line Loading @@ -12,9 +12,9 @@ class CCNode(object): ''' This class handles node initialization and connection and authentication ''' def __init__(self, server, port, cert=None): def __init__(self, server, port, hypervisor, cert=None): self.manager = SimpleRpcClient.from_addr(server, port, enable_ssl=True, default_handler=NodeHandler(self)) default_handler=NodeHandler(self, hypervisor)) self.server = ConnectionProxy(self.manager) def run(self): Loading
ccnode/ccnodehandlers.py +3 −3 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #TODO: catch livbirt disconnection errors and handle it from interface import Node from interface import Host from kvm import * from sjrpc.utils import RpcHandler from sjrpc.utils import pure Loading Loading @@ -57,11 +57,11 @@ class NodeHandler(RpcHandler): the node interface to the server. ''' def __init__(self, connection): def __init__(self, connection, hypervisor): super(RpcHandler, self).__init__() self._connection = connection #do not detect hypervisor if connection is disable in configuration if config[skip_hypervisor]: if not hypervisor: logging.debug('Hypervisor detection disabled, running as regular' ' node') self.hv_handle = Host() Loading