Merge branch 'master' of dhozac@git.planet-lab.org:/git/bootmanager
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 14 Dec 2010 21:04:50 +0000 (16:04 -0500)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 14 Dec 2010 21:04:50 +0000 (16:04 -0500)
bootmanager.spec
source/BootManager.py
source/libc-opendir-hack.c
source/steps/MakeInitrd.py
source/steps/ReadNodeConfiguration.py
source/utils.py

index 379696d..d8f7bcc 100644 (file)
@@ -5,7 +5,7 @@
 
 %define name bootmanager
 %define version 5.0
-%define taglevel 12
+%define taglevel 15
 
 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
 
@@ -90,6 +90,18 @@ chkconfig --del monitor-runlevelagent
 /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"
 
index 9ed03ed..29497fe 100755 (executable)
@@ -149,7 +149,7 @@ class log:
             # 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)
 
 
 ##############################
@@ -369,7 +369,7 @@ def main(argv):
     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()) )
index 1b163bf..182a59d 100644 (file)
@@ -1,8 +1,3 @@
-/*
- * $Id$
- * $URL$
- */
-
 #define _GNU_SOURCE 1
 
 #include <stdio.h>
@@ -14,6 +9,7 @@
 #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) { \
index b4a8917..4b63bac 100644 (file)
@@ -67,7 +67,7 @@ def Run( vars, log ):
 
     # 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)
index bd55e9b..ef1a944 100644 (file)
@@ -14,7 +14,6 @@ import sys, os, traceback
 import string
 import socket
 import re
-import time
 
 import utils
 from Exceptions import *
@@ -564,12 +563,7 @@ def __parse_configuration_file( vars, log, file_contents ):
     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":
index 89c63d3..4f96fd2 100644 (file)
@@ -135,7 +135,7 @@ def sysexec( cmd, log= None, fsck = False ):
 
     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:
@@ -148,7 +148,8 @@ def sysexec( cmd, log= None, fsck = False ):
         raise BootManagerException, "Interrupted by user"
 
     if log is not None:
-        log.write(stdoutdata)
+        if stdoutdata is not None:
+            log.write(stdoutdata)
 
     returncode = prog.wait()