Skip to content
Snippets Groups Projects
Commit a04f3b22 authored by Anael Beutot's avatar Anael Beutot
Browse files

Fix tag registration for initial tags.

Tag version was not registered.
parent 24b1ce41
No related branches found
No related tags found
No related merge requests found
......@@ -138,19 +138,17 @@ class RPCStartHandler(Thread):
# close previous plugins if needed
if self.loop.role is not None:
self.loop.close_plugins()
# re-register the tags of the main loop
self.loop.tag_db.register()
logger.debug('Role host affected')
from ccnode.host import Handler as HostHandler
self.loop.main_plugin = HostHandler(loop=self.loop)
self.loop.role = u'host'
# (re)-register the tags of the main loop
self.loop.tag_db.rpc_register()
self.loop.register_plugin(self.loop.main_plugin)
elif response == u'hv':
# close previous plugins if needed
if self.loop.role is not None:
self.loop.close_plugins()
# re-register the tags of the main loop
self.loop.tag_db.register()
logger.debug('Role hypervisor affected')
# we don't import those modules at the top because some dependancies
# may not be installed
......@@ -160,6 +158,8 @@ class RPCStartHandler(Thread):
loop=self.loop,
)
self.loop.role = u'hv'
# (re)-register the tags of the main loop
self.loop.tag_db.rpc_register()
self.loop.register_plugin(self.loop.main_plugin)
else:
logger.error('Failed authentication, role returned: %s', response)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment