Bug#708184: collab-qa/cloud-scripts/masternode: Add support for specifying output directory

2013-05-23 Thread david suarez
Should I close the bug ?


2013/5/18 David Suárez david.sephi...@gmail.com

 On Sábado, 18 de mayo de 2013 09:35:13 Lucas Nussbaum escribió:
  On 18/05/13 at 00:10 +0200, David Suárez wrote:
   On Lunes, 13 de mayo de 2013 22:37:30 Nathaniel Harrison Handler
 escribió:
Package: qa.debian.org
Severity: wishlist
   
Currently, when the masternode script is run, logs are copied to
/tmp/logs automatically. It would be nice to support specifying an
alternate directory for the logs. This would allow multiple instances
of masternode to run simultaneously on the same machine without
interfering with each other.
   
-- System Information:
Debian Release: 6.0.7
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
  
   Hi,
  
   Patch attached.
 
  Hi,
 
  Looks good. I've added you to the collab-qa project on alioth (assuming
  deiv-guest is your login). Could you commit the patch?
 
  Thanks
 
  Lucas

 Hi,

 thats no problem. Im educating about alioth. When Im ready I commit them.

 David



Bug#708184: collab-qa/cloud-scripts/masternode: Add support for specifying output directory

2013-05-18 Thread Lucas Nussbaum
On 18/05/13 at 00:10 +0200, David Suárez wrote:
 On Lunes, 13 de mayo de 2013 22:37:30 Nathaniel Harrison Handler escribió:
  Package: qa.debian.org
  Severity: wishlist
  
  Currently, when the masternode script is run, logs are copied to /tmp/logs
  automatically. It would be nice to support specifying an alternate
  directory for the logs. This would allow multiple instances of masternode
  to run simultaneously on the same machine without interfering with each
  other.
  
  -- System Information:
  Debian Release: 6.0.7
  Architecture: amd64 (x86_64)
  Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
  Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
  Shell: /bin/sh linked to /bin/dash
 
 Hi,
 
 Patch attached.

Hi,

Looks good. I've added you to the collab-qa project on alioth (assuming
deiv-guest is your login). Could you commit the patch?

Thanks

Lucas


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708184: collab-qa/cloud-scripts/masternode: Add support for specifying output directory

2013-05-18 Thread David Suárez
On Sábado, 18 de mayo de 2013 09:35:13 Lucas Nussbaum escribió:
 On 18/05/13 at 00:10 +0200, David Suárez wrote:
  On Lunes, 13 de mayo de 2013 22:37:30 Nathaniel Harrison Handler escribió:
   Package: qa.debian.org
   Severity: wishlist
   
   Currently, when the masternode script is run, logs are copied to
   /tmp/logs automatically. It would be nice to support specifying an
   alternate directory for the logs. This would allow multiple instances
   of masternode to run simultaneously on the same machine without
   interfering with each other.
   
   -- System Information:
   Debian Release: 6.0.7
   Architecture: amd64 (x86_64)
   Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
   Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
   Shell: /bin/sh linked to /bin/dash
  
  Hi,
  
  Patch attached.
 
 Hi,
 
 Looks good. I've added you to the collab-qa project on alioth (assuming
 deiv-guest is your login). Could you commit the patch?
 
 Thanks
 
 Lucas

Hi,

thats no problem. Im educating about alioth. When Im ready I commit them. 

David


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708184: collab-qa/cloud-scripts/masternode: Add support for specifying output directory

2013-05-17 Thread David Suárez
On Lunes, 13 de mayo de 2013 22:37:30 Nathaniel Harrison Handler escribió:
 Package: qa.debian.org
 Severity: wishlist
 
 Currently, when the masternode script is run, logs are copied to /tmp/logs
 automatically. It would be nice to support specifying an alternate
 directory for the logs. This would allow multiple instances of masternode
 to run simultaneously on the same machine without interfering with each
 other.
 
 -- System Information:
 Debian Release: 6.0.7
 Architecture: amd64 (x86_64)
 Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
 Shell: /bin/sh linked to /bin/dash

Hi,

Patch attached.

David
--- masternode.ori	2013-05-12 13:45:13.0 +0200
+++ masternode	2013-05-17 23:46:15.0 +0200
@@ -19,6 +19,7 @@
 $halt_nodes = true
 $reprepro = nil
 $reprepro_lock = Mutex::new
+$logs_dir = /tmp/logs/
 SLEEPTIME=60
 
 options = OptionParser::new do |opts|
@@ -40,6 +41,11 @@
   opts.on(, --reprepro CODENAME, Upload built packages to reprepro) do |c|
 $reprepro = c
   end
+  opts.on(-d, --logs-dir LOGSDIR, Put build logs in LOGSDIR, defaults to /tmp/logs) do |d|
+# force final trailing separator but let's try not to be fascist about
+d += File::SEPARATOR unless d[-1] == File::SEPARATOR
+$logs_dir = d
+  end
   opts.on(-o, --output LOGFILE, Specify logfile for output) do |n|
 log = File::new(n, w)
 STDOUT.reopen(log)
@@ -47,6 +53,7 @@
 STDOUT.sync = true
 STDERR.sync = true
   end
+
 end
 options.parse!(ARGV)
 
@@ -161,7 +168,7 @@
 $tasks_mutex = Mutex::new
 $retry_tasks = []
 
-FileUtils::mkdir_p(/tmp/logs/)
+FileUtils::mkdir_p($logs_dir)
 
 def execute_one_task(node, slot, ssh, scp, task)
   tname = task['source'] || task['package'] if not task.nil?
@@ -176,9 +183,9 @@
   begin
 scp.upload!(f.path, /tmp/)
 ssh.exec!(/root/process-task -t #{f.path})
-scp.download!(task['logfile'], /tmp/logs/)
+scp.download!(task['logfile'], $logs_dir)
 ssh.exec!(rm -f #{f.path} #{task['logfile']})
-status = IO::read(/tmp/logs/#{File::basename(task['logfile'])}).split(/\n/).grep(/^DC-Status: /)
+status = IO::read(#{$logs_dir}#{File::basename(task['logfile'])}).split(/\n/).grep(/^DC-Status: /)
 if status.empty? or status[0].split[1] != 'OK'
   res = :failed
 else


masternode-add-alternate-dir.patch.asc
Description: PGP signature


Bug#708184: collab-qa/cloud-scripts/masternode: Add support for specifying output directory

2013-05-13 Thread Nathaniel Harrison Handler
Package: qa.debian.org
Severity: wishlist

Currently, when the masternode script is run, logs are copied to /tmp/logs 
automatically. It would be nice to support specifying an alternate directory 
for the logs. This would allow multiple instances of masternode to run 
simultaneously on the same machine without interfering with each other.

-- System Information:
Debian Release: 6.0.7
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org