Commit 44671ead authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Get Ganeti cluster name from ssconf

Modify snf-ganeti-eventd in order to get the name of the Ganeti cluster
from shared configuration files (ssconf) instead of performing a LUXI query.
Performing a LUXI restricts eventd to run only on the master node.
parent 898183fd
......@@ -60,7 +60,8 @@ from ganeti import utils
from ganeti import jqueue
from ganeti import constants
from ganeti import serializer
from ganeti.cli import GetClient
from ganeti.ssconf import SimpleConfigReader
from synnefo import settings
from synnefo.lib.amqp import AMQPClient
......@@ -269,8 +270,8 @@ class JobFileHandler(pyinotify.ProcessEvent):
def find_cluster_name():
global handler_logger
try:
cl = GetClient()
name = cl.QueryClusterInfo()['name']
scr = SimpleConfigReader()
name = scr.GetClusterName()
except Exception as e:
handler_logger.error('Can not get the name of the Cluster: %s' % e)
raise e
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment