From 9f51e256ce4b1ecf9648cd4afc5bb67cfbf6d420 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 24 Apr 2025 08:08:27 -0400 Subject: [PATCH] Activate vinz on access if doing collective If a node has not been asked to open any locally managed video consoles before it was asked to open a peer managed console, it would fail to start the needed vinz service. Work around this by detecting that scenario and giving the vinz subsystem a chance to fix itself. --- confluent_server/confluent/core.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/core.py b/confluent_server/confluent/core.py index ef1c33ee..e25e82d2 100644 --- a/confluent_server/confluent/core.py +++ b/confluent_server/confluent/core.py @@ -74,7 +74,7 @@ import uuid import yaml import shutil - +vinz = None pluginmap = {} dispatch_plugins = (b'ipmi', u'ipmi', b'redfish', u'redfish', b'tsmsol', u'tsmsol', b'geist', u'geist', b'deltapdu', u'deltapdu', b'eatonpdu', u'eatonpdu', b'affluent', u'affluent', b'cnos', u'cnos', b'enos', u'enos') @@ -213,6 +213,7 @@ def handle_deployment(configmanager, inputdata, pathcomponents, with open('/var/lib/confluent/public/os/{}/profile.yaml'.format(profname)) as profyaml: profinfo = yaml.safe_load(profyaml) profinfo['name'] = profname + #check if boot.ipxe is older than profile.yaml yield msg.KeyValueData(profinfo) return elif len(pathcomponents) == 3: @@ -972,6 +973,7 @@ def _forward_rsp(connection, res): def handle_node_request(configmanager, inputdata, operation, pathcomponents, autostrip=True): + global vinz if log.logfull: raise exc.TargetResourceUnavailable('Filesystem full, free up space and restart confluent service') iscollection = False @@ -1090,6 +1092,10 @@ def handle_node_request(configmanager, inputdata, operation, plugpath = plugroute['default'] if plugpath in dispatch_plugins: cfm.check_quorum() + if pathcomponents == ['console', 'ikvm']: + if not vinz: + import confluent.vinzmanager as vinz + vinz.assure_vinz() manager = nodeattr[node].get('collective.manager', {}).get( 'value', None) if manager: