[SCM] build.samba.org - branch master updated
Jelmer Vernooij
jelmer at samba.org
Fri Nov 12 12:04:43 MST 2010
The branch, master has been updated
via 109bec3 admin: Only update hosts list/rsyncd secrets when changes have been made.
from 5b70bb5 Switch over to using python mail-dead-hosts scripts.
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 109bec3e1147caff0352fe7e57a47d1e532f7385
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Nov 12 20:05:24 2010 +0100
admin: Only update hosts list/rsyncd secrets when changes have been made.
-----------------------------------------------------------------------
Summary of changes:
admin.py | 38 +++++++++++++++++++++++---------------
1 files changed, 23 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/admin.py b/admin.py
index 909d303..f17b26e 100755
--- a/admin.py
+++ b/admin.py
@@ -32,6 +32,22 @@ buildfarm = BuildFarm()
db = buildfarm.hostdb
+def update_rsyncd_secrets():
+ temp_rsyncd_secrets = os.path.join(os.path.dirname(__file__), "../rsyncd.secrets.new")
+ f = open(temp_rsyncd_secrets, "w")
+ f.writelines(db.create_rsync_secrets())
+ f.close()
+
+ os.rename(temp_rsyncd_secrets, "../rsyncd.secrets")
+
+def update_hosts_list():
+ temp_hosts_list_file = os.path.join(os.path.dirname(__file__), "web", "hosts.list.new")
+ f = open(temp_hosts_list_file, "w")
+ f.writelines(db.create_hosts_list())
+ f.close()
+
+ os.rename(temp_hosts_list_file, os.path.join(os.path.dirname(__file__), "web/hosts.list"))
+
dry_run = False
print "Samba Build farm management tool"
@@ -58,6 +74,9 @@ if op == "remove":
except hostdb.NoSuchHost, e:
print "No such host '%s'" % e.name
sys.exit(1)
+ else:
+ update_rsyncd_secrets()
+ update_hosts_list()
elif op == "modify":
hostname = raw_input("Please enter hostname to modify: ")
host = db.host(hostname)
@@ -85,6 +104,8 @@ elif op == "modify":
else:
print "Unknown subcommand %s" % mod_op
sys.exit(1)
+ update_rsyncd_secrets()
+ update_hosts_list()
elif op == "add":
hostname = raw_input("Machine hostname: ")
platform = raw_input("Machine platform (eg Fedora 9 x86_64): ")
@@ -155,7 +176,8 @@ Thanks, your friendly Samba build farm administrator <build at samba.org>""" % owne
recipients.append(msg["Bcc"])
s.sendmail(msg["From"], recipients, msg.as_string())
s.quit()
-
+ update_rsyncd_secrets()
+ update_hosts_list()
elif op == "info":
hostname = raw_input("Hostname: ")
host = db.host(hostname)
@@ -179,17 +201,3 @@ elif op == "list":
else:
print "Unknown command %s" % op
sys.exit(1)
-
-temp_rsyncd_secrets = os.path.join(os.path.dirname(__file__), "../rsyncd.secrets.new")
-f = open(temp_rsyncd_secrets, "w")
-f.writelines(db.create_rsync_secrets())
-f.close()
-
-os.rename(temp_rsyncd_secrets, "../rsyncd.secrets")
-
-temp_hosts_list_file = os.path.join(os.path.dirname(__file__), "web", "hosts.list.new")
-f = open(temp_hosts_list_file, "w")
-f.writelines(db.create_hosts_list())
-f.close()
-
-os.rename(temp_hosts_list_file, os.path.join(os.path.dirname(__file__), "web/hosts.list"))
--
build.samba.org
More information about the samba-cvs
mailing list