2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 10:40:24 +00:00

Merge pull request #7038 from gurevichmark/RH8-genesis-scripts2

RH8 genesis scripts
This commit is contained in:
besawn
2021-09-23 14:51:53 -04:00
committed by GitHub
3 changed files with 39 additions and 24 deletions

View File

@@ -10,13 +10,13 @@ To support the Power9 hardware, changes are made to the kernel in the Red Hat En
Work-around
-----------
.. note:: The genesis-base must be compiled on the Power9 hardware, running RHEL7. If the management node is not Power9 hardware, manually provision a RHEL7 compute node, build the genesis-base RPM, then install it on the management node.
.. note:: The genesis-base must be compiled on the Power9 hardware, running RHEL8. If the management node is not Power9 hardware, manually provision a RHEL8 compute node, build the genesis-base RPM, then install it on the management node.
xCAT cannot ship a kernel based on RHEL distribution, so the customer needs to build a version of the ``xCAT-genesis-base`` on-site using a server running Red Hat Enterprise Linux 7. Building ``xCAT-genesis-base`` on a server running Red Hat Enterprise Linux 8 is currently not supported.
xCAT cannot ship a kernel based on RHEL distribution, so the customer needs to build a version of the ``xCAT-genesis-base`` on-site using a server running Red Hat Enterprise Linux 8. Building ``xCAT-genesis-base`` on a server running Red Hat Enterprise Linux 7 is no longer supported.
1. Download the latest timestamp version of the ``xCAT-genesis-builder`` RPM provided here: http://xcat.org/files/xcat/xcat-dep/2.x_Linux/beta/
2. Install the ``xCAT-genesis-builder`` RPM on a node that is installed with the RHEL version 7.
2. Install the ``xCAT-genesis-builder`` RPM on a node that is installed with the RHEL version 8.
3. Build the ``xCAT-genesis-base`` RPM: ::

View File

@@ -8,12 +8,15 @@ log_label="xcat.genesis.doxcat"
# Start rsyslogd and log into a local file specified in /etc/rsyslog.conf
# Later, once xCAT MN is known, dhclient-script will change
# rsyslog.conf file to send log entries to xCAT MN
RSYSLOGD_VERSION=`rsyslogd -v | grep "rsyslogd" | cut -d" " -f2 | cut -d"." -f1`
RSYSLOGD_VERSION=`rsyslogd -v | grep -m1 "rsyslogd" | tr -s ' ' | cut -d" " -f2 | cut -d"." -f1`
# if syslog is running and there's a pid file, kill it before restarting syslogd
if [ -f /var/run/syslogd.pid ]; then
kill -TERM `cat /var/run/syslogd.pid`
fi
if [ -f /var/run/rsyslogd.pid ]; then
kill -TERM `cat /var/run/rsyslogd.pid`
fi
if [ $RSYSLOGD_VERSION -ge 8 ]; then
/sbin/rsyslogd
@@ -66,6 +69,10 @@ fi
rpcbind
rpc.statd
# Generate some entropy, needed for ssh-keygen to unblock getrandom()
if [ -e /usr/sbin/rngd ]; then
/usr/sbin/rngd
fi
# Try -A available on more current version of ssh-keygen to generate all keys
ssh-keygen -A 2> /dev/null
if [ $? -ne 0 ]; then
@@ -263,17 +270,21 @@ logger -s -t $log_label -p local4.info "Acquired IPv4 address on $bootnic"
ip -4 -o a show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|awk '{print $4}'
logger -s -t $log_label -p local4.info "Starting ntpd..."
ntpd -g -x
if [ -e /usr/sbin/ntpd ]; then
logger -s -t $log_label -p local4.info "Starting ntpd..."
ntpd -g -x
# ntp-wait defaults to 6 seconds between retries, wait for 1 minute
NTP_TRIES=10
NTP_SLEEP=6
logger -s -t $log_label -p local4.info "Waiting for $NTP_TRIES x $NTP_SLEEP seconds for ntpd to synchronize..."
ntp-wait -n $NTP_TRIES -s $NTP_SLEEP -v
if [ $? -ne 0 ]
then
logger -s -t $log_label -p local4.info "... ntpd did not synchronize."
# ntp-wait defaults to 6 seconds between retries, wait for 1 minute
NTP_TRIES=10
NTP_SLEEP=6
logger -s -t $log_label -p local4.info "Waiting for $NTP_TRIES x $NTP_SLEEP seconds for ntpd to synchronize..."
ntp-wait -n $NTP_TRIES -s $NTP_SLEEP -v
if [ $? -ne 0 ]; then
logger -s -t $log_label -p local4.info "... ntpd did not synchronize."
fi
else
logger -s -t $log_label -p local4.info "Starting chronyd..."
chronyd -s
fi
if [ -e "/dev/rtc" ]; then
@@ -283,15 +294,13 @@ if [ -e "/dev/rtc" ]; then
fi
logger -s -t $log_label -p local4.info "Restarting syslog..."
read -r RSYSLOG_PID </var/run/syslogd.pid 2>/dev/null
kill "$RSYSLOG_PID" 2>/dev/null
while kill -0 "$RSYSLOG_PID" 2>/dev/null
do
sleep 0.5
done
unset RSYSLOG_PID
if [ -f /var/run/syslogd.pid ]; then
kill -TERM `cat /var/run/syslogd.pid`
fi
if [ -f /var/run/rsyslogd.pid ]; then
kill -TERM `cat /var/run/rsyslogd.pid`
fi
RSYSLOGD_VERSION=`rsyslogd -v | awk '/rsyslogd/ { split($2, a, "."); print a[1]; }'`
if [ "$RSYSLOGD_VERSION" -ge 8 ]; then
/sbin/rsyslogd
else

View File

@@ -44,9 +44,15 @@ while [ $WAITING -gt 0 ]; do
done
# restart rsyslog after dhclient
kill -9 `cat /var/run/syslogd.pid`
if [ -f /var/run/syslogd.pid ]; then
kill -TERM `cat /var/run/syslogd.pid`
fi
if [ -f /var/run/rsyslogd.pid ]; then
kill -TERM `cat /var/run/rsyslogd.pid`
fi
sleep 3
RSYSLOGD_VERSION=`rsyslogd -v | grep "rsyslogd" | cut -d" " -f2 | cut -d"." -f1`
RSYSLOGD_VERSION=`rsyslogd -v | grep -m1 "rsyslogd" | tr -s ' ' | cut -d" " -f2 | cut -d"." -f1`
if [ $RSYSLOGD_VERSION -ge 8 ]; then
# Newer versions of rsyslogd do not support -c flag anymore
/sbin/rsyslogd