[Durian-svn] [2739] Use a different directory to avoid conflict, and do svn up on the

brecht institute at blender.org
Fri Apr 30 22:01:17 CEST 2010


Revision: 2739
          https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=2739
Author:   brecht
Date:     2010-04-30 22:01:17 +0200 (Fri, 30 Apr 2010)
Log Message:
-----------
Use a different directory to avoid conflict, and do svn up on the
client instead of rsync.

Modified Paths:
--------------
    frm/master_ui.py
    frm/new_master.py

Added Paths:
-----------
    frm/new_node_update_movie.sh

Modified: frm/master_ui.py
===================================================================
--- frm/master_ui.py	2010-04-30 18:03:52 UTC (rev 2738)
+++ frm/master_ui.py	2010-04-30 20:01:17 UTC (rev 2739)
@@ -284,6 +284,7 @@
                 shutil.copyfileobj(f, self.wfile)
                 f.close()
             except IOError:
+                print("error opening file", path)
                 pass
 
         if self.path == '/master_ui.css':
@@ -293,7 +294,7 @@
         elif self.path == '/preview.png':
             return_file(os.path.join(FARM_DIR, 'slideshow/preview_small00001.png'), 'image/png')
         elif self.path.startswith("/logs"):
-            return_file(os.path.join(FARM_DIR, self.path), 'text/plain')
+            return_file(os.path.join(FARM_DIR, self.path[1:]), 'text/plain')
         else:
             # headers
             self.send_response(http.client.OK)
@@ -310,6 +311,11 @@
 
             title("Durian Farm")
 
+            # instructions
+            section("Temporary Instructions")
+            output("* Don't submit the same files as on the other farm here, it will mess up.")
+            output("* Don't add the render nodes as slaves, will not work correct.")
+
             # jobs
             section("Jobs")
             table_begin("File", "Revision", "Quality", "Status", "Progress", "Priority", "Enabled", "")
@@ -402,7 +408,7 @@
             section("Master Controls")
 
             action('master_restart()', "Restart", "Are you sure?")
-            action('master_generate_avi()', "Generate AVI's", "Are you sure? This will block access to this interface until done.")
+            action('master_generate_avi()', "Generate AVI's", "Are you sure? This will block access to this interface until done (sorry).")
             output("<br/>\n")
             if RESTART:
                 output("waiting to restart...<br/>")

Modified: frm/new_master.py
===================================================================
--- frm/new_master.py	2010-04-30 18:03:52 UTC (rev 2738)
+++ frm/new_master.py	2010-04-30 20:01:17 UTC (rev 2739)
@@ -5,11 +5,11 @@
 # * detect crashes so it does not get stuck on these frames
 # * do svn updates on the slave instead of rsync with master
 # * re-enable svn update
+# * fix multiple nodes updating movie files
 # * backup old frames before starting a new job
 # * remove .exrs to restart job
-# * fix multiple nodes updating movie files
 # * rsync is not killed currently
-# * Address already in use on kill
+# * address already in use on kill
 
 import os
 import time
@@ -172,7 +172,8 @@
     os.system("echo \"Sending command\" > %s" % log_file(ip, ext="busy"))
 
 def clear_busy(ip):
-    os.system("rm %s" % log_file(ip, ext="busy"))
+    if os.path.exists(log_file(ip, ext="busy")):
+        os.system("rm %s" % log_file(ip, ext="busy"))
 
 def available_slaves():
     slaves = set()
@@ -194,7 +195,7 @@
 
     touch_busy(ip)
     # do remote rsync
-    remote_command(ip, os.path.join(FARM_DIR, "node_update_movie.sh"))
+    remote_command(ip, os.path.join(FARM_DIR, "new_node_update_movie.sh"))
 
 def update_frames(ip, job, frame):
     # print("render jobs")
@@ -211,6 +212,8 @@
     return
     '''
     
+    master_ui.RESTART = False
+
     update_funcs = [update_clear, update_movie, update_frames]
 
     # wait and watch for new jobs to be added, once they are, carry them out
@@ -248,6 +251,7 @@
         for slave in sorted(slaves_prev - slaves):
             # removed systems
             print("Removing:", slave.ip)
+            clear_busy(slave.ip)
             update_clear(slave.ip, None, 0)
             del slaves_state[slave.ip]
             changed = True

Copied: frm/new_node_update_movie.sh (from rev 2699, frm/node_update_movie.sh)
===================================================================
--- frm/new_node_update_movie.sh	                        (rev 0)
+++ frm/new_node_update_movie.sh	2010-04-30 20:01:17 UTC (rev 2739)
@@ -0,0 +1,18 @@
+#!/bin/bash
+PATH=$PATH:/shared/software/durian_farm
+export IP=`ip.sh`
+BUSY=$FARM_DIR/logs/$IP.busy
+
+DIR="/media/data/durian_farm_svn"
+
+echo "Updating Movie Files" > $BUSY
+
+if [ -d $check ]; then
+	cd DIR/pro
+	svn cleanup
+	svn up -r$1
+else
+	svn co svn://biserver/durian/pro /media/data/durian_farm_svn/pro
+fi
+
+rm $BUSY


Property changes on: frm/new_node_update_movie.sh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mergeinfo
   + 



More information about the Durian-svn mailing list