%define name bootmanager
%define version 5.0
-%define taglevel 12
+%define taglevel 15
%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
/etc/plc.d/bootmanager
%changelog
+* Fri Dec 10 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - bootmanager-5.0-15
+- Fix problems caused by shell redirection
+
+* Thu Dec 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootmanager-5.0-14
+- tag 5.0-13 is broken
+
+* Wed Dec 08 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - bootmanager-5.0-13
+- Add support for uploading bash_history to a central server for failboot nodes.
+- Start to use subprocess instead of deprecated popen2 module
+- Fix typo for VSERVERS_SIZE
+- Add --allow-missing parameter to support different kernel configs with mkinitrd
+
* Thu Aug 26 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - bootmanager-5.0-12
- Revert "replace deprecated popen2 with subprocess"
# NOTE: for code-reuse, evoke the bash function 'upload_logs';
# by adding --login, bash reads .bash_profile before execution.
# Also, never fail, since this is an optional feature.
- utils.sysexec( """bash --login -c "upload_logs %s || /bin/true" """ % extra_file, self)
+ utils.sysexec_noerr( """bash --login -c "upload_logs %s" """ % extra_file, self)
##############################
LOG= log( BM_NODE_LOG )
# NOTE: assume CWD is BM's source directory, but never fail
- utils.sysexec("./setup_bash_history_scripts.sh || /bin/true", LOG)
+ utils.sysexec_noerr("./setup_bash_history_scripts.sh", LOG)
LOG.LogEntry( "BootManager started at: %s" % \
time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) )
-/*
- * $Id$
- * $URL$
- */
-
#define _GNU_SOURCE 1
#include <stdio.h>
#include <glob.h>
#include <stdarg.h>
#include <string.h>
+#include <sys/stat.h>
#define INIT(x) real_ ## x = dlsym(RTLD_NEXT, #x); \
if (!real_ ## x) { \
# hack for CentOS 5.3
bypassRaidIfNeeded(SYSIMG_PATH)
- utils.sysexec_chroot( SYSIMG_PATH, "mkinitrd -v /boot/initrd-%s.img %s" % \
+ utils.sysexec_chroot( SYSIMG_PATH, "mkinitrd -v --allow-missing /boot/initrd-%s.img %s" % \
(kernel_version, kernel_version), log )
utils.sysexec_noerr("umount %s/sys" % SYSIMG_PATH)
import string
import socket
import re
-import time
import utils
from Exceptions import *
try:
resolved_node_ip= socket.gethostbyname(hostname)
except socket.gaierror, e:
- # sleep 5 minutes and try again
- time.sleep(60*5)
- try:
- resolved_node_ip= socket.gethostbyname(hostname)
- except socket.gaierror, e:
- hostname_resolve_ok= 0
+ hostname_resolve_ok= 0
if INTERFACE_SETTINGS['method'] == "dhcp":
try:
if cmd.__contains__(">"):
- prog = subprocess.Popen(shlex.split(cmd), shell=True)
+ prog = subprocess.Popen(cmd, shell=True)
else:
prog = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except OSError:
raise BootManagerException, "Interrupted by user"
if log is not None:
- log.write(stdoutdata)
+ if stdoutdata is not None:
+ log.write(stdoutdata)
returncode = prog.wait()