2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-28 16:20:54 +00:00

Compare commits

...

10 Commits

Author SHA1 Message Date
Jarrod Johnson 75a951c8a7 Enable more plugins for collective routing 2022-07-13 08:57:54 -04:00
Jarrod Johnson 60df685640 Prevent shell session from playing console output 2022-06-30 14:16:31 -04:00
Jarrod Johnson 86f13db803 Allow blanking a value to default a plugin attribute 2022-06-30 14:16:23 -04:00
Jarrod Johnson 247cabd7ca Add log message for mac interrogation of switch
Clarify when things go wrong due to certificate.
2022-06-30 14:16:15 -04:00
Jarrod Johnson b62855c84b Fix syntax error in el7 prescript 2022-06-30 14:15:57 -04:00
Jarrod Johnson 384457908b Fix EL7 typeo in postscript 2022-06-30 14:15:50 -04:00
Jarrod Johnson 31f71ac961 Adjust to correct ntp for 9 and up 2022-06-30 14:15:43 -04:00
Jarrod Johnson 1632c94c3c Install apiclient in a normal location for EL7 2022-06-30 14:15:34 -04:00
Jarrod Johnson f9aab2a640 Add old profile compatible apiclient location 2022-06-30 14:15:25 -04:00
Jarrod Johnson 931fa54092 Fix EL7 deployment compatibility 2022-06-30 14:15:18 -04:00
7 changed files with 36 additions and 10 deletions
@@ -20,3 +20,4 @@ for i in /ssh/*.ca; do
done
mkdir -p /sysroot/opt/confluent/bin
cp /opt/confluent/bin/apiclient /sysroot/opt/confluent/bin
cp /opt/confluent/bin/apiclient /sysroot/etc/confluent/
@@ -79,5 +79,9 @@ if [ -e /tmp/installdisk -a ! -e /tmp/partitioning ]; then
echo ignoredisk --only-use $(cat /tmp/installdisk) >> /tmp/partitioning
echo autopart --nohome $LUKSPARTY >> /tmp/partitioning
fi
python /etc/confluent/apiclient /confluent-public/os/$confluent_profile/kickstart.custom -o /tmp/kickstart.custom
if [ -f /opt/confluent/bin/apiclient ]; then
python /opt/confluent/bin/apiclient /confluent-public/os/$confluent_profile/kickstart.custom -o /tmp/kickstart.custom
else
python /etc/confluent/apiclient /confluent-public/os/$confluent_profile/kickstart.custom -o /tmp/kickstart.custom
fi
kill $logshowpid
@@ -10,6 +10,8 @@
nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}')
export confluent_mgr confluent_profile nodename
cp -a /etc/confluent /mnt/sysimage/etc
mkdir -p /mnt/sysimage/opt/confluent/bin
cp /opt/confluent/bin/apiclient /mnt/sysimage/opt/confluent/bin/
chmod -R og-rwx /mnt/sysimage/etc/confluent
cp /tmp/functions /mnt/sysimage/etc/confluent/
hostnamectl set-hostname $nodename
@@ -42,11 +42,20 @@ echo lang $locale > /tmp/langinfo
echo keyboard --vckeymap=$keymap >> /tmp/langinfo
tz=$(grep ^timezone: /etc/confluent/confluent.deploycfg)
tz=${tz#timezone: }
MVER=$(grep VERSION_ID /etc/os-release|cut -d = -f 2 |cut -d . -f 1|cut -d '"' -f 2)
ntpsrvs=""
if grep ^ntpservers: /etc/confluent/confluent.deploycfg > /dev/null; then
ntpsrvs="--ntpservers="$(sed -n '/^ntpservers:/,/^[^-]/p' /etc/confluent/confluent.deploycfg|sed 1d|sed '$d' | sed -e 's/^- //' | paste -sd,)
if [ "$MVER" -ge 9 ]; then
if grep ^ntpservers: /etc/confluent/confluent.deploycfg > /dev/null; then
for ntpsrv in $(sed -n '/^ntpservers:/,/^[^-]/p' /etc/confluent/confluent.deploycfg|sed 1d|sed '$d' | sed -e 's/^- //'); do
echo timesource --ntp-server $ntpsrv >> /tmp/timezone
done
fi
else
if grep ^ntpservers: /etc/confluent/confluent.deploycfg > /dev/null; then
ntpsrvs="--ntpservers="$(sed -n '/^ntpservers:/,/^[^-]/p' /etc/confluent/confluent.deploycfg|sed 1d|sed '$d' | sed -e 's/^- //' | paste -sd,)
fi
fi
echo timezone $ntpsrvs $tz --utc > /tmp/timezone
echo timezone $ntpsrvs $tz --utc >> /tmp/timezone
rootpw=$(grep ^rootpassword /etc/confluent/confluent.deploycfg | awk '{print $2}')
if [ "$rootpw" = null ]; then
echo "rootpw --lock" > /tmp/rootpw
+7 -6
View File
@@ -71,7 +71,8 @@ import struct
import sys
pluginmap = {}
dispatch_plugins = (b'ipmi', u'ipmi', b'redfish', u'redfish', b'tsmsol', u'tsmsol')
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')
PluginCollection = plugin.PluginCollection
try:
@@ -823,17 +824,17 @@ def handle_dispatch(connection, cert, dispatch, peername):
connection.close()
return
plugroute = routespec.routeinfo
plugpath = None
nodesbyhandler = {}
passvalues = []
nodeattr = configmanager.get_node_attributes(
nodes, plugroute['pluginattrs'])
for node in nodes:
plugpath = None
for attrname in plugroute['pluginattrs']:
if attrname in nodeattr[node]:
plugpath = nodeattr[node][attrname]['value']
elif 'default' in plugroute:
plugpath = plugroute['default']
if not plugpath and 'default' in plugroute:
plugpath = plugroute['default']
if plugpath:
try:
hfunc = getattr(pluginmap[plugpath], operation)
@@ -990,15 +991,15 @@ def handle_node_request(configmanager, inputdata, operation,
elif 'pluginattrs' in plugroute:
nodeattr = configmanager.get_node_attributes(
nodes, plugroute['pluginattrs'] + ['collective.manager'])
plugpath = None
nodesbymanager = {}
nodesbyhandler = {}
badcollnodes = []
for node in nodes:
plugpath = None
for attrname in plugroute['pluginattrs']:
if attrname in nodeattr[node]:
plugpath = nodeattr[node][attrname]['value']
elif 'default' in plugroute:
if not plugpath and 'default' in plugroute:
plugpath = plugroute['default']
if plugpath in dispatch_plugins:
cfm.check_quorum()
@@ -260,6 +260,11 @@ def _map_switch_backend(args):
if switch not in noaffluent:
try:
return _affluent_map_switch(args)
except exc.PubkeyInvalid:
log.log({'error': 'While trying to gather ethernet mac addresses '
'from {0}, the TLS certificate failed validation. '
'Clear pubkeys.tls_hardwaremanager if this was '
'expected due to reinstall or new certificate'.format(switch)})
except Exception:
pass
mactobridge, ifnamemap, bridgetoifmap = _offload_map_switch(
@@ -41,6 +41,10 @@ class _ShellHandler(consoleserver.ConsoleHandler):
return
#return super().feedbuffer(data)
def get_recent(self):
retdata, connstate = super(_ShellHandler, self).get_recent()
return '', connstate
def _got_disconnected(self):
self.connectstate = 'closed'
self._send_rcpts({'connectstate': self.connectstate})