Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUSTOMER] Use ntpdate in genesis kernel instead of starting the ntp daemon to reduce discovery time #2307

Merged
merged 3 commits into from
Dec 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xCAT-genesis-builder/install
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dracut_install efibootmgr
#dracut_install libvirtd /usr/share/libvirt/cpu_map.xml /usr/bin/qemu-img /usr/libexec/qemu-kvm
dracut_install mkswap df brctl vconfig ifenslave ssh-keygen scp clear dhclient lldpad
dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2
dracut_install poweroff ntpq ntpd hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services
dracut_install poweroff ntpq ntpd ntpdate hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services
dracut_install /sbin/rsyslogd /etc/protocols umount /bin/rpm /usr/lib/rpm/rpmrc
dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install dmidecode /usr/lib64/libstdc++.so.6 #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si
Expand Down
12 changes: 2 additions & 10 deletions xCAT-genesis-scripts/bin/doxcat
Original file line number Diff line number Diff line change
Expand Up @@ -260,25 +260,17 @@ fi
openssl genrsa -out /etc/xcat/certkey.pem 4096 > /dev/null 2>&1 &

logger -s -t $log_label -p local4.info "Acquired IPv4 address on $bootnic"

ip addr show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6|grep inet|awk '{print $2}'

logger -s -t $log_label -p local4.info "Starting ntpd..."
ntpd -g -x
logger -s -t $log_label -p local4.info "Attempting to sync the date with $XCATMASTER..."
ntpdate -b $XCATMASTER

if [ -e "/dev/rtc" ]; then
logger -s -t $log_label -p local4.info "Attempting to sync hardware clock..."
( sleep 8 ; hwclock --systohc ) </dev/null >/dev/null 2>&1 &
disown
fi

# rv 0 state does not work with the new ntp versions
logger -s -t $log_label -p local4.info "Checking ntpq for the offset values..."
while [ "`ntpq -c 'rv 0 offset' | awk -F '=' '/offset=/ { print $2 }' | awk -F '.' '{ print $1 }' | sed s/-//`" -ge 1000 ]; do
sleep 1
done
logger -s -t $log_label -p local4.info "Checking ntpq for the offset values... Done"

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
Expand Down