add LSHOSTNAME option to so-minion. use -L in sominion_setup reactor

This commit is contained in:
Josh Patterson
2025-05-29 12:22:52 -04:00
parent 05dfce62fb
commit 40531dd919
2 changed files with 13 additions and 4 deletions

View File

@@ -75,6 +75,10 @@ for i in "$@"; do
ES_HEAP_SIZE="${i#*=}"
shift
;;
-L=*|--lshostname=*)
LSHOSTNAME="${i#*=}"
shift
;;
-l=*|--lsheap=*)
LSHEAP="${i#*=}"
shift

View File

@@ -9,12 +9,14 @@ import logging
from subprocess import call
import yaml
log = logging.getLogger(__name__)
def run():
logging.debug('sominion_setup_reactor: Running')
log.info('sominion_setup_reactor: Running')
minionid = data['id']
DATA = data['data']
hv_name = DATA['HYPERVISOR_HOST']
logging.debug('sominion_setup_reactor: DATA: %s' % DATA)
log.info('sominion_setup_reactor: DATA: %s' % DATA)
# Build the base command
cmd = "NODETYPE=" + DATA['NODETYPE'] + " /usr/sbin/so-minion -o=addVM -m=" + minionid + " -n=" + DATA['MNIC'] + " -i=" + DATA['MAINIP'] + " -c=" + str(DATA['CPUCORES']) + " -d='" + DATA['NODE_DESCRIPTION'] + "'"
@@ -31,10 +33,13 @@ def run():
if 'LS_HEAP_SIZE' in DATA:
cmd += " -l=" + DATA['LS_HEAP_SIZE']
if 'LSHOSTNAME' in DATA:
cmd += " -L=" + DATA['LSHOSTNAME']
logging.debug('sominion_setup_reactor: Command: %s' % cmd)
log.info('sominion_setup_reactor: Command: %s' % cmd)
rc = call(cmd, shell=True)
logging.info('sominion_setup_reactor: rc: %s' % rc)
log.info('sominion_setup_reactor: rc: %s' % rc)
return {}